:root {
  color-scheme: light;
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text: #15171a;
  --color-muted: #667085;
  --color-border: #d9dee7;
  --color-accent: #0f766e;
}

/* Analytics */
.analytics-page {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
}

.analytics-page > *,
.analytics-primary-grid > *,
.analytics-domain-grid > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.analytics-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.analytics-scope-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.analytics-section-nav {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}

.analytics-section-nav a {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 5px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.analytics-section-nav a:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.analytics-section-nav a.is-active {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.analytics-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--color-border);
}

.analytics-filters label {
  display: grid;
  gap: 6px;
  min-width: min(260px, 32vw);
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.analytics-filters select {
  width: 100%;
  min-height: 42px;
  padding: 0 38px 0 12px;
  border: 1px solid var(--color-border-strong, var(--color-border));
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
}

.analytics-filters input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--color-border-strong, var(--color-border));
  border-radius: 6px;
  background: var(--color-surface);
  color: var(--color-text);
}

.analytics-filters--search .analytics-search-field {
  flex: 1 1 280px;
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  overflow: hidden;
}

.analytics-kpis article {
  display: grid;
  align-content: start;
  min-height: 126px;
  padding: 18px;
  border-right: 1px solid var(--color-border);
}

.analytics-kpis article:last-child {
  border-right: 0;
}

.analytics-kpis span,
.analytics-kpis small {
  color: var(--color-muted);
  font-size: 12px;
}

.analytics-kpis strong {
  margin: 6px 0 2px;
  color: var(--color-text);
  font-size: 28px;
  line-height: 1.15;
}

.analytics-kpis__alert {
  box-shadow: inset 0 3px 0 var(--color-brand-secondary, var(--color-accent));
}

.analytics-kpis__alert--high {
  background: #fff9f7;
  box-shadow: inset 0 3px 0 #c94a31;
}

.analytics-kpis--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analytics-kpis--compact article:last-child {
  border-right: 0;
}

.analytics-kpis--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.analytics-kpis--six article {
  min-height: 116px;
  padding: 15px;
}

.analytics-kpis--six article:last-child {
  border-right: 0;
}

.analytics-kpis .analytics-kpi-text {
  font-size: 21px;
}

.analytics-primary-grid,
.analytics-domain-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.analytics-panel,
.analytics-domain,
.analytics-subjects {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.analytics-panel,
.analytics-domain {
  padding: 20px;
}

.analytics-panel > header,
.analytics-domain > header,
.analytics-subjects > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.analytics-panel h2,
.analytics-domain h2,
.analytics-subjects h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.analytics-panel > header > span,
.analytics-subjects > header > span {
  color: var(--color-muted);
  font-size: 12px;
}

.analytics-bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(38px, 1fr));
  gap: 10px;
  height: 224px;
  margin-top: 18px;
  padding-top: 12px;
  border-bottom: 1px solid var(--color-border);
}

.analytics-bar {
  display: grid;
  grid-template-rows: 20px 1fr 24px;
  align-items: end;
  gap: 4px;
  min-width: 0;
  text-align: center;
}

.analytics-bar__value {
  color: var(--color-muted);
  font-size: 11px;
}

.analytics-bar__track {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--color-accent-soft);
  overflow: hidden;
}

.analytics-bar__track i {
  position: absolute;
  inset: auto 0 0;
  display: block;
  border-radius: 4px 4px 0 0;
  background: var(--color-accent);
  transition: height 220ms ease;
}

.analytics-bar small {
  color: var(--color-muted);
  font-size: 10px;
  white-space: nowrap;
}

.analytics-distribution {
  display: grid;
  gap: 17px;
  margin-top: 24px;
}

.analytics-distribution__row {
  display: grid;
  gap: 7px;
}

.analytics-distribution__row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.analytics-distribution__row small {
  color: var(--color-muted);
  font-size: 11px;
}

.analytics-progress {
  height: 7px;
  border-radius: 4px;
  background: var(--color-bg);
  overflow: hidden;
}

.analytics-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #87939b;
}

.analytics-distribution__row--started .analytics-progress i {
  background: #d09a32;
}

.analytics-distribution__row--partial .analytics-progress i {
  background: #2c8fa0;
}

.analytics-distribution__row--complete .analytics-progress i {
  background: var(--color-accent);
}

.analytics-note {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 11px;
}

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

.analytics-domain > header {
  justify-content: flex-start;
}

.analytics-domain__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.analytics-domain__icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.analytics-domain--security .analytics-domain__icon {
  background: #fff0eb;
  color: #a93e29;
}

.analytics-domain dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.analytics-domain--security dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analytics-domain dl div {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  border-right: 1px solid var(--color-border);
}

.analytics-domain dl div:first-child {
  padding-left: 0;
}

.analytics-domain dl div:last-child {
  border-right: 0;
}

.analytics-domain dt {
  color: var(--color-muted);
  font-size: 11px;
}

.analytics-domain dd {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.analytics-domain__callout {
  margin: 14px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.analytics-domain__callout strong {
  color: var(--color-text);
}

.analytics-alert-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.analytics-alert-list > div {
  display: grid;
  grid-template-columns: 8px 1fr;
  align-items: start;
  gap: 10px;
}

.analytics-alert-list p {
  display: grid;
  gap: 2px;
  margin: 0;
  font-size: 12px;
}

.analytics-alert-list small,
.analytics-domain__empty {
  color: var(--color-muted);
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #87939b;
}

.status-dot--medium {
  background: #d09a32;
}

.status-dot--high {
  background: #c94a31;
}

.analytics-subjects {
  overflow: hidden;
}

.analytics-subjects > header {
  padding: 20px;
  border-bottom: 1px solid var(--color-border);
}

.analytics-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.analytics-table th,
.analytics-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.analytics-table thead th {
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 10px;
  text-transform: uppercase;
}

.analytics-table tbody tr:last-child th,
.analytics-table tbody tr:last-child td {
  border-bottom: 0;
}

.analytics-table tbody tr {
  transition: background-color 140ms ease;
}

.analytics-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-accent-soft) 35%, var(--color-surface));
}

.analytics-table tbody th small,
.analytics-table td small {
  display: block;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 400;
}

.analytics-table tbody th > strong {
  display: block;
}

.analytics-table__coverage {
  display: inline-block;
  width: 54px;
  height: 6px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 3px;
  background: var(--color-bg);
  overflow: hidden;
}

.analytics-table__coverage i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}

.analytics-table__link {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.analytics-table__link:hover strong {
  color: var(--color-accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-table--tracking {
  min-width: 940px;
}

.analytics-table--tracking tbody th,
.analytics-table--tracking td,
.analytics-table--tracking td:nth-child(7) {
  vertical-align: middle;
}

.analytics-table--tracking td.analytics-coverage-cell {
  white-space: nowrap;
}

.analytics-table--tracking td.analytics-opened-cell {
  white-space: nowrap;
}

.analytics-table--tracking td.analytics-opened-cell > strong,
.analytics-table--tracking td.analytics-opened-cell > small {
  display: block;
}

.analytics-table--history {
  min-width: 860px;
}

.analytics-table--history td,
.analytics-table--history td:nth-child(5) {
  vertical-align: middle;
}

.analytics-table--history td strong,
.analytics-table--history td small {
  display: block;
}

.analytics-clamp {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-muted {
  color: var(--color-muted);
}

.analytics-data-section + .analytics-data-section {
  margin-top: 4px;
}

.analytics-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.analytics-state--started {
  background: #fff4dc;
  color: #875c05;
}

.analytics-state--partial {
  background: #e7f5f7;
  color: #176776;
}

.analytics-state--complete {
  background: #e7f6ef;
  color: #176b4a;
}

.analytics-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 13px 16px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 12px;
}

.analytics-pagination a,
.analytics-back-link {
  color: var(--color-accent-strong);
  font-weight: 750;
  text-decoration: none;
}

.analytics-pagination a:hover,
.analytics-back-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-export-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: -14px;
}

.analytics-export-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: -14px;
}

.analytics-export-actions > span {
  margin-right: 4px;
  color: var(--color-muted);
  font-size: 11px;
}

.analytics-export-actions .button {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 11px;
}

.analytics-export-link {
  color: var(--color-accent-strong);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.analytics-export-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analytics-back-link {
  width: max-content;
  font-size: 13px;
}

.analytics-detail-heading {
  margin-top: -10px;
}

.analytics-inline-select select {
  min-height: 38px;
  max-width: 320px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}

.analytics-matrix {
  min-width: max-content;
}

.analytics-matrix th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 210px;
  background: var(--color-surface);
}

.analytics-matrix thead th:first-child {
  background: var(--color-bg);
}

.analytics-matrix td {
  min-width: 112px;
  text-align: center;
}

.analytics-matrix-state {
  display: inline-grid;
  min-width: 34px;
  min-height: 25px;
  padding: 4px 7px;
  place-items: center;
  border-radius: 5px;
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 800;
}

.analytics-matrix-state--done {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.analytics-matrix__task-link {
  color: var(--color-accent-strong);
  text-decoration: none;
  text-underline-offset: 3px;
}

.analytics-matrix__task-link:hover {
  text-decoration: underline;
}

.analytics-question-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.analytics-question-card {
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  background: var(--color-surface);
}

.analytics-question-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.analytics-question-card > header span {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-question-card h3 {
  max-width: 760px;
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 1.5;
}

.analytics-question-card > header > strong {
  flex: 0 0 auto;
  color: var(--color-accent-strong);
  font-size: 13px;
}

.analytics-question-card dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 15px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.analytics-question-card dl div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.analytics-question-card dt {
  color: var(--color-muted);
  font-size: 10px;
}

.analytics-question-card dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.analytics-answer-distribution {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.analytics-answer-distribution > div {
  display: grid;
  grid-template-columns: minmax(150px, 280px) minmax(120px, 1fr) 72px;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}

.analytics-answer-distribution > div > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-answer-distribution > div > div {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-bg);
}

.analytics-answer-distribution i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
}

.analytics-answer-distribution strong {
  text-align: right;
}

.analytics-security-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 16px;
}

.analytics-signal-list {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--color-border);
}

.analytics-signal-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
}

.analytics-signal-list strong {
  font-size: 16px;
}

.analytics-guidance {
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.65;
}

.analytics-state--info {
  background: #edf1f4;
  color: #4a5861;
}

.analytics-state--medium {
  background: #fff4dc;
  color: #875c05;
}

.analytics-state--high {
  background: #fff0eb;
  color: #a93e29;
}

.analytics-retention-panel {
  overflow: hidden;
}

.analytics-retention {
  display: grid;
  grid-template-columns: repeat(10, minmax(42px, 1fr));
  gap: 8px;
  height: 250px;
  margin-top: 18px;
  padding-top: 8px;
  overflow-x: auto;
}

.analytics-retention__segment {
  display: grid;
  grid-template-rows: 22px 1fr 24px;
  align-items: end;
  gap: 5px;
  min-width: 42px;
  text-align: center;
}

.analytics-retention__segment strong {
  color: var(--color-muted);
  font-size: 11px;
}

.analytics-retention__segment > span {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--color-bg);
  overflow: hidden;
}

.analytics-retention__segment i {
  position: absolute;
  inset: auto 0 0;
  display: block;
  border-radius: 4px 4px 0 0;
  background: var(--color-accent);
}

.analytics-retention__segment small {
  color: var(--color-muted);
  font-size: 10px;
}

.analytics-alert-count {
  display: inline-grid;
  width: 26px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  background: var(--color-bg);
  color: var(--color-muted);
  font-weight: 800;
}

.analytics-alert-count--active {
  background: #fff0eb;
  color: #a93e29;
}

.analytics-device {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.analytics-timeline {
  padding: 18px 20px;
}

.analytics-timeline article {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 13px;
  padding-bottom: 20px;
}

.analytics-timeline article:last-child {
  padding-bottom: 0;
}

.analytics-timeline__marker {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #87939b;
  box-shadow: 0 0 0 4px var(--color-bg);
}

.analytics-timeline__marker--medium { background: #d09a32; }
.analytics-timeline__marker--high { background: #c94a31; }

.analytics-timeline article > div {
  min-width: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}

.analytics-timeline article:last-child > div {
  padding-bottom: 0;
  border-bottom: 0;
}

.analytics-timeline header,
.analytics-timeline footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.analytics-timeline header {
  justify-content: space-between;
}

.analytics-timeline time,
.analytics-timeline footer {
  color: var(--color-muted);
  font-size: 10px;
}

.analytics-timeline p {
  margin: 6px 0 9px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.55;
}

.analytics-alert-review {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px dashed var(--color-border-strong);
}

.analytics-alert-review summary {
  width: max-content;
  color: var(--color-accent-strong);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.analytics-alert-review form {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(260px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.analytics-alert-review label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 750;
}

.analytics-alert-review select,
.analytics-alert-review textarea {
  width: 100%;
  min-width: 0;
}

.analytics-alert-review textarea {
  min-height: 42px;
  max-height: 120px;
  resize: vertical;
}

.analytics-alert-review .button {
  min-height: 42px;
  white-space: nowrap;
}

.analytics-alert-review > small {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 10px;
}

@media (max-width: 1120px) {
  .analytics-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-kpis article:nth-child(3) {
    border-right: 0;
  }

  .analytics-kpis article:nth-child(n + 4) {
    border-top: 1px solid var(--color-border);
  }

  .analytics-kpis article:last-child {
    grid-column: span 2;
  }

  .analytics-primary-grid {
    grid-template-columns: 1fr;
  }

  .analytics-kpis--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-kpis--six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-kpis--six article:nth-child(3) {
    border-right: 0;
  }

  .analytics-kpis--six article:nth-child(n + 4) {
    border-top: 1px solid var(--color-border);
  }

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

  .analytics-kpis--compact article:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }

  .analytics-kpis--compact article:nth-child(even) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .analytics-alert-review {
    padding-bottom: 12px;
  }

  .analytics-alert-review form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .analytics-alert-review .button {
    width: 100%;
  }

  .analytics-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .analytics-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .analytics-filters label {
    min-width: 0;
  }

  .analytics-filters--search .analytics-search-field {
    grid-column: 1 / -1;
  }

  .analytics-filters .button {
    grid-column: 1 / -1;
  }

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

  .analytics-kpis article,
  .analytics-kpis article:nth-child(3) {
    min-height: 112px;
    border-top: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
  }

  .analytics-kpis article:nth-child(-n + 2) {
    border-top: 0;
  }

  .analytics-kpis article:nth-child(even) {
    border-right: 0;
  }

  .analytics-kpis article:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .analytics-kpis--compact article:last-child {
    grid-column: auto;
  }

  .analytics-domain-grid {
    grid-template-columns: 1fr;
  }

  .analytics-bars {
    gap: 5px;
    height: 190px;
  }

  .analytics-bar {
    min-width: 27px;
  }

  .analytics-domain dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-domain--security dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-domain dl div:nth-child(2) {
    border-right: 0;
  }

  .analytics-domain dl div:nth-child(n + 3) {
    border-top: 1px solid var(--color-border);
  }

  .analytics-domain--security dl div:nth-child(2) {
    border-right: 1px solid var(--color-border);
  }

  .analytics-domain--security dl div:nth-child(3) {
    border-top: 0;
  }
}

@media (max-width: 480px) {
  .analytics-page > * {
    width: 100%;
  }

  .analytics-export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .analytics-export-actions > span {
    grid-column: 1 / -1;
    margin: 0;
  }

  .analytics-export-actions .button {
    justify-content: center;
  }

  .analytics-filters {
    grid-template-columns: 1fr;
  }

  .analytics-filters .button {
    grid-column: auto;
  }

  .analytics-section-nav {
    width: 100%;
  }

  .analytics-section-nav a {
    flex: 0 0 auto;
    text-align: center;
  }

  .analytics-kpis--compact article {
    min-height: 104px;
    padding: 14px;
  }

  .analytics-kpis--compact strong {
    font-size: 23px;
  }

  .analytics-retention {
    grid-template-columns: repeat(10, 46px);
    height: 210px;
  }

  .analytics-kpis--six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-kpis--six article,
  .analytics-kpis--six article:nth-child(3) {
    border-right: 1px solid var(--color-border);
  }

  .analytics-kpis--six article:nth-child(even) {
    border-right: 0;
  }

  .analytics-inline-select,
  .analytics-inline-select select {
    width: 100%;
    max-width: none;
  }

  .analytics-panel,
  .analytics-domain {
    padding: 16px;
  }

  .analytics-bars {
    overflow-x: auto;
    grid-template-columns: repeat(8, 42px);
  }

  .analytics-domain--security dl {
    grid-template-columns: 1fr;
  }

  .analytics-domain--security dl div,
  .analytics-domain--security dl div:nth-child(2),
  .analytics-domain--security dl div:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    border-right: 0;
  }

  .analytics-domain--security dl div:first-child {
    border-top: 0;
  }

  .analytics-subjects > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-question-list,
  .analytics-timeline {
    padding: 12px;
  }

  .analytics-question-card {
    padding: 14px;
  }

  .analytics-question-card > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .analytics-answer-distribution > div {
    grid-template-columns: minmax(0, 1fr) 54px;
  }

  .analytics-answer-distribution > div > div {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 24px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.site-brand {
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--color-muted);
  font-size: 14px;
}

.site-nav form {
  margin: 0;
}

.site-main {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.stack {
  display: grid;
  gap: 24px;
}

.auth-panel {
  display: grid;
  gap: 32px;
  width: min(420px, 100%);
  margin: 72px auto;
  padding: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.muted {
  color: var(--color-muted);
}

.form-stack {
  display: grid;
  gap: 18px;
}

.form-stack label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.form-stack input,
.form-stack textarea,
.form-stack select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}

.form-stack textarea {
  resize: vertical;
}

.primary-button,
.link-button,
.danger-button,
.secondary-button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  cursor: pointer;
}

.primary-button {
  background: var(--color-accent);
  color: #ffffff;
  font-weight: 700;
}

.link-button {
  background: transparent;
  color: var(--color-accent);
}

.danger-button {
  background: #b42318;
  color: #ffffff;
  font-weight: 700;
}

.secondary-button {
  padding: 0 16px;
  background: #1f2937;
  color: #ffffff;
  font-weight: 700;
}

.primary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  background: #ffffff;
  color: #344054;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.form-errors,
.message {
  padding: 12px;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
}

.message-ok {
  background: #ecfdf3;
  color: #027a48;
}

.card-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card-link,
.panel,
.table-card,
.empty-state {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.card-link {
  display: grid;
  gap: 8px;
  padding: 18px;
  text-decoration: none;
}

.card-link span,
.panel p {
  color: var(--color-muted);
}

.video-inventory-card {
  align-content: start;
}

.upload-job-card {
  align-content: start;
}

.upload-job-card__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.upload-job-card__heading .status-pill {
  flex: 0 0 auto;
}

.video-usage {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.video-delete-form {
  gap: 10px;
}

.confirm-inline {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 8px;
  font-size: 13px;
}

.confirm-inline input {
  width: auto;
  min-height: auto;
  margin-top: 3px;
}

.panel {
  padding: 20px;
}

.panel h2 {
  font-size: 18px;
}

.dashboard-actions {
  display: grid;
  gap: 2px;
}

.dashboard-actions a {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-weight: 700;
  text-decoration: none;
}

.dashboard-actions a:last-child {
  border-bottom: 0;
}

.table-card {
  overflow-x: auto;
}

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

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

th {
  color: var(--color-muted);
  font-size: 13px;
}

.empty-state {
  width: min(560px, 100%);
  margin: 72px auto;
  padding: 32px;
}

.video-placeholder {
  display: grid;
  place-items: center;
  min-height: 360px;
  padding: 32px;
  background: #111827;
  color: #ffffff;
  border-radius: 8px;
}

.video-placeholder p {
  color: #d1d5db;
}

.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
  border-radius: 8px;
}

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

.warning-text {
  color: #fbbf24 !important;
}

.action-panel {
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.danger-zone {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.danger-zone h2 {
  margin: 0;
}

.danger-zone .danger-button {
  justify-self: start;
  padding: 0 14px;
}

.coordinator-layout {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  gap: 24px;
}

.side-menu {
  position: sticky;
  top: 88px;
  display: grid;
  align-self: start;
  gap: 6px;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.side-menu__item {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  color: var(--color-muted);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.side-menu__item--active {
  background: #e6fffb;
  color: #0f766e;
}

.side-menu__item--muted {
  opacity: 0.55;
}

.coordinator-main {
  min-width: 0;
}

.page-heading--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-heading__actions,
.period-heading__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border);
}

.tab {
  min-height: 44px;
  padding: 12px 16px;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tab--active {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.tab--muted {
  opacity: 0.55;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.metric-card span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 28px;
  line-height: 1;
}

.metric-card small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.search-field {
  display: grid;
  gap: 8px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.search-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}

.period-stack {
  display: grid;
  gap: 18px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: start;
}

.period-section {
  display: grid;
  gap: 12px;
}

.period-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
}

.period-heading h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.period-heading p,
.period-heading span {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.course-card {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 178px;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.course-card:hover {
  border-color: #98a2b3;
}

.course-card--compact {
  min-height: 142px;
  text-decoration: none;
}

.course-card__count {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.course-card a {
  text-decoration: none;
}

.course-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.course-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.course-card__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.course-card__meta div {
  display: grid;
  gap: 4px;
}

.course-card__meta dt {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.course-card__meta dd {
  margin: 0;
  font-weight: 800;
}

.course-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 800;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.list-row:last-child {
  border-bottom: 0;
}

.compact-list {
  padding-top: 8px;
  padding-bottom: 8px;
}

.empty-state--inline {
  width: 100%;
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  background: #f2f4f7;
  color: #344054;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill--queued {
  background: #f2f4f7;
  color: #344054;
}

.status-pill--running,
.status-pill--processing {
  background: #eff8ff;
  color: #175cd3;
  border-color: #b2ddff;
}

.status-pill--ready {
  background: #ecfdf3;
  color: #027a48;
  border-color: #abefc6;
}

.status-pill--error {
  background: #fef3f2;
  color: #b42318;
  border-color: #fecdca;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

.detail-list div {
  display: grid;
  gap: 4px;
}

.detail-list dt {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
}

.usage-summary {
  display: grid;
  gap: 16px;
}

.usage-bar {
  overflow: hidden;
  height: 12px;
  background: #eaecf0;
  border-radius: 999px;
}

.usage-bar span {
  display: block;
  height: 100%;
  background: var(--color-accent);
}

.usage-inline-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0;
}

.usage-inline-list--stacked {
  grid-template-columns: 1fr;
}

.usage-inline-list div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.usage-inline-list dt {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.usage-inline-list dd {
  margin: 0;
  font-weight: 800;
}

.checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 4px;
}

.checkbox-list label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  background: #f9fafb;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-weight: 700;
}

.checkbox-list input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

@media (max-width: 760px) {
  .site-main {
    width: min(100% - 20px, 1120px);
    margin: 20px auto;
  }

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

  .side-menu {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .side-menu__item {
    flex: 0 0 auto;
  }

  .page-heading--split,
  .period-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.inline-form {
  margin: 0;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .site-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* Product shell and visual system v1 */
:root {
  --color-bg: #f8f8f6;
  --color-surface: #ffffff;
  --color-surface-subtle: #f4f5f3;
  --color-text: #202421;
  --color-muted: #68716b;
  --color-border: #dde1dc;
  --color-border-strong: #c7cdc7;
  --color-accent: #0d8d8a;
  --color-accent-strong: #08716f;
  --color-accent-soft: #e5f5f4;
  --color-brand-secondary: #466f55;
  --color-brand-secondary-soft: #edf4ef;
  --course-cover-1: #276f72;
  --course-cover-1-text: #ffffff;
  --course-cover-2: #466f55;
  --course-cover-2-text: #ffffff;
  --course-cover-3: #607286;
  --course-cover-3-text: #ffffff;
  --course-cover-4: #327dac;
  --course-cover-4-text: #ffffff;
  --course-cover-5: #707a68;
  --course-cover-5-text: #ffffff;
  --shadow-card: 0 1px 2px rgb(26 35 29 / 5%);
  --sidebar-width: 246px;
  --topbar-height: 64px;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline: 3px solid color-mix(in srgb, var(--color-accent) 26%, transparent);
  outline-offset: 2px;
}

h1 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: 0;
}

h2,
h3 {
  letter-spacing: 0;
}

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

.has-app-shell {
  overflow-x: hidden;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--color-bg);
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 18px 12px 12px;
  overflow: hidden;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  transition: width 160ms ease;
}

.app-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 8px;
  margin-bottom: 14px;
  white-space: nowrap;
}

.app-brand-mark {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.app-brand-mark--image {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  overflow: hidden;
  background: transparent;
  border-radius: 0;
}

.app-brand-mark--image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-brand-name {
  overflow: hidden;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 800;
}

.app-sidebar__nav {
  display: grid;
  align-content: start;
  flex: 1;
  gap: 3px;
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 11px;
  overflow: hidden;
  color: #4f5751;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav-item:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.app-nav-item--active {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  box-shadow: inset 3px 0 0 var(--color-brand-secondary);
}

.app-nav-item svg,
.icon-button svg,
.sidebar-toggle svg,
.mobile-nav svg,
.material-row svg {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-sidebar__account {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  padding: 12px 4px;
  border-top: 1px solid var(--color-border);
}

.user-avatar {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-brand-secondary-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.app-sidebar__identity {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.app-sidebar__identity strong,
.app-sidebar__identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-sidebar__identity strong {
  font-size: 12px;
}

.app-sidebar__identity small {
  color: var(--color-muted);
  font-size: 11px;
}

.icon-button,
.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  color: var(--color-muted);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.icon-button:hover,
.sidebar-toggle:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.sidebar-toggle {
  width: 100%;
  background: var(--color-surface-subtle);
}

.app-workspace {
  min-width: 0;
  flex: 1;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--topbar-height);
  padding: 0 28px;
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid var(--color-border);
}

.app-topbar__academy {
  display: grid;
  line-height: 1.2;
}

.app-topbar__academy strong {
  font-size: 14px;
}

.app-topbar__academy span {
  color: var(--color-muted);
  font-size: 12px;
}

.app-topbar__mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
}

.app-topbar__mobile-brand strong {
  font-size: 14px;
}

.app-topbar__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-menu {
  position: relative;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: transparent;
  color: var(--color-muted);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.notification-bell:hover,
.notification-bell:focus-visible,
.notification-bell--active {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell span {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: #b42318;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 13px;
  text-align: center;
}

.notification-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(25 35 29 / 18%);
  transform-origin: top right;
  animation: notification-popover-in 150ms ease both;
}

.notification-popover[hidden] {
  display: none;
}

.notification-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}

.notification-popover__header strong {
  font-size: 14px;
}

.notification-popover__header span {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 700;
}

.notification-popover__list {
  max-height: min(420px, calc(100dvh - 180px));
  overflow-y: auto;
}

.notification-popover__form + .notification-popover__form {
  border-top: 1px solid var(--color-border);
}

.notification-popover__item {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 7px;
  align-items: start;
  gap: 10px;
  width: 100%;
  min-height: 82px;
  padding: 12px 14px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 0;
  cursor: pointer;
  text-align: left;
  transition: background-color 140ms ease;
}

.notification-popover__item:hover {
  background: var(--color-surface-subtle);
}

.notification-popover__item:focus-visible {
  z-index: 1;
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.notification-popover__item--unread {
  background: color-mix(in srgb, var(--color-accent-soft) 48%, white);
}

.notification-popover__icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #fff6dc;
  color: #795900;
  border-radius: 6px;
}

.notification-popover__icon svg,
.notification-popover__empty svg,
.notification-popover__footer svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.notification-popover__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-popover__body strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-popover__body > span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text);
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notification-popover__body time {
  color: var(--color-muted);
  font-size: 9px;
}

.notification-popover__unread {
  align-self: center;
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
}

.notification-popover__empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 34px 18px;
  color: var(--color-muted);
  font-size: 11px;
  text-align: center;
}

.notification-popover__empty svg {
  width: 25px;
  height: 25px;
}

.notification-popover__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--color-accent-strong);
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.notification-popover__footer:hover,
.notification-popover__footer:focus-visible {
  background: var(--color-accent-soft);
}

@keyframes notification-popover-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.account-menu {
  position: relative;
}

.account-menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  min-height: 40px;
  padding: 3px 5px 3px 3px;
  background: transparent;
  color: var(--color-muted);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.account-menu__toggle:hover,
.account-menu__toggle:focus-visible,
.account-menu__toggle[aria-expanded="true"] {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.account-menu__chevron {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 150ms ease;
}

.account-menu__toggle[aria-expanded="true"] .account-menu__chevron {
  transform: rotate(180deg);
}

.account-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(25 35 29 / 18%);
  transform-origin: top right;
  animation: notification-popover-in 150ms ease both;
}

.account-popover[hidden] {
  display: none;
}

.account-popover__identity {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 16px;
  border-bottom: 1px solid var(--color-border);
}

.account-popover__identity > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.account-popover__identity strong,
.account-popover__identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover__identity strong {
  font-size: 13px;
}

.account-popover__identity small {
  color: var(--color-muted);
  font-size: 10px;
}

.account-popover__identity em {
  width: max-content;
  margin-top: 3px;
  color: var(--color-accent-strong);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.account-popover__links {
  display: grid;
  padding: 6px;
}

.account-popover__links a {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 7px 9px;
  color: var(--color-text);
  border-radius: 6px;
  text-decoration: none;
}

.account-popover__links a:hover,
.account-popover__links a:focus-visible {
  background: var(--color-surface-subtle);
}

.account-popover__links svg,
.account-popover__logout svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.account-popover__links > a > svg {
  justify-self: center;
  color: var(--color-muted);
}

.account-popover__links a span {
  display: grid;
  gap: 2px;
}

.account-popover__links a strong {
  font-size: 12px;
}

.account-popover__links a small {
  color: var(--color-muted);
  font-size: 10px;
}

.account-popover__logout {
  padding: 6px;
  border-top: 1px solid var(--color-border);
}

.account-popover__logout button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  background: transparent;
  color: #9b2c24;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.account-popover__logout button:hover,
.account-popover__logout button:focus-visible {
  background: #fff1ef;
}

.account-page {
  display: grid;
  gap: 24px;
  width: min(980px, 100%);
  margin: 0 auto;
}

.account-page--narrow {
  width: min(720px, 100%);
}

.account-page__header h1 {
  margin-bottom: 6px;
  font-size: 28px;
}

.account-page__header > p:last-child {
  margin-bottom: 0;
  color: var(--color-muted);
}

.account-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: start;
  gap: 24px;
}

.account-settings-panel {
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.account-settings-panel__heading {
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.account-settings-panel__heading h2,
.guide-overview h2 {
  margin-bottom: 5px;
  font-size: 17px;
}

.account-settings-panel__heading p,
.guide-overview p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.6;
}

.account-settings-panel input[readonly] {
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  cursor: not-allowed;
}

.account-settings-panel label small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
}

.account-settings-panel label small ul {
  padding-left: 18px;
  margin: 5px 0 0;
}

.field-errors {
  color: #b42318;
  font-size: 11px;
  font-weight: 600;
}

.account-form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}

.account-form-actions .primary-button {
  padding: 0 18px;
}

.account-summary {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 22px 16px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-align: center;
}

.account-summary .user-avatar {
  width: 48px;
  height: 48px;
  margin-bottom: 5px;
  font-size: 15px;
}

.account-summary strong {
  font-size: 13px;
}

.account-summary > span:not(.user-avatar) {
  max-width: 100%;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 10px;
  text-overflow: ellipsis;
}

.account-summary small,
.guide-overview__role {
  margin-top: 5px;
  color: var(--color-accent-strong);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.guide-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.guide-overview__role {
  flex: 0 0 auto;
  margin: 0;
}

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

.guide-list__item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.guide-list__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 6px;
}

.guide-list__icon svg,
.guide-list__download svg,
.guide-empty svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.guide-list__body {
  display: grid;
  gap: 4px;
}

.guide-list__body strong {
  font-size: 13px;
}

.guide-list__body > span {
  color: var(--color-muted);
  font-size: 11px;
}

.secondary-button.guide-list__download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  background: var(--color-surface);
  color: var(--color-accent-strong);
  border: 1px solid var(--color-border-strong);
  text-decoration: none;
}

.secondary-button.guide-list__download:hover,
.secondary-button.guide-list__download:focus-visible {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-color: var(--color-accent);
}

.guide-list__download svg {
  width: 16px;
  height: 16px;
}

.guide-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 36px 18px;
  color: var(--color-muted);
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  text-align: center;
}

.guide-empty strong {
  color: var(--color-text);
  font-size: 13px;
}

.guide-empty span {
  font-size: 11px;
}

.notification-page {
  display: grid;
  gap: 18px;
  width: min(980px, 100%);
  margin: 0 auto;
}

.notification-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.notification-heading h1 {
  margin-bottom: 5px;
  font-size: 27px;
}

.compact-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--color-border);
}

.compact-tab {
  position: relative;
  padding: 10px 1px 11px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.compact-tab--active {
  color: var(--color-accent-strong);
}

.compact-tab--active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--color-accent);
  content: "";
}

.notification-list {
  border-top: 1px solid var(--color-border);
}

.notification-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 88px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-border);
}

.notification-row--unread {
  background: color-mix(in srgb, var(--color-accent-soft) 48%, white);
}

.notification-row--unread::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--color-accent);
  content: "";
}

.notification-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #fff6dc;
  color: #795900;
  border-radius: 6px;
}

.notification-row__icon svg,
.notification-empty svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-row__body {
  min-width: 0;
}

.notification-row__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-row__title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-row__title span {
  padding: 2px 5px;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.notification-row p {
  margin: 3px 0;
  color: var(--color-text);
  font-size: 12px;
}

.notification-row time {
  color: var(--color-muted);
  font-size: 10px;
}

.notification-row .text-action {
  white-space: nowrap;
}

.notification-empty {
  display: grid;
  justify-items: center;
  padding: 52px 20px;
  color: var(--color-muted);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.notification-empty svg {
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
}

.notification-empty strong {
  color: var(--color-text);
  font-size: 13px;
}

.notification-empty span {
  margin-top: 3px;
  font-size: 11px;
}

.has-app-shell .site-main {
  width: min(1320px, calc(100% - 64px));
  margin: 32px auto 64px;
}

.mobile-nav {
  display: none;
}

.app-shell--sidebar-collapsed .app-sidebar {
  width: 72px;
}

.app-shell--sidebar-collapsed .app-brand-name,
.app-shell--sidebar-collapsed .app-nav-item span,
.app-shell--sidebar-collapsed .app-sidebar__identity,
.app-shell--sidebar-collapsed .app-sidebar__account form {
  display: none;
}

.product-signature {
  position: fixed;
  right: 20px;
  bottom: 16px;
  z-index: 25;
  color: #111111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.app-shell--sidebar-collapsed .app-sidebar__account {
  display: flex;
  justify-content: center;
}

.app-shell--sidebar-collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.page-stack {
  gap: 30px;
}

.page-heading h1 {
  margin-bottom: 7px;
}

.page-lead {
  max-width: 720px;
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--color-accent-strong);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.button-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  background: rgb(255 255 255 / 22%);
  border-radius: 999px;
  font-size: 11px;
}

.primary-button,
.secondary-button,
.primary-link-button,
.secondary-link-button {
  min-height: 40px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.primary-link-button,
.primary-button {
  background: var(--color-accent);
}

.primary-link-button:hover,
.primary-button:hover {
  background: var(--color-accent-strong);
}

.secondary-button {
  background: #303732;
}

.secondary-link-button--small {
  min-height: 34px;
  padding: 0 12px;
}

.period-stack--spacious {
  gap: 36px;
}

.period-heading--plain {
  align-items: center;
  padding: 0;
  border: 0;
}

.period-heading--plain h2 {
  margin: 0;
  font-size: 16px;
}

.period-heading--plain p {
  margin-top: 3px;
  font-weight: 500;
}

.period-heading--plain > span {
  font-size: 12px;
  font-weight: 600;
}

.period-heading--plain .period-heading__actions > span {
  font-size: 12px;
  font-weight: 600;
}

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

.course-tile {
  display: grid;
  grid-template-rows: 112px minmax(112px, auto);
  min-width: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.course-tile:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 5px 16px rgb(31 45 35 / 8%);
  transform: translateY(-1px);
}

.course-tile__cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.course-tile__cover::after {
  position: absolute;
  inset: 10px;
  border: 1px solid rgb(255 255 255 / 12%);
  content: "";
}

.course-tile__cover span {
  position: relative;
  z-index: 1;
}

.course-cover--teal,
.subject-swatch--teal { background: var(--course-cover-1); color: var(--course-cover-1-text); }
.course-cover--green,
.subject-swatch--green { background: var(--course-cover-2); color: var(--course-cover-2-text); }
.course-cover--steel,
.subject-swatch--steel { background: var(--course-cover-3); color: var(--course-cover-3-text); }
.course-cover--blue,
.subject-swatch--blue { background: var(--course-cover-4); color: var(--course-cover-4-text); }
.course-cover--sage,
.subject-swatch--sage { background: var(--course-cover-5); color: var(--course-cover-5-text); }

.course-tile__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 15px;
}

.course-tile__body > strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-tile__body > p {
  display: -webkit-box;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.course-tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 600;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  background: #edf2ef;
  color: #46534a;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge--neutral {
  background: #eef0ed;
  color: #59615b;
}

.secondary-content-section {
  gap: 10px;
  max-width: 840px;
  padding-top: 6px;
}

.resource-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.resource-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.resource-row:last-child {
  border-bottom: 0;
}

a.resource-row:hover {
  background: #fafbf9;
}

.resource-row__icon {
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.resource-row__content {
  display: grid;
  flex: 1;
  min-width: 0;
}

.resource-row__content strong,
.resource-row__content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-row__content strong {
  font-size: 13px;
}

.resource-row__content small {
  color: var(--color-muted);
  font-size: 11px;
}

.resource-row__arrow {
  color: var(--color-muted);
  font-size: 22px;
}

.management-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.management-links a {
  display: grid;
  gap: 3px;
  min-height: 88px;
  padding: 18px;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.management-links a:nth-child(3n) { border-right: 0; }
.management-links a:nth-last-child(-n + 3) { border-bottom: 0; }
.management-links a:hover { background: #fafbf9; }
.management-links strong { font-size: 14px; }
.management-links span { color: var(--color-muted); font-size: 12px; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
}

.breadcrumbs a {
  color: var(--color-accent-strong);
  text-decoration: none;
}

.subject-heading {
  align-items: flex-end;
}

.topic-stack {
  display: grid;
  gap: 14px;
}

.topic-section {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.topic-section__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 13px 17px;
  cursor: pointer;
  list-style: none;
}

.topic-section__summary::-webkit-details-marker {
  display: none;
}

.topic-section__summary > span:first-child {
  display: grid;
  min-width: 0;
}

.topic-section__summary strong {
  font-size: 14px;
}

.topic-section__summary small,
.topic-section__count {
  color: var(--color-muted);
  font-size: 11px;
}

.topic-section__count {
  white-space: nowrap;
}

.topic-section__content {
  border-top: 1px solid var(--color-border);
}

.material-row {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-border);
}

.material-row:last-child {
  border-bottom: 0;
}

.material-row__main {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.material-row__icon {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-radius: 6px;
}

.material-row__text {
  display: grid;
  min-width: 0;
}

.material-row__text strong,
.material-row__text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-row__text strong { font-size: 13px; }
.material-row__text small { color: var(--color-muted); font-size: 11px; }
.text-action { color: var(--color-accent-strong); font-size: 12px; font-weight: 700; text-decoration: none; }
.topic-section__empty,
.management-list__empty { margin: 0; padding: 18px; color: var(--color-muted); font-size: 13px; }

.toolbar--search {
  grid-template-columns: minmax(220px, 420px) auto;
  justify-content: start;
}

.search-field--compact {
  gap: 0;
}

.management-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.management-list__header,
.management-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(86px, .5fr) minmax(76px, .45fr) minmax(86px, .5fr) 72px;
  gap: 14px;
  align-items: center;
}

.management-list__header {
  min-height: 38px;
  padding: 0 15px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.management-row {
  min-height: 64px;
  padding: 9px 15px;
  border-top: 1px solid var(--color-border);
}

.management-row__subject {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.management-row__subject > span:last-child,
.management-row__metric {
  display: grid;
  min-width: 0;
}

.management-row__subject strong,
.management-row__subject small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-row__subject strong { font-size: 13px; }
.management-row__subject small,
.management-row__metric small { color: var(--color-muted); font-size: 10px; }
.management-row__metric strong { font-size: 13px; }

.subject-swatch {
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.has-app-shell .coordinator-layout {
  display: block;
}

.has-app-shell .coordinator-layout > .side-menu {
  display: none;
}

.has-app-shell .coordinator-main {
  width: 100%;
}

@media (max-width: 1180px) {
  .course-tile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .app-sidebar {
    width: 220px;
  }

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

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

  .management-links a:nth-child(3n) { border-right: 1px solid var(--color-border); }
  .management-links a:nth-child(2n) { border-right: 0; }
  .management-links a:nth-last-child(-n + 3) { border-bottom: 1px solid var(--color-border); }
  .management-links a:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 760px) {
  .has-app-shell {
    position: relative;
    padding-bottom: 0;
  }

  .has-app-shell .product-signature {
    position: absolute;
    right: 14px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    font-size: 14px;
  }

  .app-sidebar {
    display: none;
  }

  .app-topbar {
    min-height: 58px;
    padding: 0 16px;
  }

  .app-topbar__mobile-brand {
    display: flex;
  }

  .app-topbar__academy {
    display: none;
  }

  .app-topbar__tools .user-avatar {
    width: 30px;
    height: 30px;
  }

  .notification-bell {
    width: 40px;
    height: 40px;
  }

  .notification-popover {
    position: fixed;
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 84px);
  }

  .account-popover {
    position: fixed;
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
  }

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

  .account-summary {
    grid-row: 1;
  }

  .account-settings-panel {
    padding: 18px 16px;
  }

  .guide-overview {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .guide-list__item {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .guide-list__download {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .notification-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .notification-heading h1 {
    font-size: 24px;
  }

  .notification-row {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 0;
    padding: 14px 8px;
  }

  .notification-row form {
    grid-column: 2;
  }

  .notification-row p {
    overflow-wrap: anywhere;
  }

  .has-app-shell .site-main {
    width: auto;
    margin: 22px 16px 128px;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    min-height: 68px;
    padding: 5px max(6px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    background: rgb(255 255 255 / 97%);
    border-top: 1px solid var(--color-border);
  }

  .mobile-nav__item {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    padding: 3px 2px;
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-nav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav__item--active {
    color: var(--color-accent-strong);
  }

  .mobile-nav svg {
    width: 20px;
    height: 20px;
  }

  h1 {
    font-size: 25px;
  }

  .page-stack {
    gap: 24px;
  }

  .page-heading--split,
  .period-heading {
    gap: 12px;
  }

  .page-heading__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .page-heading__actions > .primary-link-button,
  .page-heading__actions > .secondary-link-button {
    flex: 1 1 170px;
    justify-content: center;
  }

  .course-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .course-tile {
    grid-template-rows: 86px minmax(104px, auto);
  }

  .course-tile__cover {
    font-size: 17px;
  }

  .course-tile__body {
    padding: 11px;
  }

  .course-tile__body > strong {
    font-size: 13px;
  }

  .course-tile__body > p {
    display: none;
  }

  .course-tile__meta {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 8px;
  }

  .period-stack--spacious {
    gap: 30px;
  }

  .period-heading--plain {
    align-items: flex-start;
    flex-direction: row;
  }

  .management-links {
    grid-template-columns: 1fr;
  }

  .management-links a,
  .management-links a:nth-child(2n),
  .management-links a:nth-child(3n),
  .management-links a:nth-last-child(-n + 2),
  .management-links a:nth-last-child(-n + 3) {
    min-height: 72px;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .management-links a:last-child {
    border-bottom: 0;
  }

  .subject-heading {
    align-items: flex-start;
  }

  .topic-section__summary {
    min-height: 58px;
    padding: 12px 13px;
  }

  .material-row {
    align-items: flex-start;
    flex-direction: column;
    padding: 11px 13px;
  }

  .material-row__main {
    width: 100%;
  }

  .text-action {
    margin-left: 48px;
  }

  .management-list__header {
    display: none;
  }

  .management-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 8px;
    padding: 14px;
  }

  .management-row__subject {
    grid-column: 1 / -1;
  }

  .management-row .secondary-link-button {
    grid-column: 1 / -1;
  }

  .toolbar--search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .table-card {
    margin-right: -16px;
    margin-left: -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  th,
  td {
    padding: 12px;
  }
}

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

  .course-tile {
    grid-template-columns: 112px minmax(0, 1fr);
    grid-template-rows: minmax(116px, auto);
  }

  .course-tile__meta {
    flex-direction: row;
  }

  .toolbar--search {
    grid-template-columns: 1fr;
  }
}

/* Video gallery */
.gallery-heading {
  align-items: flex-end;
}

.gallery-heading__actions {
  align-items: center;
}

.gallery-organize-toggle {
  display: none;
  align-items: center;
  gap: 7px;
}

.gallery-organizer-ready .gallery-organize-toggle {
  display: inline-flex;
}

.gallery-organize-toggle[aria-pressed="true"] {
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}

.gallery-organize-toggle:disabled {
  opacity: .55;
  cursor: wait;
}

.gallery-heading svg,
.gallery-upload-tool svg,
.gallery-toolbar svg,
.gallery-video-card svg,
.upload-activity-row svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-upload-tool {
  position: relative;
  z-index: 12;
}

.gallery-upload-tool > summary {
  gap: 8px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}

.gallery-upload-tool > summary::-webkit-details-marker,
.upload-activity > summary::-webkit-details-marker,
.gallery-shelf > summary::-webkit-details-marker,
.gallery-video-card__details > summary::-webkit-details-marker {
  display: none;
}

.gallery-upload-tool__body {
  position: absolute;
  top: 48px;
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: min(760px, calc(100vw - 48px));
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(25 35 29 / 16%);
}

.gallery-upload-source {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 4px 20px 4px 4px;
}

.gallery-upload-source + .gallery-upload-source {
  padding-right: 4px;
  padding-left: 20px;
  border-left: 1px solid var(--color-border);
}

.section-heading-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.section-heading-compact strong {
  font-size: 14px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 6px;
}

.gallery-upload-form {
  gap: 12px;
}

.file-picker-field {
  gap: 7px !important;
  font-size: 12px;
}

.file-picker-field input[type="file"] {
  min-height: 42px;
  padding: 7px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 11px;
}

.file-picker-field input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 8px;
  padding: 0 10px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
}

.field-note {
  color: var(--color-muted);
  font-size: 11px;
}

.upload-progress-list {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.upload-progress-list[hidden] {
  display: none;
}

.upload-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 9px 10px;
  background: var(--color-surface-subtle);
  border-radius: 6px;
}

.upload-progress-row strong,
.upload-progress-row span {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress-row progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 7px;
}

.gallery-overview {
  display: flex;
  align-items: stretch;
  width: fit-content;
  min-width: min(100%, 560px);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.gallery-overview > div {
  display: grid;
  align-content: center;
  min-width: 150px;
  min-height: 72px;
  padding: 11px 18px;
  border-right: 1px solid var(--color-border);
}

.gallery-overview > div:last-child {
  border-right: 0;
}

.gallery-overview span,
.gallery-overview small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 700;
}

.gallery-overview strong {
  font-size: 20px;
  line-height: 1.2;
}

.gallery-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 158px 158px auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.gallery-search {
  position: relative;
}

.gallery-search input {
  padding-left: 38px;
}

.gallery-search__icon {
  position: absolute;
  bottom: 11px;
  left: 12px;
  z-index: 1;
  display: inline-flex;
  color: var(--color-muted);
  pointer-events: none;
}

.gallery-date span {
  margin-bottom: 5px;
  font-size: 10px;
}

.gallery-toolbar input {
  background: #ffffff;
}

.gallery-clear {
  align-self: center;
  padding: 10px 4px 0;
}

.upload-activity {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.upload-activity > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.upload-activity > summary > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.upload-activity > summary strong {
  font-size: 13px;
}

.upload-activity > summary small {
  color: var(--color-muted);
  font-size: 11px;
}

.upload-activity[open] .disclosure-icon {
  transform: rotate(180deg);
}

.upload-activity__list {
  border-top: 1px solid var(--color-border);
}

.upload-activity-row {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1fr) 140px auto auto;
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--color-border);
}

.upload-activity-row:last-child {
  border-bottom: 0;
}

.upload-activity-row__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-radius: 6px;
}

.upload-activity-row__main,
.upload-activity-row__progress {
  display: grid;
  min-width: 0;
}

.upload-activity-row__main strong,
.upload-activity-row__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-activity-row__main strong { font-size: 12px; }
.upload-activity-row__main small,
.upload-activity-row__progress small { color: var(--color-muted); font-size: 10px; }
.upload-activity-row__progress progress { width: 100%; height: 6px; }

.upload-activity-row__details {
  position: relative;
  font-size: 11px;
}

.upload-activity-row__details > summary {
  color: var(--color-accent-strong);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.upload-activity-row__details > p {
  margin: 5px 0;
}

.gallery-library,
.gallery-owner {
  display: grid;
  gap: 28px;
}

.gallery-owner__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.gallery-owner__heading h2,
.gallery-owner__heading p,
.gallery-shelf__heading h3,
.gallery-shelf__heading p {
  margin: 0;
}

.gallery-owner__heading h2 {
  font-size: 14px;
}

.gallery-owner__heading p,
.gallery-shelf__heading p {
  color: var(--color-muted);
  font-size: 11px;
}

.gallery-shelf {
  min-width: 0;
}

.gallery-shelf--empty {
  display: none;
}

.gallery-page.is-organizing .gallery-shelf--empty {
  display: block;
}

.gallery-shelf__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  list-style: none;
  transition: background-color 140ms ease, color 140ms ease;
}

.gallery-shelf__heading:hover {
  background: var(--color-surface-subtle);
}

.gallery-shelf__heading:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.gallery-shelf__heading h3 {
  font-size: 15px;
}

.gallery-shelf__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.gallery-shelf__chevron {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.gallery-shelf[open] .gallery-shelf__chevron {
  transform: rotate(180deg);
}

.gallery-shelf__content {
  padding-top: 12px;
}

.gallery-shelf[open] .gallery-shelf__content {
  animation: disclosure-in 170ms ease both;
}

.gallery-page.is-organizing [data-gallery-dropzone] > .gallery-shelf__heading {
  padding-right: 10px;
  padding-left: 10px;
  border: 1px dashed color-mix(in srgb, var(--color-accent) 38%, var(--color-border));
  border-radius: 6px;
}

.gallery-shelf.is-drag-target .gallery-shelf__heading {
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.gallery-page.is-organizing .video-gallery-grid {
  min-height: 76px;
}

.gallery-drop-hint {
  display: none;
  grid-column: 1 / -1;
  min-height: 76px;
  margin: 0;
  place-content: center;
  gap: 3px;
  color: var(--color-muted);
  background: var(--color-surface-subtle);
  border: 1px dashed var(--color-border);
  border-radius: 7px;
  text-align: center;
}

.gallery-page.is-organizing .gallery-shelf--empty .gallery-drop-hint {
  display: grid;
}

.gallery-drop-hint strong {
  color: var(--color-text);
  font-size: 12px;
}

.gallery-drop-hint span {
  font-size: 10px;
}

.gallery-video-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.gallery-page.is-organizing .gallery-video-card[draggable="true"] {
  cursor: grab;
}

.gallery-page.is-organizing .gallery-video-card[draggable="true"]:active {
  cursor: grabbing;
}

.gallery-video-card.is-dragging {
  opacity: .45;
  border-color: var(--color-accent);
}

.gallery-video-card.is-saving-location {
  opacity: .65;
  pointer-events: none;
}

.gallery-video-card.has-just-moved {
  animation: gallery-video-moved 620ms ease-out;
}

@keyframes gallery-video-moved {
  from { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 42%, transparent); }
  to { box-shadow: var(--shadow-card); }
}

.gallery-video-card__preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #315f62;
  color: #ffffff;
}

.gallery-video-card__drag-handle {
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 8px;
  display: none;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #26332d;
  background: rgb(255 255 255 / 94%);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 5px;
  box-shadow: 0 2px 8px rgb(0 0 0 / 14%);
  pointer-events: none;
}

.gallery-page.is-organizing .gallery-video-card__drag-handle {
  display: grid;
}

.gallery-video-card__drag-handle svg circle {
  fill: currentColor;
  stroke: none;
}

.gallery-video-card__preview-trigger {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.gallery-video-card__preview-trigger:focus-visible {
  outline: 3px solid var(--color-focus, #146c72);
  outline-offset: -4px;
}

.gallery-video-card:nth-child(5n + 2) .gallery-video-card__preview { background: #536b58; }
.gallery-video-card:nth-child(5n + 3) .gallery-video-card__preview { background: #5d6b7c; }
.gallery-video-card:nth-child(5n + 4) .gallery-video-card__preview { background: #3e6d86; }
.gallery-video-card:nth-child(5n + 5) .gallery-video-card__preview { background: #686d60; }

.gallery-video-card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.gallery-video-card:hover .gallery-video-card__poster {
  transform: scale(1.025);
}

.gallery-video-card__initials {
  font-size: 25px;
  font-weight: 800;
  opacity: 0.86;
}

.gallery-video-card__play {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgb(255 255 255 / 92%);
  color: #26332d;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgb(0 0 0 / 16%);
  transition: transform 160ms ease, background-color 160ms ease;
}

.gallery-video-card__preview:has(.gallery-video-card__preview-trigger:hover) .gallery-video-card__play,
.gallery-video-card__preview:has(.gallery-video-card__preview-trigger:focus-visible) .gallery-video-card__play {
  background: #ffffff;
  transform: scale(1.08);
}

.gallery-video-card__play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.video-state {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 9px;
  min-height: 22px;
  padding: 3px 7px;
  background: rgb(255 255 255 / 92%);
  color: #3d4741;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}

.video-state--ready { color: #13734a; }
.video-state--error { background: #fff0ef; color: #a52a23; }
.video-state--processing,
.video-state--uploading,
.video-state--created { color: #2b62a3; }

.gallery-video-card__body {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 9px 10px 8px;
}

.gallery-video-card__body > strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-video-card__body > span,
.gallery-video-card__usage {
  color: var(--color-muted);
  font-size: 10px;
}

.gallery-video-card__usage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 7px;
}

.gallery-video-card__details {
  border-top: 1px solid var(--color-border);
}

.gallery-video-card__details > summary {
  min-height: 30px;
  padding: 6px 10px;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  list-style: none;
}

.gallery-video-card__details > summary:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.gallery-video-card__details-body {
  display: grid;
  gap: 12px;
  padding: 2px 10px 10px;
}

.gallery-video-move-form {
  display: grid;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.gallery-video-move-form label {
  display: grid;
  gap: 5px;
}

.gallery-video-move-form label > span {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.gallery-video-move-form select {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font: inherit;
  font-size: 11px;
}

.gallery-video-move-form .secondary-button {
  width: 100%;
  min-height: 34px;
  font-size: 10px;
}

.gallery-organize-status {
  position: fixed;
  z-index: 1100;
  right: 24px;
  bottom: 24px;
  max-width: min(430px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 13px;
  color: var(--color-accent-strong);
  background: var(--color-accent-soft);
  border: 1px solid color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
  border-radius: 6px;
  box-shadow: 0 8px 24px rgb(15 23 42 / 14%);
  font-size: 12px;
  font-weight: 700;
}

.gallery-organize-status[hidden],
.gallery-organize-status:empty {
  display: none;
}

.gallery-organize-status.is-error {
  color: #8b2e2e;
  background: #fce8e8;
  border-color: #e7b8b4;
}

.video-detail-grid {
  display: grid;
  gap: 7px;
  margin: 0;
}

.video-detail-grid div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.video-detail-grid dt {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.video-detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 10px;
}

.video-usage--compact {
  display: grid;
  gap: 4px;
  padding: 8px 0;
  font-size: 10px;
}

.gallery-video-card .video-delete-form {
  gap: 9px;
}

.gallery-video-card .danger-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 10px;
}

.gallery-preview-open {
  overflow: hidden;
}

.gallery-preview-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 160ms ease;
}

.gallery-preview-modal[hidden] {
  display: none;
}

.gallery-preview-modal.is-open {
  opacity: 1;
}

.gallery-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  background: rgb(18 24 21 / 68%);
  border: 0;
  cursor: default;
}

.gallery-preview-modal__dialog {
  position: relative;
  display: grid;
  width: min(820px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 22px 60px rgb(0 0 0 / 28%);
  transform: translateY(10px) scale(0.985);
  transition: transform 160ms ease;
}

.gallery-preview-modal.is-open .gallery-preview-modal__dialog {
  transform: translateY(0) scale(1);
}

.gallery-preview-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.gallery-preview-modal__header > div {
  min-width: 0;
}

.gallery-preview-modal__header h2 {
  overflow: hidden;
  margin-top: 2px;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-preview-modal__close {
  display: inline-grid;
  flex: 0 0 40px;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  color: var(--color-text);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.gallery-preview-modal__close:hover {
  background: var(--color-surface-subtle);
  border-color: var(--color-border);
}

.gallery-preview-modal__close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.gallery-preview-modal__stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  overflow: hidden;
  background: #101412;
  color: #ffffff;
}

.gallery-preview-modal__stage iframe {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery-preview-modal__loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  font-size: 12px;
}

.gallery-preview-modal__loading[hidden],
.gallery-preview-modal__error[hidden] {
  display: none;
}

.gallery-preview-modal__loading > span {
  width: 28px;
  height: 28px;
  border: 3px solid rgb(255 255 255 / 28%);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: gallery-preview-spin 700ms linear infinite;
}

.gallery-preview-modal__error {
  max-width: 440px;
  margin: 0;
  padding: 20px;
  color: #ffffff;
  text-align: center;
}

@keyframes gallery-preview-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .video-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .gallery-toolbar {
    grid-template-columns: minmax(240px, 1fr) 150px 150px auto;
  }

  .gallery-clear {
    grid-column: 1 / -1;
    justify-self: start;
    padding-top: 0;
  }
}

@media (max-width: 920px) {
  .gallery-toolbar {
    grid-template-columns: minmax(220px, 1fr) repeat(2, 145px);
  }

  .gallery-toolbar .secondary-button {
    grid-column: 3;
  }

  .gallery-upload-tool__body {
    right: -120px;
    width: min(680px, calc(100vw - 32px));
  }
}

@media (max-width: 760px) {
  .gallery-heading {
    align-items: flex-start;
  }

  .gallery-heading__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .gallery-organize-toggle,
  .gallery-heading__actions > .inline-form,
  .gallery-heading__actions > .inline-form button {
    width: 100%;
  }

  .gallery-heading__actions > .inline-form {
    grid-column: 1 / -1;
  }

  .gallery-upload-tool > summary {
    justify-content: center;
    width: 100%;
  }

  .gallery-upload-tool__body {
    position: absolute;
    top: 48px;
    right: auto;
    left: 0;
    grid-template-columns: 1fr;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    padding: 16px;
  }

  .gallery-upload-source,
  .gallery-upload-source + .gallery-upload-source {
    padding: 4px;
    border: 0;
  }

  .gallery-upload-source + .gallery-upload-source {
    margin-top: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
  }

  .gallery-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    min-width: 0;
  }

  .gallery-overview > div {
    min-width: 0;
    min-height: 66px;
    padding: 9px 11px;
  }

  .gallery-overview strong {
    font-size: 16px;
  }

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

  .gallery-search {
    grid-column: 1 / -1;
  }

  .gallery-toolbar .secondary-button {
    grid-column: 1 / -1;
  }

  .upload-activity-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .upload-activity-row__progress {
    grid-column: 2 / -1;
    grid-row: 2;
  }

  .upload-activity-row__details {
    grid-column: 2 / -1;
  }

  .upload-activity > summary > span:first-child {
    display: grid;
    gap: 0;
  }

  .video-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .gallery-library,
  .gallery-owner {
    gap: 24px;
  }

  .gallery-video-card__body {
    min-height: 82px;
    padding: 9px;
  }

  .gallery-video-card__usage {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .gallery-organize-status {
    right: 16px;
    bottom: 78px;
  }
}

@media (max-width: 420px) {
  .gallery-overview > div {
    padding: 8px;
  }

  .gallery-overview span,
  .gallery-overview small {
    font-size: 8px;
  }

  .gallery-overview strong {
    font-size: 14px;
  }

  .gallery-video-card__initials {
    font-size: 20px;
  }

  .gallery-video-card__play {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 680px) {
  .gallery-preview-modal {
    align-items: center;
    padding: 12px;
  }

  .gallery-preview-modal__dialog {
    max-height: calc(100dvh - 24px);
  }

  .gallery-preview-modal__header {
    padding: 11px 12px;
  }

  .gallery-preview-modal__header h2 {
    font-size: 15px;
  }

  .gallery-preview-modal__stage {
    min-height: 0;
  }

}

.teacher-library__body {
  gap: 20px;
}

.teacher-library__toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.teacher-library__search {
  display: grid;
  gap: 6px;
  width: min(420px, 100%);
}

.teacher-library__search > label,
.teacher-library__upload-panel label,
.teacher-library-document__menu-panel label {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.teacher-library__search-control {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
}

.teacher-library__search-control:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.teacher-library__search-control svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 9px;
  color: var(--color-muted);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.teacher-library__search-control input {
  width: 100%;
  min-height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
}

.teacher-library__upload {
  position: relative;
}

.teacher-library__upload > summary {
  cursor: pointer;
  list-style: none;
}

.teacher-library__upload > summary::-webkit-details-marker,
.teacher-library-document__menu > summary::-webkit-details-marker {
  display: none;
}

.teacher-library__upload-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgb(31 45 35 / 16%);
}

.teacher-library__upload-panel form {
  display: grid;
  gap: 12px;
}

.teacher-library__upload-panel input[type="file"] {
  width: 100%;
  min-height: 44px;
  padding: 9px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.teacher-library__upload-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-muted);
  font-size: 11px;
}

.teacher-library__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.teacher-library__summary h2 {
  margin: 0;
  font-size: 17px;
}

.teacher-library__summary span {
  color: var(--color-muted);
  font-size: 12px;
}

.teacher-library__list {
  overflow: visible;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.teacher-library__list-header,
.teacher-library-document {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, .55fr) 90px 44px;
  align-items: center;
}

.teacher-library__list-header {
  min-height: 38px;
  padding: 0 12px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-radius: 7px 7px 0 0;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.teacher-library-document {
  min-height: 68px;
  padding: 8px 12px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  transition: background 140ms ease;
}

.teacher-library-document:hover {
  background: var(--color-surface-subtle);
}

.teacher-library-document__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--color-text);
  text-decoration: none;
}

.teacher-library-document__main > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.teacher-library-document__main strong,
.teacher-library-document__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-library-document__main strong {
  font-size: 13px;
}

.teacher-library-document__main small,
.teacher-library-document__author,
.teacher-library-document__size {
  color: var(--color-muted);
  font-size: 11px;
}

.teacher-library-document__author {
  min-width: 0;
  overflow: hidden;
  padding-right: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-library-document__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  background: #fff0ed;
  color: #b63e30;
  border-radius: 7px;
}

.teacher-library-document__icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.teacher-library-document__menu {
  position: relative;
  justify-self: end;
}

.teacher-library-document__menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  cursor: pointer;
  border-radius: 6px;
  list-style: none;
}

.teacher-library-document__menu > summary:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.teacher-library-document__menu > summary svg {
  width: 20px;
  height: 20px;
}

.teacher-library-document__menu-panel {
  position: absolute;
  z-index: 31;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  gap: 6px;
  width: 260px;
  padding: 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgb(31 45 35 / 16%);
}

.teacher-library-document__menu-panel > a,
.teacher-library-document__menu-panel button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  background: transparent;
  color: var(--color-text);
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.teacher-library-document__menu-panel > a:hover,
.teacher-library-document__menu-panel button:hover {
  background: var(--color-surface-subtle);
}

.teacher-library-document__menu-panel form:first-of-type {
  display: grid;
  gap: 6px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
}

.teacher-library-document__menu-panel input {
  width: 100%;
  min-height: 38px;
}

.teacher-library-document__menu-panel .teacher-library-document__delete {
  color: var(--color-danger, #a52b27);
}

.teacher-library__empty {
  min-height: 240px;
}

.teacher-library-preview__body {
  height: calc(100vh - 245px);
  min-height: 520px;
  margin-top: 18px;
  overflow: hidden;
  background: #eef0ef;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.teacher-library-preview__body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 760px) {
  .teacher-library__toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .teacher-library__search {
    width: 100%;
  }

  .teacher-library__upload > summary {
    width: 100%;
  }

  .teacher-library__upload-panel {
    right: auto;
    left: 0;
    width: 100%;
  }

  .teacher-library__list {
    background: transparent;
    border: 0;
  }

  .teacher-library__list-header {
    display: none;
  }

  .teacher-library-document {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 4px;
    margin-bottom: 8px;
    padding: 11px;
    border: 1px solid var(--color-border);
    border-radius: 7px;
  }

  .teacher-library-document__author,
  .teacher-library-document__size {
    display: none;
  }

  .teacher-library-preview__header {
    align-items: stretch;
    flex-direction: column;
  }

  .teacher-library-preview__header .subject-classroom__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .teacher-library-preview__body {
    height: calc(100vh - 330px);
    min-height: 430px;
    margin-top: 12px;
    border-radius: 0;
  }
}

.video-picker {
  min-width: 0;
}

.video-picker__selection {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.video-picker__selection-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 10%, #ffffff);
  border-radius: 6px;
}

.video-picker__selection-icon svg,
.video-picker__selection .secondary-button svg,
.video-picker-search svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.video-picker__selection-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.video-picker__selection-copy strong,
.video-picker__selection-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-picker__selection-copy strong {
  font-size: 14px;
}

.video-picker__selection-copy small {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
}

.video-picker__selection .secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.video-picker-options {
  border-top: 1px solid var(--color-border);
}

.video-picker-options > summary {
  padding-top: 12px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.video-picker-options > .form-stack {
  margin-top: 14px;
}

body.video-picker-open {
  overflow: hidden;
}

.video-picker-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: 30px;
  place-items: center;
}

.video-picker-modal[hidden] {
  display: none;
}

.video-picker-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgb(15 23 42 / 46%);
  border: 0;
  cursor: default;
}

.video-picker-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto;
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 60px));
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgb(15 23 42 / 24%);
}

.video-picker-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--color-border);
}

.video-picker-modal__header h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.video-picker-modal__header p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
}

.video-picker-modal__header .icon-button {
  flex: 0 0 40px;
}

.video-picker-modal__toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
  gap: 12px;
  padding: 14px 22px;
  background: #f8fafc;
  border-bottom: 1px solid var(--color-border);
}

.video-picker-search {
  position: relative;
}

.video-picker-search svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  color: var(--color-muted);
  transform: translateY(-50%);
}

.video-picker-search input,
.video-picker-folder select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}

.video-picker-search input {
  padding-left: 40px;
}

.video-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 13px;
  min-height: 0;
  padding: 18px 22px 22px;
  overflow-y: auto;
}

.video-picker-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(82px, auto);
  min-width: 0;
  align-content: start;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.video-picker-card[hidden] {
  display: none;
}

.video-picker-card:hover {
  border-color: #98a2b3;
  box-shadow: 0 5px 14px rgb(15 23 42 / 8%);
  transform: translateY(-1px);
}

.video-picker-card:focus-within {
  outline: 3px solid color-mix(in srgb, var(--color-accent) 25%, transparent);
  outline-offset: 2px;
}

.video-picker-card.is-selected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
}

.video-picker-card__preview {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  color: #475467;
  background: #eef1f5;
  font-size: 26px;
  font-weight: 800;
}

.video-picker-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-picker-card__preview > small {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 2px 5px;
  color: #ffffff;
  background: rgb(15 23 42 / 82%);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.video-picker-card__check {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: transparent;
  background: rgb(255 255 255 / 92%);
  border: 1px solid #c7ced8;
  border-radius: 50%;
}

.video-picker-card__check svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.video-picker-card.is-selected .video-picker-card__check {
  color: #ffffff;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.video-picker-card__body {
  display: grid;
  min-width: 0;
  min-height: 82px;
  align-content: start;
  gap: 4px;
  padding: 10px 11px 11px;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
}

.video-picker-card__body small,
.video-picker-card__body time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-picker-card__body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 35px;
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-picker-card__body small,
.video-picker-card__body time {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 500;
}

.video-picker-empty {
  display: grid;
  min-height: 190px;
  padding: 32px;
  place-content: center;
  gap: 6px;
  text-align: center;
}

.video-picker-empty[hidden] {
  display: none;
}

.video-picker-empty span {
  color: var(--color-muted);
  font-size: 13px;
}

.video-picker-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  padding: 12px 22px;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
}

.video-picker-modal__footer > div {
  display: flex;
  gap: 9px;
}

.video-picker-modal__footer .primary-button {
  padding: 0 16px;
}

@media (max-width: 680px) {
  .video-picker__selection {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .video-picker__selection .secondary-button {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .video-picker-modal {
    padding: 0;
    place-items: stretch;
  }

  .video-picker-modal__dialog {
    width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .video-picker-modal__header {
    padding: 16px;
  }

  .video-picker-modal__header h2 {
    font-size: 18px;
  }

  .video-picker-modal__toolbar {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }

  .video-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px 16px 18px;
  }

  .video-picker-modal__footer {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    padding: 10px 16px;
  }

  .video-picker-modal__footer > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-preview-modal,
  .gallery-preview-modal__dialog,
  .gallery-shelf__chevron,
  .gallery-video-card__play {
    transition: none;
  }

  .gallery-preview-modal__loading > span {
    animation-duration: 1400ms;
  }
}

/* Important academy announcements */
.important-announcements {
  border: 1px solid #d7a514;
  border-top: 4px solid #d7a514;
  border-radius: 8px;
  background: #fffdf5;
  overflow: hidden;
}

.important-announcements__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #eadcae;
}

.important-announcements__heading h2,
.important-announcements__heading p {
  margin: 0;
}

.important-announcements__heading h2 {
  font-size: 18px;
}

.important-announcements__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 50%;
  color: #713f12;
  background: #fde68a;
}

.important-announcements__icon svg,
.important-announcement-summary__open svg,
.announcement-management-card__media svg,
.announcement-current-file svg,
.announcement-read-confirmation svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.important-announcements__count {
  display: grid;
  min-width: 28px;
  height: 28px;
  margin-left: auto;
  padding: 0 8px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: #8a5a00;
  font-size: 12px;
  font-weight: 700;
}

.important-announcements__list {
  display: grid;
}

.important-announcement-summary {
  --announcement-accent: #0f766e;
  --announcement-soft: #ecfdf5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #eadcae;
  border-left: 4px solid var(--announcement-accent);
  background: #fff;
}

.important-announcement-summary:last-child {
  border-bottom: 0;
}

.important-announcement-summary--important,
.announcement-management-card--important,
.announcement-detail--important {
  --announcement-accent: #a16207;
  --announcement-soft: #fef3c7;
}

.important-announcement-summary--urgent,
.announcement-management-card--urgent,
.announcement-detail--urgent {
  --announcement-accent: #b42318;
  --announcement-soft: #fee4e2;
}

.important-announcement-summary__level {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 12px;
  color: var(--announcement-accent, #0f766e);
  background: var(--announcement-soft, #ecfdf5);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.important-announcement-summary__copy {
  min-width: 0;
}

.important-announcement-summary__copy h3,
.important-announcement-summary__copy p {
  margin: 0;
}

.important-announcement-summary__copy h3 {
  font-size: 15px;
}

.important-announcement-summary__copy p {
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 13px;
}

.important-announcement-summary__copy small {
  display: block;
  margin-top: 6px;
  color: #667085;
  font-size: 11px;
}

.important-announcement-summary__open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--announcement-accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.important-announcement-summary__open:hover {
  text-decoration: underline;
}

.important-announcement-summary__open svg {
  width: 15px;
  height: 15px;
}

.announcement-management,
.announcement-editor,
.announcement-report,
.announcement-detail {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.announcement-management__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px));
  gap: 1px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-border);
  overflow: hidden;
}

.announcement-management__summary > div {
  display: grid;
  gap: 3px;
  min-width: 200px;
  padding: 13px 16px;
  background: #fff;
}

.announcement-management__summary span {
  color: var(--color-muted);
  font-size: 11px;
}

.announcement-management__summary strong {
  font-size: 21px;
}

.announcement-management__list {
  display: grid;
  gap: 12px;
}

.announcement-management-card {
  --announcement-accent: #0f766e;
  --announcement-soft: #ecfdf5;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--announcement-accent);
  border-radius: 8px;
  background: #fff;
}

.announcement-management-card.announcement-management-card--important,
.announcement-detail.announcement-detail--important {
  --announcement-accent: #a16207;
  --announcement-soft: #fef3c7;
}

.announcement-management-card.announcement-management-card--urgent,
.announcement-detail.announcement-detail--urgent {
  --announcement-accent: #b42318;
  --announcement-soft: #fee4e2;
}

.announcement-management-card > header,
.announcement-management-card > footer,
.announcement-management-card > p,
.announcement-management-card__media,
.announcement-management-card__tracking {
  padding-right: 18px;
  padding-left: 18px;
}

.announcement-management-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
}

.announcement-management-card__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 0;
}

.announcement-management-card__title h2 {
  margin: 0;
  font-size: 17px;
}

.announcement-management-card > p {
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.announcement-management-card__media {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  color: #667085;
  font-size: 11px;
}

.announcement-management-card__media span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.announcement-management-card__media time {
  margin-left: auto;
}

.announcement-management-card__tracking {
  display: grid;
  grid-template-columns: 100px 100px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid var(--color-border);
  background: #fafbf9;
}

.announcement-management-card__tracking div {
  display: grid;
  gap: 1px;
}

.announcement-management-card__tracking strong {
  font-size: 17px;
}

.announcement-management-card__tracking span {
  color: var(--color-muted);
  font-size: 11px;
}

.announcement-management-card__tracking a {
  justify-self: end;
  color: var(--announcement-accent);
  font-size: 12px;
  font-weight: 700;
}

.announcement-management-card > footer {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 14px;
  border-top: 1px solid var(--color-border);
}

.announcement-management-card > footer form {
  margin: 0;
}

.announcement-management-card > footer .button {
  min-height: 36px;
}

.announcement-form {
  display: grid;
  gap: 14px;
}

.announcement-management .page-heading .button {
  min-width: 148px;
  white-space: nowrap;
}

.announcement-form__section,
.announcement-form__reset {
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.announcement-form__section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.announcement-form__section-heading > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 6px;
  color: #0f766e;
  background: #e7f5f2;
  font-size: 11px;
  font-weight: 750;
}

.announcement-form__section-heading h2,
.announcement-form__section-heading p {
  margin: 0;
}

.announcement-form__section-heading h2 {
  font-size: 16px;
}

.announcement-form__section-heading p {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 12px;
}

.announcement-current-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fafbf9;
  font-size: 12px;
}

.announcement-current-file span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.announcement-remove-file {
  margin-top: 10px;
}

.announcement-form__reset small {
  display: block;
  margin: 5px 0 0 28px;
  color: var(--color-muted);
}

.announcement-form__actions {
  justify-content: flex-end;
}

.announcement-detail {
  --announcement-accent: #0f766e;
  --announcement-soft: #ecfdf5;
}

.announcement-detail__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 3px solid var(--announcement-accent);
}

.announcement-detail__header h1 {
  margin: 9px 0 5px;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: 0;
}

.announcement-detail__header time {
  color: var(--color-muted);
  font-size: 12px;
}

.announcement-detail__message {
  padding: 24px 0;
  color: #29313a;
  font-size: 15px;
  line-height: 1.65;
}

.announcement-detail__message p {
  margin: 0 0 12px;
}

.announcement-detail__section {
  padding: 22px 0;
  border-top: 1px solid var(--color-border);
}

.announcement-detail__section-heading {
  margin-bottom: 14px;
}

.announcement-detail__section-heading h2,
.announcement-detail__section-heading p {
  margin: 0;
}

.announcement-detail__section-heading h2 {
  margin-top: 3px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.announcement-detail__section-heading--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.announcement-detail__video {
  width: min(900px, 100%);
  margin: 0 auto;
}

.announcement-detail__pdf {
  width: 100%;
  height: min(72vh, 820px);
  min-height: 520px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #f5f6f4;
}

.announcement-detail__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--color-border);
}

.announcement-detail__actions .button svg,
.announcement-detail__section-heading .button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.announcement-read-confirmation {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: #067647;
  font-size: 13px;
  font-weight: 700;
}

.announcement-report__filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px auto;
  gap: 10px;
  margin-bottom: 14px;
}

.announcement-report__filters select {
  min-height: 42px;
}

.announcement-report__table td:first-child strong {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .important-announcement-summary {
    grid-template-columns: 1fr auto;
    gap: 9px 12px;
  }

  .important-announcement-summary__level {
    grid-column: 1;
  }

  .important-announcement-summary__copy {
    grid-column: 1 / -1;
  }

  .important-announcement-summary__open {
    grid-column: 2;
    grid-row: 1;
  }

  .announcement-management__summary {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .announcement-management__summary > div {
    min-width: 0;
  }

  .announcement-management-card__media time {
    width: 100%;
    margin-left: 0;
  }

  .announcement-management-card__tracking {
    grid-template-columns: repeat(2, 1fr);
  }

  .announcement-management-card__tracking a {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .announcement-management-card > footer {
    grid-template-columns: 1fr 1fr;
  }

  .announcement-management-card > footer > span {
    display: none;
  }

  .announcement-management-card > footer .button {
    width: 100%;
  }

  .announcement-detail__header,
  .announcement-detail__section-heading--split,
  .announcement-detail__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .announcement-detail__header .button,
  .announcement-detail__section-heading--split .button,
  .announcement-detail__actions .button {
    width: 100%;
  }

  .announcement-read-confirmation {
    margin-right: 0;
  }

  .announcement-detail__pdf {
    min-height: 460px;
  }

  .announcement-report__filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .important-announcements__heading,
  .important-announcement-summary,
  .announcement-management-card > header,
  .announcement-management-card > footer,
  .announcement-management-card > p,
  .announcement-management-card__media,
  .announcement-management-card__tracking,
  .announcement-form__section,
  .announcement-form__reset {
    padding-right: 14px;
    padding-left: 14px;
  }

  .announcement-management-card__title {
    align-items: flex-start;
  }

  .announcement-management-card > footer {
    grid-template-columns: 1fr;
  }

  .announcement-detail__pdf {
    min-height: 390px;
  }
}

/* Contextual video discussions */
.secure-player-heading__actions,
.discussion-toggle,
.discussion-compose__footer,
.discussion-message__actions,
.discussion-message__actions form,
.discussion-edit > div {
  display: flex;
  align-items: center;
}

.secure-player-heading__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 9px;
}

.discussion-toggle {
  gap: 7px;
  padding: 0 13px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.discussion-toggle:hover,
.discussion-toggle[aria-expanded="true"] {
  background: var(--color-brand-primary-soft, #e8f4f1);
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 38%, white);
}

.discussion-toggle svg,
.discussion-section-label svg,
.discussion-empty svg,
.discussion-time-button svg,
.discussion-timestamp svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.discussion-toggle svg {
  width: 18px;
  height: 18px;
}

.discussion-toggle span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--color-surface-subtle, #f2f4f7);
  border-radius: 10px;
  font-size: 11px;
}

.secure-player-workspace {
  min-width: 0;
}

.secure-player-workspace--discussion-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  align-items: start;
  gap: 14px;
}

.video-discussion {
  position: sticky;
  top: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  height: min(680px, calc(100vh - 120px));
  min-height: 480px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.video-discussion[hidden] {
  display: none;
}

.video-discussion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px 10px 15px;
  border-bottom: 1px solid var(--color-border);
}

.video-discussion__header > div,
.discussion-author {
  display: grid;
  min-width: 0;
}

.video-discussion__header span {
  font-size: 14px;
  font-weight: 750;
}

.video-discussion__header small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 11px;
}

.video-discussion__header .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.video-discussion__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.discussion-pinned {
  padding: 12px 13px 4px;
  background: #fff9e8;
  border-bottom: 1px solid #eadcae;
}

.discussion-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #755a00;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.discussion-section-label svg {
  width: 14px;
  height: 14px;
}

.discussion-feed {
  flex: 1 0 auto;
  padding: 0 13px;
}

.discussion-message {
  padding: 13px 0;
  border-bottom: 1px solid var(--color-border);
}

.discussion-message--pinned {
  border-bottom-color: #eadcae;
}

.discussion-message__header {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.discussion-avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: #eef1f4;
  color: #4a5562;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.discussion-message--staff > .discussion-message__header .discussion-avatar {
  background: var(--color-brand-primary-soft, #e8f4f1);
  color: var(--color-accent);
}

.discussion-author strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discussion-author small {
  width: max-content;
  margin-top: 2px;
  color: var(--color-accent);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.discussion-message__header time {
  color: var(--color-muted);
  font-size: 10px;
}

.discussion-message__text,
.discussion-message__deleted {
  margin: 8px 0 0 38px;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

.discussion-message__deleted {
  color: var(--color-muted);
  font-style: italic;
}

.discussion-message__edited {
  display: block;
  margin: 3px 0 0 38px;
  color: var(--color-muted);
  font-size: 9px;
}

.discussion-timestamp {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  margin: 8px 0 0 38px;
  padding: 0 8px;
  background: var(--color-brand-primary-soft, #e8f4f1);
  color: var(--color-accent);
  border: 0;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.discussion-timestamp svg {
  width: 13px;
  height: 13px;
}

.discussion-inline-time {
  display: inline;
  padding: 0;
  background: transparent;
  color: var(--color-accent);
  border: 0;
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.discussion-message__actions {
  gap: 11px;
  margin: 7px 0 0 38px;
}

.discussion-message__actions button,
.discussion-edit button,
.discussion-replying button {
  padding: 0;
  background: transparent;
  color: var(--color-muted);
  border: 0;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.discussion-message__actions button:hover,
.discussion-replying button:hover {
  color: var(--color-accent);
}

.discussion-replies {
  margin: 10px 0 0 30px;
  padding-left: 10px;
  border-left: 2px solid color-mix(in srgb, var(--color-accent) 25%, white);
}

.discussion-replies .discussion-message:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.discussion-empty {
  display: grid;
  justify-items: center;
  padding: 42px 24px;
  color: var(--color-muted);
  text-align: center;
}

.discussion-empty svg {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
}

.discussion-empty strong {
  color: var(--color-text);
  font-size: 13px;
}

.discussion-empty span {
  max-width: 240px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.45;
}

.discussion-compose {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 12px 13px;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.discussion-compose > label,
.discussion-edit > label {
  font-size: 10px;
  font-weight: 750;
}

.discussion-compose textarea,
.discussion-edit textarea {
  width: 100%;
  min-height: 72px;
  max-height: 150px;
  padding: 9px 10px;
  resize: vertical;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
}

.discussion-compose textarea:focus,
.discussion-edit textarea:focus {
  border-color: var(--color-accent);
  outline: 3px solid color-mix(in srgb, var(--color-accent) 18%, transparent);
}

.discussion-compose__footer {
  justify-content: space-between;
  gap: 8px;
}

.discussion-time-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 7px;
  background: transparent;
  color: var(--color-muted);
  border: 0;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.discussion-time-button svg {
  width: 16px;
  height: 16px;
}

.discussion-send {
  min-height: 34px;
  padding: 0 13px;
  font-size: 11px;
}

.discussion-replying {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: var(--color-brand-primary-soft, #e8f4f1);
  color: var(--color-accent);
  border-radius: 4px;
  font-size: 10px;
}

.discussion-replying[hidden] {
  display: none;
}

.discussion-form-error {
  margin: 0;
  color: #b42318;
  font-size: 10px;
}

.discussion-edit {
  display: grid;
  gap: 7px;
  margin: 9px 0 0 38px;
}

.discussion-edit[hidden] {
  display: none;
}

.discussion-edit > div {
  justify-content: flex-end;
  gap: 12px;
}

.discussion-edit .primary-button {
  min-height: 30px;
  padding: 0 11px;
  color: #fff;
}

@media (max-width: 1100px) {
  .secure-player-workspace--discussion-open {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 860px) {
  .secure-player-workspace--discussion-open {
    grid-template-columns: 1fr;
  }

  .video-discussion {
    position: static;
    width: 100%;
    height: min(620px, 72vh);
    min-height: 440px;
  }
}

@media (max-width: 760px) {
  .secure-player-heading__actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .secure-player-heading__actions > * {
    flex: 1 1 auto;
  }

  .video-discussion {
    height: min(600px, 75vh);
    border-radius: 6px;
  }

  .discussion-message__text,
  .discussion-message__deleted,
  .discussion-message__actions,
  .discussion-message__edited,
  .discussion-timestamp {
    margin-left: 0;
  }
}

/* Homework */
.homework-page {
  width: min(1240px, 100%);
}

.homework-heading__review {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 5px 14px;
  min-width: 190px;
  padding: 12px 15px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
}

.homework-heading__review span {
  grid-row: 1 / 3;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.homework-heading__review strong {
  font-size: 24px;
  line-height: 1;
}

.homework-subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.homework-subject-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 13px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.homework-subject-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 5px 16px rgb(31 41 55 / 7%);
  transform: translateY(-1px);
}

.homework-subject-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.homework-subject-card .subject-swatch {
  width: 44px;
  height: 44px;
}

.homework-subject-card__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.homework-subject-card__body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.homework-subject-card__body small {
  color: var(--color-muted);
}

.homework-subject-card > svg,
.homework-block-card__arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.homework-block-stack {
  display: grid;
  gap: 13px;
}

.homework-block-card--manager {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  min-height: 88px;
  padding: 16px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.homework-block-card--manager:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 14px rgb(31 41 55 / 6%);
}

.homework-block-card__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.homework-block-card__heading > span:last-child,
.homework-block-card__metric {
  display: grid;
  gap: 3px;
}

.homework-block-card__heading strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.homework-block-card__heading small,
.homework-block-card__metric small {
  color: var(--color-muted);
  font-size: 11px;
}

.homework-block-card__overview {
  display: grid;
  grid-template-columns: auto 72px 82px;
  align-items: center;
  gap: 0;
}

.homework-block-card__overview > .request-status {
  justify-self: end;
  margin-right: 14px;
}

.homework-block-card__metric {
  min-height: 42px;
  align-content: center;
  padding: 0 10px;
  border-left: 1px solid var(--color-border);
  text-align: center;
}

.homework-block-card__metric strong {
  font-size: 15px;
  line-height: 1;
}

.homework-block-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 42px;
  padding-left: 16px;
  border-left: 1px solid var(--color-border);
}

.homework-mode-icon,
.homework-task-row__icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 6px;
}

.homework-mode-icon svg,
.homework-task-row__icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.homework-student-block {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.homework-student-block__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border);
}

.homework-student-block__heading h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.homework-student-block__heading p {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
}

.homework-student-block__heading > span {
  padding: 5px 8px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.homework-task-list {
  display: grid;
}

.homework-task-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border);
}

.homework-task-row--link {
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.homework-task-row--link:hover {
  background: var(--color-accent-soft);
}

.homework-task-row--link:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.homework-task-row__arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.homework-task-row:last-child {
  border-bottom: 0;
}

.homework-task-row--locked {
  color: var(--color-muted);
  background: #fafbfc;
}

.homework-task-row--locked .homework-task-row__icon {
  background: #f0f2f5;
  color: #7a8494;
}

.homework-task-row__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.homework-task-row__body small,
.homework-task-row__due {
  color: var(--color-muted);
  font-size: 12px;
}

.homework-task-list__empty {
  margin: 0;
  padding: 22px 20px;
  color: var(--color-muted);
}

.homework-management-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.homework-management-list__header,
.homework-management-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 90px 90px 230px;
  align-items: center;
  gap: 16px;
}

.homework-management-list__header {
  min-height: 38px;
  padding: 0 16px;
  background: #fafbfc;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.homework-management-row {
  min-height: 70px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.homework-management-row:last-child {
  border-bottom: 0;
}

.homework-management-row__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.homework-management-row__identity > span:last-child,
.homework-management-row__metric {
  display: grid;
  gap: 3px;
}

.homework-management-row__identity small,
.homework-management-row__metric small {
  color: var(--color-muted);
  font-size: 11px;
}

.homework-management-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.homework-management-row__actions a {
  color: var(--color-accent-strong);
  text-decoration: none;
}

.homework-order-actions {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-height: 38px;
  padding: 2px;
  background: #f7f8fa;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.homework-reorder-ready.is-reordering .homework-order-actions {
  display: inline-flex;
}

.homework-order-actions form {
  display: contents;
}

.homework-quick-publication {
  display: inline-flex;
  margin: 0;
}

.homework-order-actions button,
.homework-card-icon-action,
.homework-quick-publication button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--color-surface);
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  cursor: pointer;
}

.homework-order-actions button {
  width: 30px;
  height: 30px;
  background: transparent;
  border-color: transparent;
}

.homework-order-actions button:hover:not(:disabled),
.homework-card-icon-action:hover,
.homework-quick-publication button:hover {
  color: var(--color-accent-strong);
  border-color: var(--color-accent);
}

.homework-order-actions button:focus-visible,
.homework-card-icon-action:focus-visible,
.homework-quick-publication button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.homework-order-actions button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.homework-order-actions svg,
.homework-card-icon-action svg,
.homework-quick-publication svg,
.homework-reorder-toggle svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.homework-card-icon-action {
  text-decoration: none;
}

.homework-order-position {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 5px;
  min-width: 58px;
  height: 30px;
  padding: 0 7px;
  color: var(--color-text);
  background: #ffffff;
  border-radius: 4px;
}

.homework-order-position small {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 650;
}

.homework-order-position strong {
  font-size: 11px;
  font-weight: 800;
}

.homework-reorder-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 12px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.homework-reorder-ready .homework-reorder-toggle {
  display: inline-flex;
}

.homework-reorder-toggle:hover,
.homework-reorder-toggle[aria-pressed="true"] {
  color: var(--color-accent-strong);
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}

.homework-reorder-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.homework-reorder-toggle:disabled {
  opacity: .55;
  cursor: wait;
}

.homework-reorder-status {
  display: none;
  min-height: 20px;
  margin: -10px 0 -6px;
  color: var(--color-accent-strong);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.homework-reorder-status:not(:empty) {
  display: block;
}

.is-reordering .homework-block-card--manager,
.is-reordering .homework-management-row {
  border-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-border));
  box-shadow: 0 3px 12px rgb(31 41 55 / 6%);
}

.is-reorder-busy [data-reorder-list] {
  cursor: progress;
}

@keyframes homework-reorder-highlight {
  from { background: var(--color-accent-soft); transform: translateY(-2px); }
  to { background: var(--color-surface); transform: translateY(0); }
}

.homework-reorder-moved {
  animation: homework-reorder-highlight 480ms ease-out;
}

.homework-task-index {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.homework-form-page {
  width: min(980px, 100%);
}

.homework-settings-list {
  display: grid;
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.homework-settings-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.homework-settings-option:last-child {
  border-bottom: 0;
}

.homework-settings-option > span {
  display: grid;
  gap: 4px;
}

.homework-settings-option small,
.homework-settings-note {
  color: var(--color-muted);
  font-size: 12px;
}

.homework-settings-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--color-accent-strong);
}

.homework-settings-note {
  margin: 0;
}

.homework-editor-form,
.homework-editor-section {
  display: grid;
  gap: 22px;
}

.homework-editor-form {
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.homework-editor-section {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.homework-editor-section > header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.homework-editor-section > header > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 800;
}

.homework-editor-section h2 {
  margin-bottom: 3px;
  font-size: 16px;
}

.homework-editor-section header p {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
}

.homework-editor-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.homework-editor-form__grid > label,
.homework-video-selector {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.homework-editor-form__grid input:not([type="checkbox"]),
.homework-editor-form__grid textarea,
.homework-editor-form__grid select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}

.homework-editor-form__grid input:focus,
.homework-editor-form__grid textarea:focus,
.homework-editor-form__grid select:focus {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent-soft);
}

.homework-editor-form__grid label > small {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 400;
}

.homework-editor-form__wide {
  grid-column: 1 / -1;
}

.homework-video-selector > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.homework-video-selector > div label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  background: #fafbfc;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-weight: 600;
}

.homework-editor-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.homework-editor-form__actions .primary-button {
  padding: 0 18px;
}

.request-status--published {
  background: #e6f4eb;
  color: #23633c;
}

.request-status--scheduled {
  background: #e8f0fb;
  color: #285c9b;
}

.request-status--closed,
.request-status--archived {
  background: #eef0ed;
  color: #505851;
}

.request-status--pending_review,
.request-status--resubmission_requested {
  background: #fff3d7;
  color: #76520c;
}

.request-status--approved,
.request-status--submitted {
  background: #e6f4eb;
  color: #23633c;
}

.request-status--rejected {
  background: #fce8e8;
  color: #8b2e2e;
}

.homework-task-page,
.homework-review-page {
  width: min(1040px, 100%);
}

.homework-task-panel,
.homework-quiz-form,
.homework-history,
.homework-result,
.homework-playback-start {
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.homework-task-panel,
.homework-submission-form,
.homework-review-form {
  display: grid;
  gap: 17px;
}

.homework-task-panel h2,
.homework-question-card legend,
.homework-review-form h2 {
  font-size: 16px;
}

.homework-rich-text p:last-child,
.homework-task-panel > p:last-child {
  margin-bottom: 0;
}

.homework-task-panel--muted {
  background: #fafbfc;
  color: var(--color-muted);
}

.homework-panel-heading,
.homework-submission-form > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.homework-panel-heading p,
.homework-submission-form header p {
  margin: 3px 0 0;
  color: var(--color-muted);
  font-size: 12px;
}

.homework-panel-heading > span,
.homework-submission-form header > span {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.homework-file-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.homework-file-list a {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  color: inherit;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-decoration: none;
}

.homework-file-list a:hover {
  border-color: var(--color-accent);
}

.homework-file-list small {
  color: var(--color-muted);
}

.homework-submission-form label,
.homework-review-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.homework-submission-form input[type="file"],
.homework-submission-form textarea,
.homework-review-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}

.homework-submission-form label small {
  color: var(--color-muted);
  font-weight: 400;
}

.homework-quiz-form {
  display: grid;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
}

.homework-question-card {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.homework-question-card legend {
  width: 100%;
  padding: 0 0 12px;
  font-weight: 750;
}

.homework-question-card > div {
  display: grid;
  gap: 8px;
}

.homework-question-card label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  background: #fafbfc;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.homework-question-card > input,
.homework-question-card > textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font: inherit;
}

.homework-question-card img {
  display: block;
  width: min(520px, 100%);
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.homework-quiz-form > footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 8px;
}

.homework-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-left: 4px solid var(--color-accent);
}

.homework-result h2,
.homework-result p {
  margin-bottom: 3px;
}

.homework-result > strong {
  font-size: 26px;
}

.homework-result__note {
  grid-column: 1 / -1;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.homework-correction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.homework-correction-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  color: inherit;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-decoration: none;
}

.homework-correction-card:hover {
  border-color: var(--color-accent);
}

.homework-correction-card__icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.homework-correction-card > span:last-child {
  display: grid;
  gap: 3px;
}

.homework-correction-card small {
  color: var(--color-muted);
}

.homework-history summary {
  cursor: pointer;
  font-weight: 750;
}

.homework-history > div {
  display: grid;
  margin-top: 14px;
}

.homework-history article {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
}

.homework-question-list,
.homework-review-list,
.homework-attempt-table,
.homework-answer-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.homework-question-list > article,
.homework-review-list > a,
.homework-attempt-table > a,
.homework-answer-list > article {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  color: inherit;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.homework-question-list > article:last-child,
.homework-review-list > a:last-child,
.homework-attempt-table > a:last-child,
.homework-answer-list > article:last-child {
  border-bottom: 0;
}

.homework-question-list > article {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.homework-question-list article > div:not(.homework-question-list__actions),
.homework-review-list a > span,
.homework-answer-list article > div {
  display: grid;
  gap: 3px;
}

.homework-question-list small,
.homework-review-list small {
  color: var(--color-muted);
}

.homework-question-list__actions {
  display: flex;
  gap: 10px;
}

.homework-question-list__actions form {
  margin: 0;
}

.homework-question-list__actions a,
.homework-question-list__actions button {
  padding: 0;
  background: none;
  color: var(--color-accent-strong);
  border: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.homework-review-list > a {
  grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) auto auto;
}

.homework-attempt-table > a {
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
}

.homework-answer-list > article {
  grid-template-columns: minmax(0, 1fr) auto;
}

.homework-allowance-list {
  display: grid;
  gap: 9px;
}

.homework-allowance-list article {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto minmax(260px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fafbfc;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.homework-allowance-list article > div {
  display: grid;
  gap: 3px;
}

.homework-allowance-list small,
.homework-allowance-list article > span {
  color: var(--color-muted);
  font-size: 12px;
}

.homework-allowance-list form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 7px;
}

.homework-allowance-list input,
.homework-allowance-list button {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font: inherit;
}

.homework-allowance-list button {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  font-weight: 750;
  cursor: pointer;
}

.homework-review-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.homework-open-review {
  display: grid;
  gap: 10px;
  padding: 15px;
  background: #fafbfc;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.homework-open-review h3,
.homework-open-review p {
  margin: 0;
}

.homework-open-review h3 {
  font-size: 14px;
}

.homework-open-review p {
  color: var(--color-muted);
  font-size: 12px;
}

.homework-open-review select {
  min-height: 40px;
  padding: 8px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font: inherit;
}

.homework-review-form fieldset > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 9px;
}

.homework-review-form fieldset label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  background: #fafbfc;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.homework-playback-start {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 190px;
}

.homework-playback-start h2 {
  margin-bottom: 8px;
}

.homework-playback-start p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--color-muted);
}

@media (max-width: 980px) {
  .homework-subject-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .homework-block-card--manager {
    grid-template-columns: minmax(200px, 1fr) auto;
    gap: 13px 18px;
  }

  .homework-block-card--manager > .homework-block-card__actions {
    grid-column: 1 / -1;
    min-height: 0;
    padding-top: 10px;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    border-left: 0;
  }

  .homework-management-list__header,
  .homework-management-row {
    grid-template-columns: minmax(220px, 1fr) 100px 75px 210px;
  }

  .homework-management-list__header span:nth-child(4),
  .homework-management-row__metric:nth-of-type(4) {
    display: none;
  }
}

@media (max-width: 680px) {
  .homework-subject-grid,
  .homework-editor-form__grid,
  .homework-video-selector > div {
    grid-template-columns: 1fr;
  }

  .homework-editor-form__wide {
    grid-column: 1;
  }

  .homework-heading__review {
    width: 100%;
  }

  .homework-block-card--manager {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }

  .homework-block-card__overview {
    grid-template-columns: minmax(84px, 1fr) 68px 78px;
    width: 100%;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
  }

  .homework-block-card__overview > .request-status {
    justify-self: start;
    margin: 0 10px 0 0;
  }

  .homework-block-card--manager > .homework-block-card__actions {
    padding-top: 0;
    border-top: 0;
  }

  .homework-student-block__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .homework-task-row {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 12px 14px;
  }

  .homework-task-row__due {
    grid-column: 2;
  }

  .homework-task-row__arrow {
    display: none;
  }

  .homework-management-list {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .homework-management-list__header {
    display: none;
  }

  .homework-management-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    margin-bottom: 9px;
    padding: 13px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 7px;
  }

  .homework-management-row__identity {
    grid-column: 1 / -1;
  }

  .homework-management-row__metric {
    display: none;
  }

  .homework-management-row__actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .homework-settings-option {
    align-items: flex-start;
  }

  .homework-editor-form {
    padding: 18px 15px;
  }

  .homework-editor-form__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .homework-editor-form__actions > * {
    width: 100%;
  }

  .homework-file-list,
  .homework-correction-grid {
    grid-template-columns: 1fr;
  }

  .homework-panel-heading,
  .homework-submission-form > header,
  .homework-playback-start {
    align-items: stretch;
    flex-direction: column;
  }

  .homework-quiz-form > footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .homework-quiz-form > footer > *,
  .homework-playback-start button {
    width: 100%;
  }

  .homework-history article {
    grid-template-columns: 1fr auto;
  }

  .homework-review-list > a,
  .homework-attempt-table > a,
  .homework-answer-list > article,
  .homework-allowance-list article {
    grid-template-columns: 1fr;
  }

  .homework-allowance-list form {
    grid-template-columns: 1fr auto;
  }

  .homework-question-list > article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .homework-question-list__actions {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .homework-subject-card,
  .homework-block-card--manager {
    transition-duration: .01ms !important;
  }
}

/* Material detail and editor */
.material-heading {
  align-items: flex-end;
}

.material-content {
  display: grid;
  gap: 11px;
}

.material-content__heading,
.material-editor-section-heading,
.material-editor-settings__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.material-content__heading h2,
.material-editor-section-heading h2,
.material-editor-settings__heading h2 {
  margin: 0;
  font-size: 16px;
}

.material-content__heading > span,
.material-editor-section-heading > div > span {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
}

.material-editor-section-heading > div {
  display: grid;
}

.material-resource-list,
.lesson-editor-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.material-resource-row {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1fr) minmax(160px, .8fr) 36px;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

.material-resource-row:last-child {
  border-bottom: 0;
}

.material-resource-row:hover {
  background: #fafbf9;
}

.material-resource-row__type {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-radius: 6px;
}

.material-resource-row__type--video {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

.material-resource-row__type svg,
.material-resource-row__action svg,
.material-add-tool svg,
.content-source svg,
.lesson-editor-row svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.material-resource-row__main {
  display: grid;
  min-width: 0;
}

.material-resource-row__main strong,
.material-resource-row__main small,
.material-resource-row__description {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-resource-row__main strong {
  font-size: 13px;
}

.material-resource-row__main small,
.material-resource-row__description {
  color: var(--color-muted);
  font-size: 11px;
}

.material-resource-row__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--color-accent-strong);
  border: 1px solid var(--color-border);
  border-radius: 50%;
}

.material-resource-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 24px;
  color: var(--color-muted);
  text-align: center;
}

.material-resource-empty h2 {
  margin: 0;
  font-size: 14px;
}

.material-editor-heading {
  align-items: flex-end;
}

.material-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 24px;
  align-items: start;
}

.material-editor-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.material-editor-settings {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.material-create-surface {
  width: min(720px, 100%);
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.material-settings-form {
  gap: 14px;
}

.material-settings-form label,
.content-source__form label,
.lesson-editor-form label {
  gap: 6px;
  color: #414943;
  font-size: 11px;
}

.material-settings-form input,
.material-settings-form textarea,
.material-settings-form select,
.content-source__form input,
.content-source__form textarea,
.content-source__form select,
.lesson-editor-form input,
.lesson-editor-form textarea,
.lesson-editor-form select {
  min-height: 40px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 12px;
}

.material-settings-form textarea,
.content-source__form textarea,
.lesson-editor-form textarea {
  min-height: 72px;
}

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

.material-student-access {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.material-student-access > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
}

.material-student-access > summary small {
  margin-left: 5px;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 650;
}

.material-student-access__body {
  border-top: 1px solid var(--color-border);
}

.material-student-access__toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) max-content;
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: var(--color-surface-subtle);
}

.material-student-access__toolbar input {
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  background: var(--color-surface);
}

.material-student-access__bulk-actions {
  display: inline-flex;
  gap: 5px;
}

.material-student-access__bulk-actions button {
  min-height: 34px;
  padding: 0 9px;
  background: var(--color-surface);
  color: var(--color-accent-strong);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.material-student-access__bulk-actions button:hover {
  border-color: var(--color-accent);
}

.material-student-access__bulk-actions button:focus-visible,
.material-student-access__toolbar input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.material-student-access__empty {
  margin: 0;
  padding: 12px;
  color: var(--color-muted);
  font-size: 11px;
  text-align: center;
}

.material-student-access > summary::-webkit-details-marker,
.material-add-tool > summary::-webkit-details-marker,
.content-source > summary::-webkit-details-marker,
.lesson-editor-row > summary::-webkit-details-marker,
.material-upload-activity > summary::-webkit-details-marker {
  display: none;
}

.checkbox-list--compact {
  max-height: 220px;
  padding: 8px;
}

.checkbox-list--compact label {
  padding: 7px;
  font-size: 10px;
}

.material-add-tool {
  position: relative;
  z-index: 11;
}

.material-add-tool > summary {
  gap: 8px;
  padding: 0 13px;
  cursor: pointer;
  list-style: none;
}

.material-add-tool__body {
  position: absolute;
  top: 48px;
  right: 0;
  width: min(660px, calc(100vw - 48px));
  max-height: min(690px, calc(100vh - 150px));
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgb(25 35 29 / 16%);
}

.content-source {
  border-bottom: 1px solid var(--color-border);
}

.content-source:last-child {
  border-bottom: 0;
}

.content-source > summary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 60px;
  padding: 11px 15px;
  cursor: pointer;
  list-style: none;
}

.content-source > summary:hover {
  background: var(--color-surface-subtle);
}

.content-source > summary > span:last-child {
  display: grid;
}

.content-source > summary strong {
  font-size: 12px;
}

.content-source > summary small {
  color: var(--color-muted);
  font-size: 10px;
}

.content-source--advanced > summary {
  color: var(--color-muted);
}

.content-source__form {
  gap: 12px;
  padding: 4px 15px 18px 60px;
}

.content-source .upload-progress-list {
  margin: 0 15px 18px 60px;
}

.material-upload-activity {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.material-upload-activity > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 9px 13px;
  cursor: pointer;
  list-style: none;
}

.material-upload-activity > summary > span:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.material-upload-activity > summary strong {
  font-size: 12px;
}

.material-upload-activity > summary small {
  color: var(--color-muted);
  font-size: 10px;
}

.material-upload-activity > div {
  border-top: 1px solid var(--color-border);
}

.material-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--color-border);
}

.material-upload-row:last-child {
  border-bottom: 0;
}

.material-upload-row > span:first-child {
  display: grid;
  min-width: 0;
}

.material-upload-row strong,
.material-upload-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-upload-row strong { font-size: 11px; }
.material-upload-row small { color: var(--color-muted); font-size: 10px; }
.material-upload-row .form-errors { grid-column: 1 / -1; margin: 0; }

.lesson-editor-row {
  border-bottom: 1px solid var(--color-border);
}

.lesson-editor-row:last-child {
  border-bottom: 0;
}

.lesson-editor-row > summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 20px;
  gap: 11px;
  align-items: center;
  min-height: 62px;
  padding: 9px 13px;
  cursor: pointer;
  list-style: none;
}

.lesson-editor-row > summary:hover {
  background: #fafbf9;
}

.lesson-editor-row__title {
  display: grid;
  min-width: 0;
}

.lesson-editor-row__title strong,
.lesson-editor-row__title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-editor-row__title strong { font-size: 12px; }
.lesson-editor-row__title small { color: var(--color-muted); font-size: 10px; }
.lesson-editor-row__chevron { color: var(--color-muted); }
.lesson-editor-row[open] .lesson-editor-row__chevron { transform: rotate(180deg); }

.lesson-editor-form {
  gap: 12px;
  padding: 15px 18px 18px 60px;
  background: #fafbf9;
  border-top: 1px solid var(--color-border);
}

.lesson-editor-form__actions {
  align-items: center;
}

.lesson-editor-form__actions .danger-button,
.lesson-editor-form__actions .secondary-button,
.lesson-editor-form__actions .secondary-link-button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 11px;
}

@media (max-width: 1040px) {
  .material-editor-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

@media (max-width: 860px) {
  .material-editor-layout {
    grid-template-columns: 1fr;
  }

  .material-editor-settings {
    position: static;
  }
}

@media (max-width: 760px) {
  .material-heading,
  .material-editor-heading {
    align-items: flex-start;
  }

  .material-resource-row {
    grid-template-columns: 36px minmax(0, 1fr) 34px;
    gap: 10px;
    padding: 10px 11px;
  }

  .material-resource-row__description {
    display: none;
  }

  .material-editor-section-heading {
    align-items: flex-start;
  }

  .material-add-tool__body {
    position: absolute;
    top: 48px;
    right: 0;
    width: calc(100vw - 32px);
    max-height: calc(100vh - 150px);
  }

  .content-source__form {
    padding: 4px 13px 16px;
  }

  .content-source .upload-progress-list {
    margin: 0 13px 16px;
  }

  .lesson-editor-form {
    padding: 14px;
  }

  .material-editor-settings {
    padding: 15px;
  }

  .material-create-surface {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .compact-form-grid {
    grid-template-columns: 1fr;
  }

  .material-student-access__toolbar {
    grid-template-columns: 1fr;
  }

  .material-student-access__bulk-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .lesson-editor-row > summary {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
  }

  .lesson-editor-row > summary .status-badge {
    display: none;
  }

  .lesson-editor-form__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .lesson-editor-form__actions .danger-button {
    grid-column: 1 / -1;
  }
}

/* Density, course browser and Classroom-style subject view */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-fade-out 100ms ease both;
}

::view-transition-new(root) {
  animation: page-fade-in 180ms ease both;
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes page-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes disclosure-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

html.is-page-leaving .app-workspace,
html.is-page-leaving .site-main {
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 100ms ease, transform 100ms ease;
}

.app-workspace,
.site-main {
  opacity: 1;
  transition: opacity 160ms ease, transform 160ms ease;
}

.has-app-shell .site-main {
  width: min(1500px, calc(100% - 48px));
  margin: 20px auto 52px;
}

.app-topbar {
  min-height: 62px;
  padding: 0 24px;
}

.app-topbar__academy {
  gap: 1px;
}

.app-topbar__academy strong {
  font-size: 15px;
}

.page-stack {
  gap: 22px;
}

.product-page-heading {
  min-height: 66px;
}

.product-page-heading h1 {
  font-size: 28px;
}

.course-browser {
  display: grid;
  gap: 18px;
}

.course-browser__tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 43px;
  border-bottom: 1px solid var(--color-border);
}

.course-browser__tab {
  display: inline-flex;
  align-items: center;
  min-height: 43px;
  padding: 0 16px;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.course-browser__tab:hover {
  color: var(--color-text);
}

.course-browser__tab--active {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent);
}

.course-browser__toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px auto;
  gap: 10px;
  align-items: center;
  max-width: 860px;
}

.course-browser__search,
.course-browser__filter {
  position: relative;
  display: block;
}

.course-browser__search svg,
.course-browser__filter svg,
.course-view-toggle svg,
.subject-classroom svg,
.classroom-material svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.course-browser__search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--color-muted);
  pointer-events: none;
  transform: translateY(-50%);
}

.course-browser__search input,
.course-browser__filter select {
  width: 100%;
  min-height: 40px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  color: var(--color-text);
  font-size: 12px;
}

.course-browser__search input {
  padding: 8px 12px 8px 38px;
}

.course-browser__filter select {
  padding: 8px 32px 8px 11px;
}

.course-view-toggle {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 3px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.course-view-toggle__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  background: transparent;
  color: var(--color-muted);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.course-view-toggle__button:hover {
  color: var(--color-text);
}

.course-view-toggle__button--active {
  background: #303633;
  color: #ffffff;
}

.course-browser__results {
  gap: 30px;
}

.course-browser__empty {
  min-height: 120px;
  padding: 38px 20px;
  color: var(--color-muted);
  border: 1px dashed var(--color-border-strong);
  border-radius: 8px;
  font-size: 13px;
  text-align: center;
}

.course-tile-grid {
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 22px;
}

.course-tile {
  grid-template-rows: 118px minmax(112px, auto);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.course-tile:hover {
  border-color: #aeb7b0;
  box-shadow: 0 7px 20px rgb(31 45 35 / 10%);
  transform: translateY(-3px);
}

.course-tile:active {
  transform: translateY(-1px) scale(.995);
}

.course-browser--list .course-tile-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

.course-browser--list .course-tile {
  grid-template-columns: 118px minmax(0, 1fr);
  grid-template-rows: minmax(104px, auto);
}

.course-browser--list .course-tile__body {
  min-height: 104px;
}

.course-browser--list .course-tile__meta {
  justify-content: flex-start;
}

.subject-classroom {
  display: grid;
  gap: 0;
  margin-top: -20px;
}

.subject-classroom__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  padding: 18px 4px 16px;
}

.subject-classroom__identity {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.subject-classroom__identity h1 {
  margin-bottom: 5px;
  font-size: 27px;
}

.subject-classroom__actions {
  flex: 0 0 auto;
  padding-bottom: 2px;
}

.subject-classroom__tabs {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-height: 48px;
  padding: 0 4px;
  border-bottom: 1px solid var(--color-border);
}

.subject-classroom__tab {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  color: var(--color-muted);
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.subject-classroom__tab:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.subject-classroom__tab--active {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent);
}

.subject-classroom__tab > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 7px;
  padding: 0 6px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-radius: 999px;
  font-size: 9px;
}

.subject-classroom__tab--active > span {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}

@media (min-width: 761px) {
  .subject-classroom__tab--students {
    margin-left: auto;
  }
}

.subject-classroom__body {
  display: grid;
  gap: 34px;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 28px 0 24px;
}

.topic-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.subject-students-body {
  gap: 18px;
}

.subject-students-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.subject-students-search {
  width: min(440px, 100%);
}

.subject-students-search label {
  display: block;
}

.subject-students-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  padding: 0 14px;
  white-space: nowrap;
}

.subject-students-copy svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.subject-student-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.subject-student-list__header,
.subject-student-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: center;
}

.subject-student-list__header {
  min-height: 36px;
  padding: 0 14px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.subject-student-row {
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--color-border);
}

.subject-student-row:last-child {
  border-bottom: 0;
}

.subject-student-row__identity {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.subject-student-row .user-avatar {
  width: 34px;
  height: 34px;
}

.subject-student-row strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subject-student-row > span:last-child {
  display: grid;
  gap: 2px;
}

.subject-student-row small {
  color: var(--color-muted);
  font-size: 8px;
}

.topic-filter {
  position: relative;
  display: grid;
  width: min(335px, 100%);
  gap: 0;
}

.topic-filter > span {
  position: absolute;
  top: -7px;
  left: 11px;
  z-index: 1;
  padding: 0 4px;
  background: var(--color-bg);
  color: var(--color-muted);
  font-size: 10px;
}

.topic-filter select {
  width: 100%;
  min-height: 52px;
  padding: 10px 36px 8px 14px;
  background: transparent;
  border: 1px solid #9aa39c;
  border-radius: 5px;
  color: var(--color-text);
  font-size: 14px;
}

.topic-toggle-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  background: transparent;
  color: var(--color-accent-strong);
  border: 0;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.topic-toggle-all:hover {
  background: var(--color-accent-soft);
}

.topic-toggle-all--collapsed svg {
  transform: rotate(180deg);
}

.topic-stack--classroom {
  gap: 38px;
}

.classroom-topic {
  display: grid;
  background: transparent;
}

.classroom-topic__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 28px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 8px 8px 8px 18px;
  border-bottom: 1px solid #bfc6c0;
  cursor: pointer;
  list-style: none;
}

.classroom-topic__summary::-webkit-details-marker {
  display: none;
}

.classroom-topic__summary > span:first-child {
  display: grid;
  min-width: 0;
}

.classroom-topic__summary strong {
  font-size: 19px;
  font-weight: 500;
}

.classroom-topic__summary small,
.classroom-topic__meta {
  color: var(--color-muted);
  font-size: 10px;
}

.classroom-topic__chevron {
  color: var(--color-muted);
  transition: transform 160ms ease;
}

.classroom-topic[open] .classroom-topic__chevron {
  transform: rotate(180deg);
}

.classroom-topic__content {
  display: grid;
  gap: 9px;
  padding-top: 9px;
}

.classroom-topic[open] .classroom-topic__content,
.topic-section[open] .topic-section__content,
.lesson-editor-row[open] .lesson-editor-form,
.content-source[open] .content-source__form,
.gallery-video-card__details[open] .gallery-video-card__details-body {
  animation: disclosure-in 170ms ease both;
}

.classroom-material {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: stretch;
  overflow: visible;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.classroom-material:hover {
  background: #f6faf9;
  border-color: #b8c5bf;
  box-shadow: 0 3px 10px rgb(31 45 35 / 7%);
  transform: translateY(-1px);
}

.classroom-material:has(.classroom-material__actions[open]) {
  z-index: 20;
}

.classroom-material__main {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px 9px 16px;
  text-decoration: none;
}

.classroom-material__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
}

.classroom-material__text {
  display: grid;
  min-width: 0;
}

.classroom-material__text strong,
.classroom-material__text small,
.classroom-material__date {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.classroom-material__text strong {
  font-size: 13px;
  font-weight: 600;
}

.classroom-material__text small,
.classroom-material__date {
  color: var(--color-muted);
  font-size: 10px;
}

.classroom-material__date {
  max-width: 160px;
}

.classroom-material__menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 60px;
  color: var(--color-muted);
  cursor: pointer;
  list-style: none;
}

.classroom-material__menu:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.classroom-material__menu::-webkit-details-marker {
  display: none;
}

.classroom-material__actions {
  position: relative;
  min-width: 0;
}

.classroom-material__actions[open] {
  z-index: 12;
}

.classroom-material__action-menu {
  position: absolute;
  top: calc(100% - 4px);
  right: 6px;
  display: grid;
  width: 190px;
  padding: 5px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
  box-shadow: 0 12px 28px rgb(24 35 29 / 16%);
}

.classroom-material__action-menu a,
.classroom-material__action-menu button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 9px;
  background: transparent;
  color: var(--color-text);
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.classroom-material__action-menu a:hover,
.classroom-material__action-menu button:hover {
  background: var(--color-surface-subtle);
  color: var(--color-accent-strong);
}

.classroom-material__action-menu svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.material-access-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgb(20 32 26 / 24%);
}

.material-access-dialog::backdrop {
  background: rgb(20 29 25 / 48%);
}

.material-access-dialog__surface,
.material-access-dialog__form {
  display: grid;
  min-height: 0;
}

.material-access-dialog__surface {
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(760px, calc(100vh - 32px));
}

.material-access-dialog__header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--color-border);
}

.material-access-dialog__header h2,
.material-access-dialog__header p {
  margin: 0;
}

.material-access-dialog__header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.material-access-dialog__header > div > p:last-child {
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 12px;
}

.material-access-dialog__form {
  grid-template-rows: auto auto minmax(120px, 1fr) auto auto;
  overflow: hidden;
}

.material-access-dialog__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px 8px;
}

.material-access-dialog__toolbar .search-field {
  position: relative;
}

.material-access-dialog__toolbar .search-field svg {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transform: translateY(-50%);
  pointer-events: none;
}

.material-access-dialog__toolbar input {
  width: 100%;
  min-height: 40px;
  padding-left: 36px;
}

.material-access-dialog__toolbar > strong {
  color: var(--color-muted);
  font-size: 11px;
  white-space: nowrap;
}

.material-access-dialog__bulk-actions {
  display: flex;
  gap: 6px;
  padding: 0 18px 10px;
}

.material-access-dialog__bulk-actions button {
  min-height: 32px;
  padding: 0 9px;
  background: var(--color-surface);
  color: var(--color-accent-strong);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.material-access-dialog__list {
  min-height: 0;
  padding: 0 18px;
  overflow-y: auto;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.material-access-student {
  display: grid;
  grid-template-columns: 18px 34px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 58px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.material-access-student:last-child {
  border-bottom: 0;
}

.material-access-student:hover {
  background: var(--color-surface-subtle);
}

.material-access-student input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent-strong);
}

.material-access-student__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.material-access-student__identity {
  display: grid;
  min-width: 0;
}

.material-access-student__identity strong,
.material-access-student__identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-access-student__identity strong {
  font-size: 12px;
}

.material-access-student__identity small {
  color: var(--color-muted);
  font-size: 10px;
}

.material-access-dialog__loading,
.material-access-dialog__empty {
  margin: 0;
  padding: 26px 12px;
  color: var(--color-muted);
  font-size: 12px;
  text-align: center;
}

.material-access-dialog__status {
  min-height: 28px;
  margin: 0;
  padding: 7px 18px 0;
  color: var(--color-accent-strong);
  font-size: 11px;
}

.material-access-dialog__status.is-error {
  color: var(--color-danger, #a9342d);
}

.material-access-dialog__footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px 16px;
}

@media (max-width: 620px) {
  .material-access-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .material-access-dialog__surface {
    max-height: calc(100vh - 16px);
  }

  .material-access-dialog__toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .material-access-dialog__toolbar > strong {
    white-space: normal;
  }

  .material-access-dialog__footer > button {
    flex: 1;
  }
}

.classroom-topic__empty {
  margin: 0;
  padding: 16px 18px;
  color: var(--color-muted);
  font-size: 12px;
}

.primary-button,
.secondary-button,
.primary-link-button,
.secondary-link-button,
.app-nav-item,
.mobile-nav__item,
.resource-row,
.material-resource-row,
.management-row {
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.primary-button:active,
.secondary-button:active,
.primary-link-button:active,
.secondary-link-button:active {
  transform: scale(.98);
}

@media (max-width: 940px) {
  .course-browser__toolbar {
    grid-template-columns: minmax(220px, 1fr) 210px auto;
  }
}

@media (max-width: 760px) {
  .has-app-shell .site-main {
    width: auto;
    margin: 16px 16px 32px;
  }

  .product-page-heading {
    min-height: 0;
  }

  .course-browser {
    gap: 14px;
  }

  .course-browser__tabs {
    overflow-x: auto;
  }

  .course-browser__toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .course-browser__search {
    grid-column: 1 / -1;
  }

  .course-browser__filter {
    min-width: 0;
  }

  .course-tile-grid {
    gap: 16px;
  }

  .course-browser--list .course-tile {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .subject-classroom {
    margin-top: -16px;
  }

  .subject-classroom__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 15px 0 14px;
  }

  .subject-classroom__identity {
    gap: 11px;
  }

  .subject-classroom__identity h1 {
    font-size: 25px;
  }

  .subject-classroom__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .subject-classroom__tabs {
    gap: 2px;
    margin: 0 -16px;
    padding: 0 10px;
    overflow-x: auto;
  }

  .subject-classroom__tab {
    flex: 0 0 auto;
    padding: 0 9px;
    font-size: 11px;
  }

  .subject-classroom__tab > span {
    min-width: 18px;
    height: 18px;
    margin-left: 4px;
    padding: 0 4px;
  }

  .subject-classroom__body {
    gap: 28px;
    padding-top: 22px;
  }

  .topic-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .subject-students-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .subject-students-search,
  .subject-students-copy {
    width: 100%;
  }

  .subject-student-list {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .subject-student-list__header {
    display: none;
  }

  .subject-student-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 8px;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 7px;
  }

  .subject-student-row:last-child {
    border-bottom: 1px solid var(--color-border);
  }

  .topic-filter {
    width: 100%;
  }

  .topic-toggle-all {
    align-self: flex-end;
  }

  .topic-stack--classroom {
    gap: 30px;
  }

  .classroom-topic__summary {
    grid-template-columns: minmax(0, 1fr) 24px;
    padding-left: 4px;
  }

  .classroom-topic__meta {
    display: none;
  }

  .classroom-topic__summary strong {
    font-size: 17px;
  }

  .classroom-material {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .classroom-material__main {
    grid-template-columns: 36px minmax(0, 1fr);
    padding-left: 10px;
  }

  .classroom-material__date {
    display: none;
  }
}

@media (max-width: 390px) {
  .course-browser:not(.course-browser--list) .course-tile-grid {
    grid-template-columns: 1fr;
  }

  .course-browser:not(.course-browser--list) .course-tile {
    grid-template-columns: 118px minmax(0, 1fr);
    grid-template-rows: minmax(118px, auto);
  }
}

/* Protected playback and access requests */
.secure-player-page {
  display: grid;
  gap: 18px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.security-binding-page {
  display: grid;
  gap: 24px;
  width: min(860px, 100%);
  margin: 0 auto;
}

.security-binding-panel {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 22px;
  padding: 30px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.security-binding-panel__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--color-brand-primary-soft);
  color: var(--color-accent-strong);
  border-radius: 7px;
}

.security-binding-panel__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.security-binding-panel h1 {
  margin: 4px 0 8px;
  font-size: 28px;
}

.security-binding-panel__rules {
  display: grid;
  gap: 9px;
  margin: 22px 0;
  padding-left: 20px;
  color: var(--color-text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.security-binding-panel__warning {
  padding: 12px 14px;
  background: #fff8e6;
  color: #694d00;
  border-left: 3px solid var(--color-brand-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.security-binding-panel__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.security-binding-panel__actions form {
  margin: 0;
}

.secure-player-heading,
.request-detail-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.secure-player-heading > div,
.request-detail-heading > div {
  min-width: 0;
}

.secure-player-heading h1,
.request-detail-heading h1 {
  margin-bottom: 5px;
  font-size: 27px;
}

.player-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 12px;
  background: #edf7f1;
  color: #24563a;
  border: 1px solid #cce5d5;
  border-radius: 6px;
  font-size: 12px;
}

.player-notice--staff {
  background: var(--color-brand-secondary-soft);
  color: #5d4700;
  border-color: color-mix(in srgb, var(--color-brand-secondary) 38%, white);
}

.player-notice svg,
.secure-player-protection svg,
.security-state__icon svg,
.request-toolbar svg,
.request-row__arrow,
.request-list__empty svg,
.secure-player-error svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-notice svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

.secure-player-stage {
  overflow: hidden;
  background: #101311;
  border: 1px solid #242a26;
  border-radius: 7px;
  box-shadow: 0 12px 32px rgb(20 24 21 / 14%);
}

.video-frame--secure {
  border-radius: 0;
}

.secure-player-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: #080a09;
  isolation: isolate;
}

.secure-player-shell:fullscreen {
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
}

.secure-player-shell:fullscreen .video-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

.capture-shield {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: #050706;
  color: #f4f5f4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms linear;
}

.capture-shield--active {
  opacity: 1;
}

.capture-shield span {
  font-size: 13px;
  font-weight: 700;
}

.player-fullscreen-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: rgb(6 9 7 / 72%);
  color: #ffffff;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.78;
  transition: opacity 160ms ease, background 160ms ease, transform 160ms ease;
}

.player-fullscreen-button:hover,
.player-fullscreen-button:focus-visible {
  background: rgb(6 9 7 / 92%);
  opacity: 1;
}

.player-fullscreen-button:active {
  transform: scale(0.94);
}

.player-fullscreen-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-session-state {
  position: absolute;
  inset: 0;
  z-index: 7;
  place-content: center;
  justify-items: center;
  padding: 24px;
  background: rgb(5 7 6 / 94%);
  color: #ffffff;
  text-align: center;
}

.player-session-state:not([hidden]) {
  display: grid;
}

.player-session-state span {
  margin-top: 5px;
  color: #c8cfca;
  font-size: 12px;
}

.player-session-state button {
  min-height: 38px;
  margin-top: 16px;
  padding: 0 16px;
  background: var(--color-accent);
  color: #ffffff;
  border: 0;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
}

@media print {
  .secure-player-shell iframe,
  .player-fullscreen-button {
    visibility: hidden !important;
  }

  .secure-player-shell .capture-shield {
    opacity: 1 !important;
  }
}

.secure-player-error {
  display: grid;
  place-items: center;
  min-height: min(640px, 62vh);
  padding: 36px;
  color: #f4f5f4;
  text-align: center;
}

.secure-player-error > div {
  max-width: 470px;
}

.secure-player-error__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  color: #f3c34f;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 50%;
}

.secure-player-error__icon svg {
  width: 26px;
  height: 26px;
}

.secure-player-error h2 {
  margin-bottom: 8px;
  font-size: 21px;
}

.secure-player-error p,
.secure-player-error small {
  color: #b9c0bc;
}

.secure-player-protection {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 3px;
  color: var(--color-muted);
}

.secure-player-protection svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: var(--color-accent-strong);
}

.secure-player-protection span {
  display: grid;
}

.secure-player-protection strong {
  color: var(--color-text);
  font-size: 11px;
}

.secure-player-protection small {
  font-size: 10px;
}

.security-state-page {
  display: grid;
  gap: 22px;
  width: min(860px, 100%);
  margin: 0 auto;
}

.security-state {
  display: grid;
  justify-items: center;
  width: min(600px, 100%);
  margin: 38px auto 20px;
  text-align: center;
}

.security-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
}

.security-state__icon svg {
  width: 30px;
  height: 30px;
}

.security-state h1 {
  max-width: 560px;
  margin-bottom: 12px;
  font-size: 29px;
}

.security-state__lead {
  max-width: 540px;
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.6;
}

.security-state__meta {
  margin: 18px 0 0;
  padding: 7px 10px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-radius: 5px;
  font-size: 11px;
}

.security-request-form {
  display: grid;
  gap: 15px;
  width: min(520px, 100%);
  margin-top: 26px;
  padding-top: 23px;
  border-top: 1px solid var(--color-border);
  text-align: left;
}

.security-request-form label,
.request-decision-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.security-request-form label span small,
.request-decision-form label span small {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 500;
}

.security-request-form textarea,
.request-decision-form textarea {
  width: 100%;
  min-height: 104px;
  padding: 11px 12px;
  resize: vertical;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  font-size: 12px;
}

.security-request-form .primary-button {
  justify-self: end;
  padding: 0 18px;
}

.security-state__back {
  margin-top: 22px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.security-state__back:hover {
  color: var(--color-accent-strong);
}

.reset-requests-page {
  width: min(1260px, 100%);
  margin: 0 auto;
}

.request-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 180px));
  width: fit-content;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.request-summary div {
  display: grid;
  gap: 1px;
  min-height: 64px;
  padding: 10px 16px;
  border-right: 1px solid var(--color-border);
}

.request-summary div:last-child {
  border-right: 0;
}

.request-summary strong {
  font-size: 20px;
  line-height: 1.2;
}

.request-summary span {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 600;
}

.request-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px auto auto;
  gap: 10px;
  align-items: center;
  max-width: 920px;
}

.request-toolbar__search {
  position: relative;
}

.request-toolbar__search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  transform: translateY(-50%);
}

.request-toolbar input,
.request-toolbar select {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  font-size: 12px;
}

.request-toolbar__search input {
  padding-left: 38px;
}

.request-toolbar__clear {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.request-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.request-list__header,
.request-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.05fr) minmax(230px, 1.25fr) 110px 110px 24px;
  gap: 16px;
  align-items: center;
}

.request-list__header {
  min-height: 38px;
  padding: 0 16px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.request-row {
  min-height: 70px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease;
}

.request-row:last-child {
  border-bottom: 0;
}

.request-row:hover {
  background: color-mix(in srgb, var(--color-accent-soft) 38%, white);
}

.request-row:active {
  transform: scale(.998);
}

.request-row__student,
.request-row__student > span:last-child,
.request-row__content,
.request-row__date {
  display: grid;
  min-width: 0;
}

.request-row__student {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.request-row__student strong,
.request-row__student small,
.request-row__content strong,
.request-row__content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.request-row__student strong,
.request-row__content strong,
.request-row__date strong {
  font-size: 12px;
}

.request-row__student small,
.request-row__content small,
.request-row__date small {
  color: var(--color-muted);
  font-size: 10px;
}

.request-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  background: #eef0ed;
  color: #505851;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.request-status--pending {
  background: #fff3cf;
  color: #725500;
}

.request-status--approved {
  background: #e6f4eb;
  color: #23633c;
}

.request-status--rejected,
.request-status--cancelled {
  background: #fbe9e7;
  color: #9c2f25;
}

.request-row__arrow {
  width: 18px;
  height: 18px;
  color: var(--color-muted);
}

.request-list__empty {
  display: grid;
  justify-items: center;
  min-height: 230px;
  padding: 44px 20px;
  color: var(--color-muted);
  text-align: center;
}

.request-list__empty svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: var(--color-accent-strong);
}

.request-list__empty h2 {
  margin-bottom: 5px;
  color: var(--color-text);
  font-size: 17px;
}

.request-list__empty p {
  font-size: 12px;
}

.request-detail-page {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.request-detail-heading {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border);
}

.request-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 30px;
  align-items: start;
}

.request-detail-main {
  display: grid;
  gap: 0;
}

.request-detail-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--color-border);
}

.request-detail-section:first-child {
  padding-top: 0;
}

.request-detail-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.request-detail-section__heading h2 {
  margin: 0;
  font-size: 16px;
}

.request-detail-section__heading span {
  color: var(--color-muted);
  font-size: 10px;
}

.request-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 0;
}

.request-detail-grid div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.request-detail-grid dt {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.request-detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 650;
}

.request-detail-grid--technical {
  margin-top: 17px;
}

.context-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.context-check {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  background: #f3f8f5;
  border: 1px solid #d6e8dc;
  border-radius: 6px;
}

.context-check > span {
  grid-row: 1 / 3;
  color: #267144;
  font-weight: 800;
}

.context-check strong {
  font-size: 11px;
}

.context-check small {
  color: var(--color-muted);
  font-size: 9px;
}

.context-check--changed {
  background: #fff7df;
  border-color: #efdaa0;
}

.context-check--changed > span {
  color: #8a6200;
}

.request-reason {
  margin: 0;
  padding: 14px 16px;
  background: var(--color-surface-subtle);
  color: #454c47;
  border-left: 3px solid var(--color-accent);
  font-size: 12px;
  line-height: 1.6;
}

.request-decision-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  display: grid;
  gap: 18px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
  box-shadow: var(--shadow-card);
}

.request-decision-panel h2 {
  margin-bottom: 7px;
  font-size: 18px;
}

.request-decision-panel p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1.55;
}

.request-decision-panel > a {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.request-decision-form {
  display: grid;
  gap: 10px;
}

.request-decision-form label {
  margin-bottom: 4px;
}

.request-decision-form .primary-button,
.request-decision-form .danger-button {
  width: 100%;
}

.request-decision-panel__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .request-detail-layout {
    grid-template-columns: 1fr;
  }

  .request-decision-panel {
    position: static;
  }

  .request-list__header,
  .request-row {
    grid-template-columns: minmax(190px, 1fr) minmax(210px, 1fr) 100px 100px 20px;
    gap: 12px;
  }
}

@media (max-width: 760px) {
  .breadcrumbs {
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 3px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .breadcrumbs::-webkit-scrollbar {
    display: none;
  }

  .breadcrumbs > * {
    flex: 0 0 auto;
  }

  .secure-player-page,
  .security-state-page,
  .security-binding-page {
    gap: 14px;
  }

  .security-binding-panel {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 22px 0;
  }

  .security-binding-panel h1 {
    font-size: 24px;
  }

  .security-binding-panel__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .security-binding-panel__actions form,
  .security-binding-panel__actions .button,
  .security-binding-panel__actions .secondary-link-button {
    width: 100%;
  }

  .secure-player-heading,
  .request-detail-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .secure-player-heading h1,
  .request-detail-heading h1 {
    font-size: 24px;
  }

  .secure-player-heading .secondary-link-button {
    min-height: 36px;
  }

  .secure-player-stage {
    margin: 0 -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .player-fullscreen-button {
    right: 8px;
    bottom: 8px;
    width: 40px;
    height: 40px;
  }

  .secure-player-error {
    min-height: 54vw;
    padding: 28px 20px;
  }

  .secure-player-protection {
    align-items: flex-start;
  }

  .security-state {
    margin-top: 24px;
  }

  .security-state__icon {
    width: 58px;
    height: 58px;
  }

  .security-state h1 {
    font-size: 25px;
  }

  .security-request-form .primary-button {
    justify-self: stretch;
    width: 100%;
  }

  .request-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .request-summary div {
    padding: 9px 11px;
  }

  .request-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .request-toolbar__search {
    grid-column: 1 / -1;
  }

  .request-toolbar__clear {
    grid-column: 1 / -1;
  }

  .request-list {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .request-list__header {
    display: none;
  }

  .request-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px 12px;
    min-height: 0;
    margin-bottom: 10px;
    padding: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 7px;
  }

  .request-row:last-child {
    border-bottom: 1px solid var(--color-border);
  }

  .request-row__student,
  .request-row__content {
    grid-column: 1 / -1;
  }

  .request-row__content {
    padding-top: 9px;
    border-top: 1px solid var(--color-border);
  }

  .request-row__date {
    grid-column: 1;
  }

  .request-row > span:nth-child(4) {
    grid-column: 2;
    grid-row: 3;
  }

  .request-row__arrow {
    display: none;
  }

  .request-detail-layout {
    gap: 20px;
  }

  .request-detail-grid,
  .context-checks {
    grid-template-columns: 1fr;
  }

  .request-detail-section {
    padding: 19px 0;
  }
}

/* Coordinator operations and account access */
.operations-page,
.operations-detail-page {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.operations-count {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.operations-tabs {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-height: 46px;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border);
  scrollbar-width: none;
}

.operations-tabs::-webkit-scrollbar {
  display: none;
}

.operations-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  color: var(--color-muted);
  border-bottom: 3px solid transparent;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.operations-tab:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text);
}

.operations-tab--active {
  color: var(--color-accent-strong);
  border-bottom-color: var(--color-accent);
}

.course-status-filter {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  padding: 3px;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.course-status-filter__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  color: var(--color-muted);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.course-status-filter__item span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 10px;
}

.course-status-filter__item:hover,
.course-status-filter__item--active {
  background: var(--color-surface);
  color: var(--color-accent-strong);
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.course-status-filter__item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.operations-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 540px) max-content max-content;
  gap: 10px;
  align-items: center;
  justify-content: start;
}

.operations-toolbar .secondary-button {
  width: auto;
  padding: 0 18px;
}

.operations-toolbar--compact {
  max-width: 720px;
}

.operations-toolbar > a {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.operations-search {
  position: relative;
  display: block;
}

.operations-search svg,
.operations-create-tool summary svg,
.entity-row__arrow,
.usage-breakdown summary svg,
.auth-card__security svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.operations-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  transform: translateY(-50%);
}

.operations-search input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 38px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  font-size: 12px;
}

.operations-create-tool {
  position: relative;
}

.operations-create-tool > summary {
  position: absolute;
  top: -88px;
  right: 0;
  gap: 7px;
  cursor: pointer;
  list-style: none;
}

.operations-create-tool > summary::-webkit-details-marker {
  display: none;
}

.operations-create-tool summary svg {
  width: 17px;
  height: 17px;
}

.operations-create-tool[open] > summary {
  background: var(--color-accent-strong);
}

.operations-create-tool__body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
  box-shadow: var(--shadow-card);
}

.operations-create-tool__body > div:first-child h2 {
  margin-bottom: 7px;
  font-size: 18px;
}

.operations-create-tool__body > div:first-child p:last-child {
  color: var(--color-muted);
  font-size: 11px;
  line-height: 1.55;
}

.operations-create-tool[open] .operations-create-tool__body {
  animation: disclosure-in 170ms ease both;
}

.operations-form {
  display: grid;
  gap: 15px;
}

.operations-form--columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.operations-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--color-text);
  font-size: 11px;
  font-weight: 750;
}

.operations-form label > small,
.operations-form fieldset > small {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 500;
}

.operations-form input:not([type="checkbox"]),
.operations-form select,
.operations-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  font-size: 12px;
}

.operations-form textarea {
  min-height: 108px;
  resize: vertical;
}

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

.operations-form legend {
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 750;
}

.operations-form__full {
  grid-column: 1 / -1;
}

.operations-form__action {
  justify-self: start;
  padding: 0 18px;
}

.bulk-enrollment-form {
  grid-template-columns: minmax(280px, 1.1fr) minmax(250px, .9fr);
  align-items: start;
}

.bulk-enrollment-form > .primary-button,
.bulk-enrollment-form > .form-errors {
  grid-column: 1 / -1;
  justify-self: end;
  padding: 0 18px;
}

.checkbox-list--compact {
  gap: 6px;
  max-height: 310px;
  padding: 0;
}

.checkbox-list--compact label {
  min-height: 38px;
  padding: 8px 9px;
  background: var(--color-surface-subtle);
  border-color: transparent;
  font-size: 11px;
}

.checkbox-list--compact label:has(input:checked) {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-color: color-mix(in srgb, var(--color-accent) 34%, white);
}

.entity-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.entity-list__header,
.entity-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.35fr) 100px 22px;
  gap: 16px;
  align-items: center;
}

.entity-list__header {
  min-height: 38px;
  padding: 0 16px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.entity-row {
  min-height: 68px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease;
}

.entity-row:last-child {
  border-bottom: 0;
}

.entity-row:hover {
  background: color-mix(in srgb, var(--color-accent-soft) 35%, white);
}

.entity-row__identity {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.entity-row__identity > span:last-child,
.usage-teacher-row > span:first-child {
  display: grid;
  min-width: 0;
}

.entity-row__identity strong,
.entity-row__identity small,
.usage-teacher-row strong,
.usage-teacher-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-row__identity strong {
  font-size: 12px;
}

.entity-row__identity small,
.entity-row__subjects > small {
  color: var(--color-muted);
  font-size: 9px;
}

.entity-row__subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.entity-subject {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 180px;
  padding: 0 7px;
  overflow: hidden;
  background: var(--color-surface-subtle);
  color: #4f5852;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-row__arrow {
  width: 18px;
  height: 18px;
  color: var(--color-muted);
}

.entity-list__empty {
  display: grid;
  justify-items: center;
  min-height: 190px;
  padding: 42px 20px;
  color: var(--color-muted);
  text-align: center;
}

.entity-list__empty h2 {
  margin-bottom: 5px;
  color: var(--color-text);
  font-size: 17px;
}

.entity-list__empty p {
  font-size: 11px;
}

.operations-profile-heading {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--color-border);
}

.operations-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 800;
}

.operations-profile-heading h1 {
  margin-bottom: 2px;
  font-size: 25px;
}

.operations-profile-heading p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: 11px;
}

.operations-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.operations-detail-main {
  display: grid;
}

.operations-detail-section,
.operations-form-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--color-border);
}

.operations-detail-section:first-child,
.operations-form-section {
  padding-top: 0;
}

.operations-detail-section h2,
.operations-detail-section__heading h2 {
  margin: 0 0 16px;
  font-size: 16px;
}

.operations-detail-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.operations-detail-section__heading span,
.operations-detail-section__heading p {
  color: var(--color-muted);
  font-size: 10px;
}

.operations-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.operations-detail-grid div,
.operations-compact-metrics div {
  display: grid;
  gap: 3px;
}

.operations-detail-grid dt,
.operations-compact-metrics dt {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.operations-detail-grid dd,
.operations-compact-metrics dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.assigned-subject-list {
  display: grid;
  gap: 8px;
}

.assigned-subject-list > a {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 8px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-decoration: none;
}

.assigned-subject-list > a > span:last-child {
  display: grid;
}

.assigned-subject-list strong {
  font-size: 12px;
}

.assigned-subject-list small,
.operations-empty-copy {
  color: var(--color-muted);
  font-size: 10px;
}

.operations-assignment-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  display: grid;
  gap: 18px;
  padding: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
  box-shadow: var(--shadow-card);
}

.operations-assignment-panel h2 {
  margin-bottom: 7px;
  font-size: 18px;
}

.operations-assignment-panel p,
.operations-assignment-panel > a {
  color: var(--color-muted);
  font-size: 10px;
  line-height: 1.55;
}

.operations-assignment-panel > a {
  font-weight: 700;
  text-decoration: none;
}

.operations-assignment-panel .primary-button {
  width: 100%;
}

.operations-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding: 18px;
  background: #fff8f7;
  border: 1px solid #f2d3cf;
  border-radius: 6px;
}

.operations-danger-zone h2 {
  margin-bottom: 4px;
  font-size: 14px;
}

.operations-danger-zone p {
  margin: 0;
  color: #7d5551;
  font-size: 10px;
}

.operations-danger-zone .danger-button,
.operations-archive-form .danger-button {
  padding: 0 13px;
  white-space: nowrap;
}

.operations-form-section {
  width: min(720px, 100%);
}

.operations-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.operations-compact-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.operations-archive-form {
  padding-top: 17px;
  border-top: 1px solid var(--color-border);
}

.storage-overview {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 7px;
}

.storage-overview__heading,
.storage-overview__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.storage-overview__heading > div {
  display: grid;
  gap: 3px;
}

.storage-overview__heading span,
.storage-overview__heading p,
.storage-overview__footer,
.storage-overview__footer small {
  color: var(--color-muted);
  font-size: 10px;
}

.storage-overview__heading strong {
  font-size: 28px;
  line-height: 1.1;
}

.usage-bar--large {
  height: 10px;
  background: var(--color-surface-subtle);
  border-radius: 4px;
}

.usage-bar--large span {
  border-radius: 4px;
}

.storage-overview__footer strong {
  color: var(--color-text);
}

.usage-primary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.usage-primary-metrics > div {
  display: grid;
  gap: 2px;
  min-height: 86px;
  padding: 14px 17px;
  border-right: 1px solid var(--color-border);
}

.usage-primary-metrics > div:last-child {
  border-right: 0;
}

.usage-primary-metrics span,
.usage-primary-metrics small {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 700;
}

.usage-primary-metrics strong {
  font-size: 22px;
}

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

.usage-breakdown {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.usage-breakdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.usage-breakdown summary::-webkit-details-marker {
  display: none;
}

.usage-breakdown summary > span {
  display: grid;
}

.usage-breakdown summary strong {
  font-size: 12px;
}

.usage-breakdown summary small {
  color: var(--color-muted);
  font-size: 9px;
}

.usage-breakdown summary svg {
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  transition: transform 150ms ease;
}

.usage-breakdown[open] summary svg {
  transform: rotate(180deg);
}

.usage-breakdown dl {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 14px 12px;
}

.usage-breakdown dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--color-border);
}

.usage-breakdown dt,
.usage-breakdown dd {
  font-size: 10px;
}

.usage-breakdown dt {
  color: var(--color-muted);
}

.usage-breakdown dd {
  margin: 0;
  font-weight: 800;
}

.usage-teachers {
  display: grid;
  gap: 12px;
}

.usage-teachers .operations-detail-section__heading h2 {
  margin-bottom: 3px;
}

.usage-teachers .operations-detail-section__heading p {
  margin: 0;
}

.usage-teacher-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.usage-teacher-list__header,
.usage-teacher-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(80px, .4fr));
  gap: 14px;
  align-items: center;
}

.usage-teacher-list__header {
  min-height: 38px;
  padding: 0 15px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.usage-teacher-row {
  min-height: 58px;
  padding: 9px 15px;
  border-top: 1px solid var(--color-border);
}

.usage-teacher-row > span:not(:first-child) {
  display: grid;
}

.usage-teacher-row strong {
  font-size: 11px;
}

.usage-teacher-row small {
  color: var(--color-muted);
  font-size: 8px;
}

.usage-teacher-row > span:not(:first-child) small {
  display: none;
}

.auth-body {
  min-height: 100vh;
  background: var(--color-surface-subtle);
}

.auth-body .site-header {
  display: none;
}

.auth-body .site-main {
  display: grid;
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 42px 20px;
}

.auth-card {
  display: grid;
  gap: 28px;
  width: min(430px, 100%);
  padding: 34px 36px 26px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-top: 4px solid var(--color-brand-secondary);
  border-radius: 7px;
  box-shadow: 0 16px 42px rgb(31 26 29 / 10%);
}

.auth-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.auth-identity img,
.auth-identity > span {
  width: 42px;
  height: 42px;
}

.auth-identity img {
  object-fit: contain;
}

.auth-identity > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: #ffffff;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.auth-identity strong {
  font-size: 15px;
}

.auth-card__heading h1 {
  margin-bottom: 8px;
  font-size: 27px;
}

.auth-card__heading > p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 11px;
  font-weight: 750;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  font-size: 13px;
}

.auth-form input:focus {
  border-color: var(--color-accent);
}

.auth-form .primary-button {
  width: 100%;
  min-height: 44px;
  margin-top: 3px;
}

.auth-form__help {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.45;
}

.auth-card__security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 17px;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
  font-size: 9px;
  font-weight: 650;
}

.auth-card__security svg {
  width: 15px;
  height: 15px;
  color: var(--color-accent-strong);
}

.auth-card--message {
  justify-items: center;
  text-align: center;
}

.auth-card--message .auth-identity {
  justify-self: start;
}

.auth-message-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: #fff2d6;
  color: #855f00;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
}

.academy-choice-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 44px 20px;
}

.academy-choice {
  display: grid;
  gap: 30px;
  width: min(760px, 100%);
}

.academy-choice__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--color-border-strong);
}

.academy-choice__heading > div:last-child {
  flex: 1;
  text-align: right;
}

.academy-choice__heading h1 {
  margin: 2px 0 5px;
  font-size: 27px;
}

.academy-choice__heading p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: 11px;
}

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

.academy-choice-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  gap: 13px;
  align-items: center;
  min-height: 84px;
  padding: 16px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-left: 4px solid var(--academy-primary);
  border-radius: 7px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.academy-choice-card:hover {
  border-color: var(--academy-primary);
  box-shadow: 0 12px 24px rgb(31 26 29 / 9%);
  transform: translateY(-2px);
}

.academy-choice-card:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--academy-primary), transparent 70%);
  outline-offset: 2px;
}

.academy-choice-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: var(--academy-soft);
  color: var(--academy-primary);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.academy-choice-card__mark img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}

.academy-choice-card__content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.academy-choice-card__content strong,
.academy-choice-card__content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academy-choice-card__content strong {
  font-size: 13px;
}

.academy-choice-card__content small {
  color: var(--color-muted);
  font-size: 9px;
}

.academy-choice-card > svg {
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.academy-choice__empty {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--color-muted);
  border: 1px dashed var(--color-border-strong);
  border-radius: 7px;
  text-align: center;
  font-size: 11px;
}

.academy-choice__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 2px;
  color: var(--color-muted);
  font-size: 10px;
}

.account-state-card {
  gap: 24px;
}

.account-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
}

.account-state-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.account-state-card__identity {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 12px 14px;
  background: var(--color-surface-subtle);
  border-radius: 6px;
  text-align: left;
}

.account-state-card__identity span {
  color: var(--color-muted);
  font-size: 9px;
}

.account-state-card__identity strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.account-state-card__action,
.account-state-card__action .secondary-button {
  width: 100%;
}

.error-state-card {
  gap: 24px;
}

.error-state-card__code {
  color: var(--color-accent-strong);
  font-size: 54px;
  font-weight: 850;
  line-height: 1;
}

.error-state-card__action {
  width: 100%;
}

.superadmin-body {
  --color-accent: #176f63;
  --color-accent-strong: #10584f;
  --color-accent-soft: #e6f3f0;
  --color-brand-secondary: #b27a20;
  --color-brand-secondary-soft: #fbf2df;
}

.support-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  padding: 7px 28px;
  background: #fff3cb;
  color: #5f4500;
  border-bottom: 1px solid #e7d18a;
  font-size: 10px;
}

.support-mode-bar form {
  margin: 0;
}

.support-mode-bar button {
  min-height: 28px;
  padding: 4px 10px;
  background: transparent;
  color: #5f4500;
  border: 1px solid #b89437;
  border-radius: 5px;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.superadmin-page {
  width: min(1380px, 100%);
}

.superadmin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.superadmin-summary > div {
  display: grid;
  gap: 2px;
  padding: 15px 22px;
  border-right: 1px solid var(--color-border);
}

.superadmin-summary span {
  color: var(--color-muted);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.superadmin-summary strong {
  font-size: 22px;
}

.superadmin-toolbar select,
.superadmin-toolbar input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
  font-size: 11px;
}

.superadmin-toolbar .search-field {
  display: block;
}

.superadmin-academy-list {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 7px;
}

.superadmin-academy-list__header,
.superadmin-academy-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) minmax(210px, 1.2fr) minmax(120px, .7fr) minmax(120px, .65fr) 90px 18px;
  gap: 16px;
  align-items: center;
}

.superadmin-academy-list__header {
  min-height: 38px;
  padding: 0 16px;
  background: var(--color-surface-subtle);
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.superadmin-academy-row {
  min-height: 70px;
  padding: 9px 16px;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  transition: background-color 150ms ease;
}

.superadmin-academy-row:last-child {
  border-bottom: 0;
}

.superadmin-academy-row:hover {
  background: #fafbf9;
}

.superadmin-academy-row > span:not(.superadmin-academy-row__identity) {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.superadmin-academy-row strong,
.superadmin-academy-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.superadmin-academy-row strong {
  font-size: 10px;
}

.superadmin-academy-row small {
  color: var(--color-muted);
  font-size: 8px;
}

.superadmin-academy-row__identity {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.superadmin-academy-row__identity > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.entity-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 6px;
  font-size: 9px;
  font-weight: 850;
}

.superadmin-academy-row > svg {
  width: 17px;
  height: 17px;
  color: var(--color-muted);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.academy-status {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 8px !important;
  font-weight: 800;
  white-space: nowrap;
}

.academy-status--active {
  background: #e7f5ec;
  color: #24613b;
}

.academy-status--suspended {
  background: #fff2d6;
  color: #785700;
}

.academy-status--archived {
  background: #ecefed;
  color: #58605b;
}

.superadmin-academy-form {
  display: grid;
  gap: 0;
  width: min(1000px, 100%);
}

.superadmin-form-section {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 36px;
  padding: 26px 0;
  border-bottom: 1px solid var(--color-border);
}

.superadmin-form-section:first-of-type {
  padding-top: 4px;
}

.superadmin-form-section__heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  align-content: start;
}

.superadmin-form-section__heading > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-radius: 50%;
  font-size: 8px;
  font-weight: 850;
}

.superadmin-form-section__heading h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.superadmin-form-section__heading p {
  margin: 0;
  color: var(--color-muted);
  font-size: 9px;
}

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

.superadmin-form-grid__full {
  grid-column: 1 / -1;
}

.superadmin-limit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.superadmin-module-options {
  display: grid;
  gap: 9px;
}

.superadmin-module-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 6px;
}

.superadmin-module-option > span:first-child {
  display: grid;
  gap: 2px;
}

.superadmin-module-option strong {
  font-size: 11px;
}

.superadmin-module-option small {
  color: var(--color-muted);
  font-size: 8px;
}

.superadmin-module-option--locked {
  background: var(--color-surface-subtle);
}

.superadmin-module-option--locked > span:last-child {
  color: var(--color-accent-strong);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.superadmin-module-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
}

.superadmin-module-option--select select {
  width: min(100%, 260px);
}

.superadmin-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 22px;
}

.superadmin-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.superadmin-detail-heading__identity {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.superadmin-detail-heading__identity h1 {
  margin: 2px 0;
  font-size: 27px;
}

.superadmin-detail-heading__identity p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: 9px;
}

.superadmin-detail-heading__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.superadmin-detail-heading__actions form,
.superadmin-support-panel form {
  margin: 0;
}

.superadmin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  align-items: start;
}

.superadmin-coordinator-list,
.superadmin-module-list,
.superadmin-audit-list {
  display: grid;
}

.superadmin-coordinator-list > div,
.superadmin-module-list > div,
.superadmin-audit-list > div {
  display: grid;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  border-bottom: 1px solid var(--color-border);
}

.superadmin-coordinator-list > div {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.superadmin-coordinator-list .user-avatar {
  width: 34px;
  height: 34px;
}

.superadmin-coordinator-list > div > span:nth-child(2),
.superadmin-module-list > div > span:first-child,
.superadmin-audit-list > div > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.superadmin-coordinator-list strong,
.superadmin-module-list strong,
.superadmin-audit-list strong {
  font-size: 10px;
}

.superadmin-coordinator-list small,
.superadmin-module-list small,
.superadmin-audit-list small {
  color: var(--color-muted);
  font-size: 8px;
  overflow-wrap: anywhere;
}

.superadmin-module-list > div {
  grid-template-columns: minmax(0, 1fr) auto;
}

.superadmin-audit-list > div {
  grid-template-columns: 10px minmax(0, 1fr);
}

.audit-event-dot {
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
}

.superadmin-support-panel {
  border-top: 4px solid var(--color-brand-secondary);
}

@media (max-width: 900px) {
  .operations-detail-layout {
    grid-template-columns: 1fr;
  }

  .operations-assignment-panel {
    position: static;
  }

  .operations-profile-heading + .operations-detail-layout .operations-assignment-panel {
    order: -1;
  }

  .entity-list__header,
  .entity-row {
    grid-template-columns: minmax(210px, 1fr) minmax(230px, 1.2fr) 90px 20px;
    gap: 12px;
  }

  .superadmin-academy-list {
    overflow-x: auto;
  }

  .superadmin-academy-list__header,
  .superadmin-academy-row {
    min-width: 1000px;
  }

  .superadmin-detail-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-support-panel {
    position: static;
    order: -1;
  }
}

@media (max-width: 760px) {
  .support-mode-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    padding: 9px 16px;
  }

  .support-mode-bar button {
    min-height: 32px;
  }

  .superadmin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .superadmin-summary > div {
    padding: 12px;
  }

  .superadmin-toolbar {
    grid-template-columns: 1fr;
  }

  .superadmin-toolbar .secondary-button {
    width: 100%;
  }

  .superadmin-academy-list {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .superadmin-academy-list__header {
    display: none;
  }

  .superadmin-academy-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-width: 0;
    min-height: 0;
    margin-bottom: 9px;
    padding: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 7px;
  }

  .superadmin-academy-row:last-child {
    border-bottom: 1px solid var(--color-border);
  }

  .superadmin-academy-row__identity {
    grid-column: 1 / -1;
  }

  .superadmin-academy-row > span:not(.superadmin-academy-row__identity, .academy-status) {
    display: none;
  }

  .superadmin-academy-row > .academy-status {
    grid-column: 1;
  }

  .superadmin-academy-row > svg {
    grid-column: 2;
    grid-row: 2;
  }

  .superadmin-form-section {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .superadmin-form-grid,
  .superadmin-limit-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-form-grid__full {
    grid-column: 1;
  }

  .superadmin-form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .superadmin-form-actions .primary-button,
  .superadmin-form-actions .secondary-link-button {
    width: 100%;
  }

  .superadmin-detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .superadmin-detail-heading__actions {
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
  }

  .superadmin-detail-heading__actions form {
    flex: 1 1 100%;
  }

  .superadmin-detail-heading__actions form .primary-button {
    width: 100%;
  }

  .academy-choice-page {
    place-items: start center;
    padding: 24px 14px 72px;
  }

  .academy-choice {
    gap: 24px;
  }

  .academy-choice__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .academy-choice__heading > div:last-child {
    text-align: left;
  }

  .academy-choice__heading h1 {
    font-size: 24px;
  }

  .academy-choice__grid {
    grid-template-columns: 1fr;
  }

  .academy-choice-card {
    min-height: 78px;
  }

  .academy-choice__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .operations-tabs {
    margin: 0 -16px;
    padding: 0 10px;
  }

  .operations-create-tool > summary {
    position: static;
    width: 100%;
  }

  .operations-create-tool__body,
  .operations-create-tool__body--bulk {
    grid-template-columns: 1fr;
    gap: 17px;
    margin-top: 10px;
    padding: 17px;
  }

  .operations-form--columns,
  .bulk-enrollment-form {
    grid-template-columns: 1fr;
  }

  .bulk-enrollment-form > .primary-button,
  .bulk-enrollment-form > .form-errors {
    grid-column: 1;
    justify-self: stretch;
  }

  .operations-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .operations-toolbar > a {
    grid-column: 1 / -1;
  }

  .entity-list {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .entity-list__header {
    display: none;
  }

  .entity-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    margin-bottom: 9px;
    padding: 13px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 7px;
  }

  .entity-row:last-child {
    border-bottom: 1px solid var(--color-border);
  }

  .entity-row__identity,
  .entity-row__subjects {
    grid-column: 1 / -1;
  }

  .entity-row__subjects {
    padding-top: 9px;
    border-top: 1px solid var(--color-border);
  }

  .entity-row__arrow {
    display: none;
  }

  .operations-profile-heading {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .operations-profile-avatar {
    width: 48px;
    height: 48px;
  }

  .operations-profile-heading > .request-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .operations-profile-heading h1 {
    font-size: 21px;
    overflow-wrap: anywhere;
  }

  .operations-detail-grid,
  .operations-compact-metrics {
    grid-template-columns: 1fr;
  }

  .operations-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .operations-danger-zone .danger-button {
    width: 100%;
  }

  .usage-primary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .usage-primary-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .usage-primary-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--color-border);
  }

  .usage-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .storage-overview__heading,
  .storage-overview__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .usage-teacher-list {
    overflow: visible;
    background: transparent;
    border: 0;
  }

  .usage-teacher-list__header {
    display: none;
  }

  .usage-teacher-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin-bottom: 9px;
    padding: 13px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 7px;
  }

  .usage-teacher-row > span:first-child {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
  }

  .usage-teacher-row > span:not(:first-child) small {
    display: block;
  }

  .auth-page {
    align-items: start;
    padding: 18px 14px 72px;
  }

  .auth-card {
    gap: 24px;
    margin-top: 18px;
    padding: 27px 22px 22px;
    box-shadow: 0 8px 24px rgb(31 26 29 / 8%);
  }

  .auth-card__heading h1 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
/* Calendar */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:focus-visible { outline: 3px solid var(--color-accent-soft, #d9efeb); outline-offset: 2px; }
.button:disabled { opacity: 0.55; cursor: wait; transform: none; }
.button-primary { border-color: var(--color-accent, #0f766e); background: var(--color-accent, #0f766e); color: #fff; }
.button-primary:hover { background: var(--color-accent-strong, #0b5f59); }
.button-secondary { border-color: var(--color-border, #d9dfdc); background: #fff; color: var(--color-text, #17231f); }
.button-secondary:hover { border-color: var(--color-accent, #0f766e); color: var(--color-accent-strong, #0b5f59); }

.section-tabs {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  border-bottom: 1px solid var(--color-border, #d9dfdc);
}

.section-tab {
  position: relative;
  min-height: 42px;
  padding: 8px 2px;
  color: var(--color-text-muted, #667085);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.section-tab[aria-selected="true"] { color: var(--color-accent-strong, #0b5f59); }
.section-tab[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; background: var(--color-accent, #0f766e); }

.calendar-page {
  width: min(1380px, 100%);
  margin: 0 auto;
}

.calendar-page .page-heading--compact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.calendar-page .page-heading--compact h1 {
  margin: 2px 0 5px;
}

.calendar-page .page-heading--compact p:last-child,
.publication-heading p,
.public-publications-main > header p:last-child {
  margin: 0;
  color: var(--color-text-muted, #667085);
}

.calendar-page .button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.calendar-tabs {
  margin-bottom: 18px;
}

.calendar-tabs .section-tab {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.calendar-tab-panel[hidden] {
  display: none !important;
}

.calendar-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 0 16px;
}

.calendar-toolbar label {
  display: grid;
  gap: 5px;
  min-width: 190px;
  color: var(--color-text-muted, #667085);
  font-size: 12px;
  font-weight: 700;
}

.calendar-toolbar select,
.calendar-event-form select,
.calendar-event-form input,
.calendar-event-form textarea,
.publication-uploader input,
.publication-uploader textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 34px 8px 10px;
  border: 1px solid var(--color-border, #d9dfdc);
  border-radius: 6px;
  background-color: #fff;
  color: var(--color-text, #17231f);
  font: inherit;
  font-size: 13px;
}

.calendar-toolbar select:focus-visible,
.calendar-event-form select:focus-visible,
.calendar-event-form input:focus-visible,
.calendar-event-form textarea:focus-visible,
.publication-uploader input:focus-visible,
.publication-uploader textarea:focus-visible {
  border-color: var(--color-accent, #0f766e);
  outline: 3px solid var(--color-accent-soft, #d9efeb);
  outline-offset: 1px;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
  min-height: 42px;
  color: var(--color-text-muted, #667085);
  font-size: 12px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
}

.calendar-dot--exam { background: #b42318; }
.calendar-dot--assignment { background: #b45309; }
.calendar-dot--class { background: #087e8b; }
.calendar-dot--notice { background: #2864c7; }

.calendar-surface {
  min-height: 650px;
  padding: 18px;
  border: 1px solid var(--color-border, #d9dfdc);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --fc-event-border-radius: 4px;
  --fc-today-bg-color: var(--color-accent-soft, #e8f4f1);
}

.calendar-surface button {
  letter-spacing: 0;
}

.calendar-event-item {
  max-width: 100%;
  overflow: hidden;
}

.calendar-event-item > div:last-child,
.calendar-event-item > div:last-child > div:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(880px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--color-border, #d9dfdc);
  border-radius: 8px;
  background: #fff;
  color: var(--color-text, #17231f);
  box-shadow: 0 24px 72px rgba(16, 24, 40, 0.22);
}

.calendar-dialog::backdrop {
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(2px);
}

.calendar-event-form,
.calendar-dialog--detail article {
  padding: 24px;
}

.calendar-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.calendar-dialog__header h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.calendar-dialog__header .icon-button svg,
.publication-card__actions .icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.form-grid--compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 18px;
}

.form-field {
  display: grid;
  align-content: start;
  gap: 6px;
}

.form-field > label:not(.checkbox-field) {
  color: var(--color-text, #17231f);
  font-size: 13px;
  font-weight: 700;
}

.form-field--wide,
.form-actions.form-field--wide {
  grid-column: 1 / -1;
}

.form-field--error input,
.form-field--error select,
.form-field--error textarea {
  border-color: #b42318;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  font-weight: 700;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
}

[data-calendar-field="recurrence_weekdays"] > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

[data-calendar-field="recurrence_weekdays"] label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--color-border, #d9dfdc);
  border-radius: 6px;
  font-size: 12px;
}

[data-calendar-field="recurrence_weekdays"] input {
  width: 16px;
  height: 16px;
}

.calendar-series-choice {
  display: grid;
  grid-template-columns: auto minmax(180px, 260px);
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  background: var(--color-accent-soft, #e8f4f1);
}

.calendar-series-choice[hidden] { display: none; }

.calendar-form-errors {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-left: 3px solid #b42318;
  background: #fff1f0;
  color: #8f1d15;
  font-size: 13px;
}

.calendar-form-errors p { margin: 3px 0; }

.calendar-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.calendar-dialog__actions > span { flex: 1; }

.button-danger.button-quiet {
  border-color: transparent;
  background: transparent;
  color: #b42318;
}

.calendar-detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.calendar-detail-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border, #e3e8e5);
}

.calendar-detail-list dt {
  color: var(--color-text-muted, #667085);
  font-size: 12px;
  font-weight: 700;
}

.calendar-detail-list dd {
  margin: 0;
  white-space: pre-wrap;
}

.calendar-detail-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--color-accent-strong, #216d63);
  font-weight: 700;
}

.publication-heading,
.public-publications-header,
.public-publications-header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.publication-heading { margin: 4px 0 18px; }
.publication-heading h2 { margin: 0 0 4px; }

.publication-uploader {
  margin-bottom: 22px;
  padding: 0 18px 18px;
  border: 1px solid var(--color-border, #d9dfdc);
  border-radius: 8px;
  background: #fff;
}

.publication-uploader summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 800;
}

.publication-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.publication-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border, #d9dfdc);
  border-radius: 8px;
  background: #fff;
}

.publication-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f2f4f3;
}

.publication-preview img,
.publication-preview object {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.publication-card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
}

.publication-card__body h2,
.publication-card__body h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.publication-card__body p {
  margin: 0;
  color: var(--color-text-muted, #667085);
  font-size: 13px;
}

.publication-card__actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.public-publications-page {
  min-height: 100vh;
  background: #f6f8f7;
}

.public-publications-header {
  min-height: 74px;
  padding: 12px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--color-border, #d9dfdc);
  background: #fff;
}

.public-publications-header img {
  width: auto;
  max-width: 170px;
  height: 42px;
  object-fit: contain;
}

.public-publications-header > div > div {
  display: grid;
  gap: 2px;
}

.public-publications-header span {
  color: var(--color-text-muted, #667085);
  font-size: 12px;
}

.public-publications-main {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 90px;
}

.public-publications-main > header { margin-bottom: 24px; }
.public-publications-main h1 { margin: 3px 0 7px; }

@media (max-width: 980px) {
  .publication-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-legend { width: 100%; margin-left: 0; }
}

@media (max-width: 680px) {
  .calendar-page .page-heading--compact,
  .publication-heading,
  .public-publications-header {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-page .page-heading--compact .button,
  .publication-heading .button,
  .public-publications-header .button {
    width: 100%;
    justify-content: center;
  }

  .calendar-toolbar label { flex: 1 1 100%; }
  .calendar-surface { min-height: 520px; padding: 8px; }
  .form-grid--compact { grid-template-columns: 1fr; }
  .form-field--wide { grid-column: auto; }
  [data-calendar-field="recurrence_weekdays"] > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .calendar-event-form,
  .calendar-dialog--detail article { padding: 18px; }
  .calendar-detail-list > div { grid-template-columns: 1fr; gap: 4px; }
  .calendar-series-choice { grid-template-columns: 1fr; }
  .publication-grid { grid-template-columns: 1fr; }
  .public-publications-main { width: min(100% - 24px, 1280px); padding-top: 28px; }
}
