:root {
  --font-ui: Aptos, "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
  --font-display: Bahnschrift, "Aptos Display", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
  --ink: #1f2933;
  --muted: #65717d;
  --line: #cfd8df;
  --soft-line: #e7edf2;
  --surface: #ffffff;
  --surface-warm: #fffaf6;
  --soft: #f5f7fb;
  --black: #13251f;
  --panel: #12343b;
  --accent: #e85d3f;
  --accent-dark: #b83b25;
  --accent-soft: #fff0eb;
  --teal: #0a8f78;
  --gold: #c48a16;
  --violet: #5a45b8;
  --radius: 6px;
  --shadow: 0 16px 34px rgba(19, 37, 31, 0.14);
  --soft-shadow: 0 8px 22px rgba(31, 41, 51, 0.08);
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.quiet-button.inverse {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
}

.quiet-button.inverse:hover {
  background: rgba(255, 255, 255, 0.14);
}

.catalog-view,
.account-view,
.dashboard-view,
.admin-view {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto;
}

.view-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.view-heading h2,
.view-heading p {
  margin: 0;
}

.view-heading h2 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.15;
}

.section-eyebrow {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.catalog-filters,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.catalog-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.catalog-filters input,
.catalog-filters select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
}

.dashboard-card,
.lms-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.dashboard-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.dashboard-card.wide {
  grid-column: span 2;
}

.dashboard-card.full {
  grid-column: 1 / -1;
}

.dashboard-card h3,
.lms-item h4 {
  margin: 0;
  font-family: var(--font-display);
}

.dashboard-card p,
.lms-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-list,
.lms-list {
  display: grid;
  gap: 10px;
}

.lms-item {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.lms-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-options label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.discussion-editor {
  margin-bottom: 14px;
}

.course-card {
  display: grid;
  grid-template-rows: 130px 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.course-card-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(19, 37, 31, 0.92), rgba(18, 52, 59, 0.86)),
    linear-gradient(35deg, var(--teal), var(--violet) 58%, var(--accent));
}

.course-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card-media span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
}

.course-card-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.course-card-top,
.course-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.course-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.3;
}

.course-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.course-card > .primary-action {
  margin: 0 14px 14px;
}

.course-category,
.course-card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.ready {
  color: #075c4d;
  background: #d8f7ef;
}

.status-pill.warning {
  color: #8a4b05;
  background: #fff2c9;
}

.status-pill.neutral {
  color: #394b58;
  background: #edf2f5;
}

.admin-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 16px;
  margin-bottom: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.account-details-list {
  margin-bottom: 22px;
}

.account-course-title {
  margin-top: 10px;
}

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

.account-course-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.account-course-row strong,
.account-course-row small {
  display: block;
}

.account-course-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-metrics article {
  display: grid;
  gap: 4px;
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.admin-metrics span,
.admin-metrics small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-metrics strong {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.intake-panel {
  margin-bottom: 16px;
}

.admin-list,
.user-table {
  display: grid;
  gap: 8px;
}

.admin-course-row,
.user-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 10px;
  text-align: left;
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-course-status {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.admin-course-row:hover,
.user-row:hover,
.course-card:hover {
  border-color: rgba(232, 93, 63, 0.42);
  box-shadow: 0 14px 30px rgba(31, 41, 51, 0.12);
  transform: translateY(-1px);
}

.analytics-table,
.activity-list {
  display: grid;
  gap: 8px;
}

.analytics-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 140px 72px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
}

.analytics-row strong,
.activity-item span {
  display: block;
  font-weight: 800;
}

.analytics-row small,
.activity-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.activity-item {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
}

.user-row {
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto) auto;
}

.admin-course-row strong,
.user-row strong {
  display: block;
}

.admin-course-row small,
.user-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label,
.admin-form fieldset {
  display: grid;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  font: inherit;
  background: #ffffff;
}

.admin-form textarea {
  min-height: 96px;
  padding: 10px;
  resize: vertical;
}

.admin-form input[type="file"] {
  padding: 8px 10px;
  background: var(--surface-warm);
}

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

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

.intake-job {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
}

.intake-job strong,
.intake-job small {
  display: block;
}

.intake-job small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.intake-job code {
  grid-column: 1 / -1;
  overflow: auto;
  border-radius: 6px;
  padding: 8px;
  color: #442686;
  background: #f1efff;
  font-size: 12px;
  font-weight: 800;
}

.admin-form fieldset {
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 10px;
}

.admin-form legend {
  padding: 0 4px;
}

.enrollment-list {
  max-height: 180px;
  overflow: auto;
  display: grid;
  gap: 6px;
}

.inline-check {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px !important;
  align-items: center;
  color: var(--ink) !important;
  font-weight: 700 !important;
}

.inline-check input {
  min-height: auto;
  width: 16px;
  height: 16px;
}

.form-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f7fafc 0, #f4f7fb 420px, #f6f7fb 100%);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(232, 93, 63, 0.35);
  outline-offset: 2px;
}

a {
  color: inherit;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(19, 37, 31, 0.94), rgba(18, 52, 59, 0.9)),
    var(--panel);
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h2,
.auth-card p {
  margin: 0;
}

.auth-card h2 {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.2;
}

.auth-card p {
  color: var(--muted);
  line-height: 1.45;
}

.auth-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-card input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
}

.auth-message {
  min-height: 20px;
  color: #b42318 !important;
  font-size: 13px;
  font-weight: 700;
}

.topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 420px) auto;
  gap: 18px;
  align-items: center;
  padding: 12px 22px;
  color: #ffffff;
  background:
    linear-gradient(115deg, #13251f 0, #12343b 62%, #2f335f 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-main {
  min-width: 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #13251f;
  background: linear-gradient(135deg, #f7c85c, #ee7f4b);
  font-family: var(--font-display);
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(232, 93, 63, 0.22);
}

.course-title-group {
  min-width: 0;
}

.course-kicker {
  margin: 0 0 2px;
  color: #cfe3df;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar h1 {
  margin: 0;
  overflow: hidden;
  font-family: var(--font-display);
  color: #ffffff;
  font-size: 17px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-progress {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d8e6e3;
  font-size: 12px;
}

.progress-copy strong {
  color: #ffffff;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #f7c85c, #ee7f4b);
  border-radius: inherit;
  transition: width 180ms ease;
}

.primary-action,
.quiet-button {
  min-height: 38px;
  border-radius: var(--radius);
  padding: 0 14px;
  font-weight: 700;
  white-space: nowrap;
}

.primary-action {
  border: 1px solid var(--accent);
  color: #ffffff;
  background: linear-gradient(180deg, #ee694b, var(--accent-dark));
  box-shadow: 0 8px 18px rgba(232, 93, 63, 0.22);
}

.primary-action:hover {
  background: linear-gradient(180deg, #f07254, #a93220);
  border-color: var(--accent-dark);
}

.primary-action:disabled,
.quiet-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.quiet-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.quiet-button:hover {
  background: #eef5f4;
}

.quiet-button.compact {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.course-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
}

.watch-column {
  min-width: 0;
}

.player-stage {
  position: relative;
  background: #050b0a;
  padding: 0 clamp(16px, 3vw, 44px);
}

.player-stage video {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: calc(100vh - 150px);
  aspect-ratio: 16 / 9;
  display: block;
  margin: 0 auto;
  background: #050b0a;
}

.player-stage iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: calc(100vh - 150px);
  aspect-ratio: 16 / 9;
  display: block;
  margin: 0 auto;
  border: 0;
  background: #050b0a;
}

.player-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #d8e6e3;
  background: #050b0a;
  font-size: 14px;
  font-weight: 800;
}

.player-status.ready {
  display: none;
}

.lesson-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px clamp(18px, 3vw, 44px) 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--soft-line);
}

.lesson-header h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 26px;
  line-height: 1.22;
  letter-spacing: 0;
}

.module-label {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}

.lesson-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.lesson-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.control-strip {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px clamp(18px, 3vw, 44px);
  background: var(--surface);
  border-bottom: 1px solid var(--soft-line);
}

.utility-link {
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.utility-link:hover {
  text-decoration: underline;
}

.speed-control {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.speed-control select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  background: #ffffff;
}

.resume-status {
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.lesson-workspace {
  padding: 0 clamp(18px, 3vw, 44px) 38px;
}

.tabs {
  display: flex;
  gap: 24px;
  align-items: end;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tab-button {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 17px 0 13px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.tab-button:focus-visible {
  outline-offset: 5px;
}

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

.tab-panel {
  display: none;
  padding-top: 22px;
}

.tab-panel.active {
  display: block;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.overview-block,
.notes-editor,
.empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.overview-block {
  padding: 18px;
}

.overview-block h3,
.section-title h3,
.curriculum-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.25;
}

.metrics-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.metrics-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.metrics-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metrics-list dd {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.focus-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 18px;
  color: #31414c;
  line-height: 1.45;
}

.resource-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 16px;
}

.inline-search,
.curriculum-search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inline-search input,
.inline-search select,
.curriculum-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
}

.inline-search input:focus,
.inline-search select:focus,
.curriculum-search input:focus,
.notes-editor textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 93, 63, 0.14);
}

.resource-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
}

.filter-chip.active {
  color: #ffffff;
  border-color: var(--panel);
  background: linear-gradient(135deg, var(--panel), #2f335f);
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

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

.materials-list {
  display: grid;
  gap: 9px;
}

.transcript-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.transcript-toolbar .inline-search {
  min-width: min(320px, 100%);
}

.transcript-body {
  display: grid;
  gap: 10px;
}

.transcript-body > p,
.transcript-cue {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.transcript-body > p {
  margin: 0;
  color: #31414c;
  line-height: 1.6;
}

.transcript-cue {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.transcript-cue p {
  margin: 0;
  color: #31414c;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.material-link {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
}

.material-link:hover {
  border-color: rgba(232, 93, 63, 0.42);
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.1);
}

.material-link.previewable {
  cursor: zoom-in;
}

.material-action {
  justify-self: end;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--panel);
  background: #f6fbfa;
  font-size: 12px;
  font-weight: 800;
}

.material-link:hover .material-action {
  border-color: rgba(10, 143, 120, 0.34);
  background: #e9f8f5;
}

.material-link.locked {
  color: var(--muted);
  background: #f6f8fa;
}

.material-link.locked:hover {
  border-color: var(--line);
  box-shadow: none;
}

body.pdf-viewer-open {
  overflow: hidden;
}

.pdf-viewer-modal[hidden] {
  display: none;
}

.pdf-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.pdf-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 22, 32, 0.72);
  backdrop-filter: blur(8px);
}

.pdf-viewer-window {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100vw - 32px));
  height: min(860px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.pdf-viewer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #f6fbfa);
}

.pdf-viewer-header h2,
.pdf-viewer-header p {
  margin: 0;
}

.pdf-viewer-header h2 {
  max-width: 680px;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-viewer-header p:not(.section-eyebrow) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pdf-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pdf-viewer-actions .quiet-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.pdf-viewer-body {
  min-height: 0;
  background: #202833;
}

.pdf-viewer-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.course-editor-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-content-editor {
  display: grid;
  gap: 12px;
  margin: 6px 0;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfcfd;
}

.poster-editor,
.material-upload-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.poster-preview {
  width: 120px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: #eef5f4;
  font-size: 12px;
  font-weight: 800;
}

.poster-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lesson-material-admin-list {
  display: grid;
  gap: 8px;
}

.lesson-material-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
}

.lesson-material-admin-row strong,
.lesson-material-admin-row small {
  display: block;
}

.lesson-material-admin-row small {
  color: var(--muted);
  margin-top: 3px;
}

.compact-title {
  margin-top: 0;
}

.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.badge {
  width: fit-content;
  min-width: 58px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: var(--teal);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.badge.pdf {
  background: #b42318;
}

.badge.xlsx,
.badge.xls {
  background: var(--teal);
}

.badge.xer,
.badge.plf {
  background: #157a9b;
}

.badge.docx,
.badge.doc {
  background: var(--violet);
}

.badge.pptx {
  background: var(--gold);
}

.material-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.35;
}

.material-size {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.notes-editor {
  padding: 14px;
  margin-bottom: 18px;
}

.notes-editor textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  outline: none;
}

.notes-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

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

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

.note-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface);
}

.note-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.note-time {
  border: 0;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  font-weight: 800;
}

.delete-note {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.note-body {
  margin: 0;
  color: #31414c;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.curriculum-panel {
  min-width: 0;
  height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
  display: flex;
  flex-direction: column;
  background: #fbfcfd;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(31, 41, 51, 0.08);
}

.curriculum-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.curriculum-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.curriculum-search {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.module-nav {
  min-height: 0;
  overflow: auto;
}

.module {
  border-bottom: 1px solid var(--line);
}

.module-heading {
  width: 100%;
  border: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 15px 18px;
  color: var(--ink);
  background: #f5f8fa;
  text-align: left;
}

.module-heading:hover {
  background: #eef5f4;
}

.module-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.module-summary {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.module-chevron {
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.lesson-list {
  display: none;
}

.module.open .lesson-list {
  display: grid;
}

.lesson-button {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--soft-line);
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 18px;
  color: var(--ink);
  background: #ffffff;
  text-align: left;
}

.lesson-button:hover {
  background: #f7fbfa;
}

.lesson-button.active {
  background: var(--accent-soft);
  box-shadow: inset 4px 0 0 var(--accent);
}

.lesson-button.hidden-completed.completed {
  display: none;
}

.status-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #8a99a5;
  border-radius: 50%;
  margin-top: 1px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.lesson-button.completed .status-dot {
  border-color: var(--teal);
  background: var(--teal);
}

.lesson-button.completed .status-dot::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.lesson-row-main {
  min-width: 0;
}

.lesson-row-title {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.lesson-row-meta {
  margin-top: 5px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mini-progress {
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  background: #e6edf2;
  border-radius: 99px;
}

.mini-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.empty {
  padding: 16px;
  color: var(--muted);
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-progress {
    grid-column: 1 / -1;
  }

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

  .admin-grid,
  .account-grid,
  .admin-insights,
  .admin-metrics,
  .dashboard-grid,
  .catalog-filters,
  .form-grid,
  .poster-editor,
  .material-upload-row {
    grid-template-columns: 1fr 1fr;
  }

  .curriculum-panel {
    height: auto;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
  }

  .module-nav {
    max-height: 48vh;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .course-shell {
    min-height: auto;
  }

  .lesson-header {
    flex-direction: column;
  }

  .lesson-actions,
  .lesson-actions button,
  .button-row,
  .button-row button,
  .primary-action,
  .quiet-button {
    width: 100%;
  }

  .control-strip,
  .button-row,
  .notes-actions,
  .transcript-toolbar,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

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

  .admin-grid,
  .account-grid,
  .admin-insights,
  .admin-metrics,
  .analytics-row,
  .dashboard-grid,
  .catalog-filters,
  .form-grid,
  .intake-job,
  .lesson-material-admin-row,
  .poster-editor,
  .material-upload-row,
  .user-row {
    grid-template-columns: 1fr;
  }

  .dashboard-card.wide {
    grid-column: auto;
  }

  .poster-preview {
    width: 100%;
  }

  .admin-course-status {
    justify-items: start;
  }

  .account-course-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .material-link {
    grid-template-columns: 1fr;
  }

  .material-action {
    justify-self: start;
  }

  .pdf-viewer-modal {
    padding: 8px;
  }

  .pdf-viewer-window {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    border-radius: 10px;
  }

  .pdf-viewer-header {
    align-items: stretch;
    flex-direction: column;
    padding: 12px;
  }

  .pdf-viewer-header h2 {
    max-width: 100%;
    white-space: normal;
  }

  .pdf-viewer-actions {
    justify-content: stretch;
  }

  .pdf-viewer-actions > * {
    flex: 1 1 auto;
    text-align: center;
  }

  .transcript-cue {
    grid-template-columns: 1fr;
  }

  .material-size {
    white-space: normal;
  }

  .lesson-header h2 {
    font-size: 21px;
  }
}

/* Production LMS visual system */
:root {
  --font-ui: "Segoe UI Variable Text", "Inter", "Aptos", "Segoe UI", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Plus Jakarta Sans", "Aptos Display", "Segoe UI", Arial, sans-serif;
  --ink: #17212b;
  --ink-strong: #0b1620;
  --muted: #627082;
  --muted-strong: #485766;
  --line: #d7e1e8;
  --soft-line: #e8eef2;
  --surface: #ffffff;
  --surface-warm: #fff7f1;
  --surface-cool: #f5faf8;
  --soft: #f4f7f8;
  --black: #071110;
  --panel: #0f2f2c;
  --panel-2: #18324a;
  --accent: #d85f3d;
  --accent-dark: #a84529;
  --accent-soft: #fff1eb;
  --teal: #0b907b;
  --blue: #2767c9;
  --gold: #c78b1e;
  --violet: #6a5ac7;
  --danger: #b42318;
  --success-soft: #dcf8ec;
  --warning-soft: #fff3cf;
  --radius: 8px;
  --shadow: 0 24px 60px rgba(15, 47, 44, 0.17);
  --soft-shadow: 0 14px 34px rgba(23, 33, 43, 0.09);
  --hairline-shadow: 0 1px 0 rgba(255, 255, 255, 0.72) inset;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(244, 249, 249, 0.96) 0, rgba(239, 245, 243, 0.96) 360px, #f8fafb 100%),
    repeating-linear-gradient(135deg, rgba(15, 47, 44, 0.034) 0 1px, transparent 1px 18px);
  font-family: var(--font-ui);
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body[data-view="course"] {
  background: #f6f8fa;
}

body.has-auth-gate {
  overflow: hidden;
}

::selection {
  color: #ffffff;
  background: var(--accent-dark);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(15, 47, 44, 0.3);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 47, 44, 0.48);
  background-clip: padding-box;
}

button,
a,
input,
select,
textarea {
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(216, 95, 61, 0.24);
  outline-offset: 2px;
}

.auth-gate {
  align-items: center;
  justify-items: center;
  background:
    linear-gradient(120deg, rgba(8, 26, 24, 0.97), rgba(16, 58, 52, 0.96) 48%, rgba(31, 49, 70, 0.95)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 52px);
}

.auth-card {
  position: relative;
  width: min(460px, 100%);
  gap: 15px;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  box-shadow: 0 34px 90px rgba(2, 10, 9, 0.32);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--accent));
}

.auth-card h2 {
  color: var(--ink-strong);
  font-size: clamp(28px, 4vw, 34px);
  letter-spacing: 0;
}

.auth-card p {
  color: var(--muted-strong);
  font-size: 16px;
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #111827;
  background:
    linear-gradient(135deg, #ffd568 0, #f4a13f 48%, #dd6945 100%);
  box-shadow: 0 14px 30px rgba(216, 95, 61, 0.24);
}

.auth-card .brand-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
}

.auth-card label,
.catalog-filters label,
.admin-form label,
.admin-form fieldset,
.inline-search,
.curriculum-search,
.speed-control {
  color: var(--muted-strong);
  letter-spacing: 0;
}

.auth-card input,
.catalog-filters input,
.catalog-filters select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.inline-search input,
.inline-search select,
.curriculum-search input,
.notes-editor textarea,
.speed-control select,
.lms-item input,
.lms-item select,
.lms-item textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--hairline-shadow);
}

.auth-card input:hover,
.catalog-filters input:hover,
.catalog-filters select:hover,
.admin-form input:hover,
.admin-form select:hover,
.admin-form textarea:hover,
.inline-search input:hover,
.inline-search select:hover,
.curriculum-search input:hover,
.notes-editor textarea:hover,
.speed-control select:hover,
.lms-item input:hover,
.lms-item select:hover,
.lms-item textarea:hover {
  border-color: #b8c8d2;
}

.auth-card input:focus,
.catalog-filters input:focus,
.catalog-filters select:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.inline-search input:focus,
.inline-search select:focus,
.curriculum-search input:focus,
.notes-editor textarea:focus,
.speed-control select:focus,
.lms-item input:focus,
.lms-item select:focus,
.lms-item textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(216, 95, 61, 0.14);
}

.topbar {
  min-height: 74px;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 460px) auto;
  padding: 14px clamp(18px, 3vw, 34px);
  background:
    linear-gradient(120deg, rgba(9, 28, 26, 0.98), rgba(15, 47, 44, 0.98) 48%, rgba(24, 50, 74, 0.98)),
    linear-gradient(90deg, rgba(255, 213, 104, 0.14), transparent 35%, rgba(216, 95, 61, 0.12));
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 12px 36px rgba(7, 17, 16, 0.18);
}

.topbar h1 {
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 800;
}

.course-kicker {
  color: #bcd9d2;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.topbar-actions {
  justify-content: flex-end;
}

.topbar-progress {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
}

.progress-track {
  height: 7px;
  background: #e6edf0;
  border-radius: 999px;
}

.topbar .progress-track {
  background: rgba(255, 255, 255, 0.2);
}

.progress-track span,
.mini-progress span {
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--accent));
}

.primary-action,
.quiet-button {
  min-height: 40px;
  border-radius: var(--radius);
  font-weight: 800;
  letter-spacing: 0;
}

.primary-action {
  border-color: #b74c30;
  background: linear-gradient(180deg, #e9734f, #be4b2d);
  box-shadow: 0 10px 22px rgba(216, 95, 61, 0.22), var(--hairline-shadow);
}

.primary-action:hover {
  background: linear-gradient(180deg, #ee7d5a, #a94228);
  transform: translateY(-1px);
}

.primary-action:active,
.quiet-button:active {
  transform: translateY(0);
}

.quiet-button {
  border-color: #c9d5dd;
  color: var(--ink);
  background: #ffffff;
  box-shadow: var(--hairline-shadow);
}

.quiet-button:hover {
  border-color: #9fb2bf;
  background: #f4f8f7;
  transform: translateY(-1px);
}

.quiet-button.inverse {
  color: #f8fbfb;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.quiet-button.inverse:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
}

.catalog-view,
.account-view,
.dashboard-view,
.admin-view {
  width: min(1320px, calc(100% - 40px));
  margin: 28px auto 42px;
}

.view-heading {
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 0 4px;
}

.view-heading h2 {
  color: var(--ink-strong);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 850;
  letter-spacing: 0;
}

.view-heading > p,
#catalogStats,
#dashboardStats,
#adminStats,
#accountStatusText {
  width: fit-content;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--hairline-shadow);
}

.section-eyebrow {
  color: var(--accent-dark);
  letter-spacing: 0.1em;
}

.catalog-filters {
  position: sticky;
  top: 86px;
  z-index: 12;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(160px, 0.65fr));
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid rgba(215, 225, 232, 0.9);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

.course-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.course-card {
  position: relative;
  grid-template-rows: 174px 1fr auto;
  border-color: rgba(215, 225, 232, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: var(--hairline-shadow);
}

.course-card-media {
  position: relative;
  align-items: end;
  justify-items: start;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(8, 28, 26, 0.94), rgba(17, 58, 52, 0.88) 48%, rgba(39, 103, 201, 0.68)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
}

.course-card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 54%;
  background: linear-gradient(180deg, transparent, rgba(5, 12, 12, 0.42));
}

.course-card-media img {
  filter: saturate(1.02) contrast(1.02);
}

.course-card-media span {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.course-card-body {
  gap: 12px;
  padding: 17px;
}

.course-card h3 {
  color: var(--ink-strong);
  font-size: 20px;
  font-weight: 850;
}

.course-card p {
  min-height: 42px;
  color: var(--muted-strong);
}

.course-card-top,
.course-card-meta {
  justify-content: space-between;
}

.course-category {
  border-radius: 999px;
  padding: 4px 8px;
  color: #0d5e52;
  background: #e1f5ef;
}

.course-card-meta {
  border-top: 1px solid var(--soft-line);
  padding-top: 10px;
}

.course-card > .primary-action {
  margin: 0 17px 17px;
}

.status-pill {
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 850;
}

.status-pill.ready {
  border-color: rgba(11, 144, 123, 0.16);
  color: #075f50;
  background: var(--success-soft);
}

.status-pill.warning {
  border-color: rgba(199, 139, 30, 0.2);
  color: #7b4b06;
  background: var(--warning-soft);
}

.status-pill.neutral {
  color: #425362;
  background: #eef3f6;
}

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

.dashboard-card {
  position: relative;
  grid-column: span 4;
  overflow: hidden;
  padding: 18px;
  border-color: rgba(215, 225, 232, 0.9);
}

.dashboard-card::before,
.admin-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--accent));
}

.dashboard-card.wide {
  grid-column: span 6;
}

.dashboard-card.full {
  grid-column: 1 / -1;
}

.dashboard-card h3,
.lms-item h4,
.overview-block h3,
.section-title h3,
.curriculum-header h2 {
  color: var(--ink-strong);
  font-weight: 850;
  letter-spacing: 0;
}

.dashboard-card .lms-item {
  border-color: var(--soft-line);
  background: linear-gradient(180deg, #ffffff, #f8fbfb);
  box-shadow: none;
}

.lms-item {
  border-color: rgba(215, 225, 232, 0.9);
  box-shadow: var(--hairline-shadow);
}

.lms-item p {
  color: var(--muted-strong);
}

.admin-metrics {
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 14px;
}

.admin-metrics article,
.admin-panel,
.overview-block,
.notes-editor,
.empty,
.note-item,
.transcript-body > p,
.transcript-cue {
  position: relative;
  border-color: rgba(215, 225, 232, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.admin-metrics article {
  overflow: hidden;
  min-height: 116px;
}

.admin-metrics article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--teal);
}

.admin-metrics article:nth-child(2)::before,
.admin-metrics article:nth-child(6)::before {
  background: var(--gold);
}

.admin-metrics article:nth-child(3)::before,
.admin-metrics article:nth-child(7)::before {
  background: var(--accent);
}

.admin-metrics article:nth-child(4)::before,
.admin-metrics article:nth-child(5)::before {
  background: var(--blue);
}

.admin-metrics strong {
  color: var(--ink-strong);
  font-size: clamp(30px, 3vw, 40px);
}

.admin-panel {
  overflow: hidden;
  padding: 18px;
}

.admin-course-row,
.user-row,
.analytics-row,
.activity-item,
.account-course-row,
.intake-job,
.lesson-material-admin-row {
  border-color: var(--soft-line);
  background: linear-gradient(180deg, #ffffff, #fbfdfd);
}

.admin-course-row:hover,
.user-row:hover,
.course-card:hover,
.analytics-row:hover,
.activity-item:hover,
.account-course-row:hover {
  border-color: rgba(11, 144, 123, 0.34);
  box-shadow: 0 18px 42px rgba(23, 33, 43, 0.12);
  transform: translateY(-2px);
}

.admin-content-editor {
  border-color: rgba(215, 225, 232, 0.95);
  background: linear-gradient(180deg, #fbfdfd, #f6faf8);
}

.poster-preview {
  background:
    linear-gradient(135deg, rgba(15, 47, 44, 0.08), rgba(199, 139, 30, 0.12)),
    #f4f8f7;
}

.intake-job code {
  color: #3e376f;
  background: #f1f0ff;
}

.course-shell {
  min-height: calc(100vh - 74px);
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.player-stage {
  padding: clamp(16px, 2.5vw, 34px);
  background:
    linear-gradient(120deg, #050908, #0a1514 58%, #121b26),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 42px);
}

.player-stage video,
.player-stage iframe {
  overflow: hidden;
  max-height: calc(100vh - 190px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.player-status {
  color: #d9ebe5;
  background: rgba(5, 11, 10, 0.94);
}

.lesson-header {
  padding: 24px clamp(18px, 3vw, 44px) 18px;
  border-bottom: 1px solid var(--soft-line);
  background: #ffffff;
}

.lesson-header h2 {
  color: var(--ink-strong);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 850;
}

.module-label {
  color: var(--accent-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.control-strip,
.tabs {
  background: rgba(255, 255, 255, 0.94);
}

.control-strip {
  border-bottom: 1px solid var(--soft-line);
}

.lesson-workspace {
  padding-bottom: 48px;
}

.tabs {
  position: sticky;
  top: 74px;
  z-index: 10;
  gap: 8px;
  overflow-x: auto;
  padding-top: 8px;
  border-bottom: 1px solid var(--soft-line);
  backdrop-filter: blur(12px);
}

.tab-button {
  min-height: 44px;
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0 13px;
}

.tab-button:hover {
  color: var(--ink);
  background: #f3f7f7;
}

.tab-button.active {
  color: var(--accent-dark);
  border-color: var(--soft-line);
  border-bottom-color: var(--accent);
  background: #ffffff;
}

.overview-grid {
  gap: 20px;
}

.metrics-list div {
  border-bottom: 1px solid var(--soft-line);
  padding-bottom: 10px;
}

.metrics-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.focus-list {
  color: #334452;
}

.material-link {
  border-color: rgba(215, 225, 232, 0.95);
  box-shadow: var(--hairline-shadow);
}

.material-link:hover {
  border-color: rgba(11, 144, 123, 0.34);
}

.badge {
  border-radius: 6px;
  box-shadow: var(--hairline-shadow);
}

.curriculum-panel {
  height: calc(100vh - 74px);
  top: 74px;
  border-left: 1px solid #cfdbe3;
  background: #fbfdfd;
  box-shadow: -18px 0 42px rgba(23, 33, 43, 0.09);
}

.curriculum-header {
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(15, 47, 44, 0.04), rgba(199, 139, 30, 0.08)),
    #ffffff;
}

.curriculum-search {
  padding: 14px 20px;
  background: #ffffff;
}

.module-heading {
  padding: 16px 20px;
  background: #f4f8f8;
}

.module-heading:hover {
  background: #edf6f4;
}

.module-title {
  color: var(--ink-strong);
  font-size: 15px;
  font-weight: 850;
}

.module-summary {
  color: var(--muted-strong);
}

.module-chevron {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--panel);
  background: #e1eeeb;
}

.lesson-button {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 20px;
}

.lesson-button:hover {
  background: #f6fbfa;
}

.lesson-button.active {
  background: #fff4ee;
  box-shadow: inset 5px 0 0 var(--accent);
}

.lesson-row-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.lesson-row-meta {
  color: var(--muted-strong);
}

.status-dot {
  width: 20px;
  height: 20px;
  border-color: #9caab5;
}

.empty-state,
.empty {
  border: 1px dashed #c7d4dc;
  border-radius: var(--radius);
  padding: 18px;
  color: var(--muted-strong);
  background: #fbfdfd;
  font-weight: 750;
}

.auth-message,
.form-message {
  font-weight: 800;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .topbar-progress {
    grid-column: 1 / -1;
  }

  .admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .curriculum-panel {
    height: auto;
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
  }

  .tabs {
    top: 0;
  }
}

@media (max-width: 860px) {
  .catalog-view,
  .account-view,
  .dashboard-view,
  .admin-view {
    width: min(1320px, calc(100% - 28px));
    margin-top: 18px;
  }

  .view-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-heading > p,
  #catalogStats,
  #dashboardStats,
  #adminStats,
  #accountStatusText {
    margin-left: 0;
  }

  .catalog-filters {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

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

  .dashboard-card,
  .dashboard-card.wide,
  .dashboard-card.full {
    grid-column: auto;
  }

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

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .auth-gate {
    place-items: stretch;
  }

  .auth-card {
    align-self: center;
    width: 100%;
    padding: 24px;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .topbar-actions {
    justify-content: stretch;
    overflow-x: auto;
  }

  .topbar-actions .quiet-button,
  .topbar-actions .primary-action {
    width: auto;
    flex: 1 0 auto;
  }

  .catalog-filters,
  .admin-metrics,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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

  .course-card {
    grid-template-rows: 150px 1fr auto;
  }

  .tabs {
    position: static;
    padding-top: 0;
  }

  .tab-button {
    flex: 0 0 auto;
  }

  .curriculum-header,
  .curriculum-search,
  .module-heading,
  .lesson-button {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Modern LMS polish - May 2026 */
:root {
  --font-ui: "Segoe UI Variable Text", "Inter", "Aptos", "Segoe UI", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", Arial, sans-serif;
  --ink: #14212a;
  --ink-strong: #07131b;
  --muted: #647382;
  --muted-strong: #435465;
  --line: #cfdae2;
  --soft-line: #e6edf2;
  --surface: #ffffff;
  --soft: #eef4f6;
  --panel: #0d2f34;
  --accent: #d85f3d;
  --accent-dark: #a9432a;
  --teal: #0b907b;
  --gold: #c78b1e;
  --blue: #2f75bb;
  --violet: #5746a6;
  --success-soft: #dff8ef;
  --warning-soft: #fff2c7;
  --radius: 8px;
  --hairline-shadow: 0 1px 0 rgba(10, 24, 32, 0.05);
  --soft-shadow: 0 12px 32px rgba(13, 31, 42, 0.1);
  --deep-shadow: 0 22px 58px rgba(11, 22, 32, 0.18);
}

* {
  letter-spacing: 0;
}

html {
  background: #edf3f5;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(239, 245, 247, 0.94), rgba(248, 250, 250, 0.98) 48%, #ffffff),
    linear-gradient(90deg, rgba(11, 144, 123, 0.08), transparent 32%, rgba(216, 95, 61, 0.08)),
    #edf3f5;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(13, 47, 52, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 47, 52, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 62%);
}

.topbar {
  min-height: 78px;
  align-items: center;
  background:
    linear-gradient(120deg, rgba(8, 24, 29, 0.96), rgba(11, 48, 54, 0.94) 52%, rgba(18, 41, 65, 0.94)),
    linear-gradient(90deg, rgba(11, 144, 123, 0.24), transparent 44%, rgba(216, 95, 61, 0.18));
  box-shadow: 0 18px 54px rgba(6, 18, 24, 0.22);
  backdrop-filter: blur(18px);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
}

.brand-mark {
  border-radius: 8px;
  color: #0c1620;
  background:
    linear-gradient(135deg, #ffe28a 0%, #f5ae4f 44%, #d85f3d 100%);
  box-shadow: 0 12px 28px rgba(216, 95, 61, 0.28);
}

.course-kicker,
.section-eyebrow,
.module-label {
  letter-spacing: 0;
  text-transform: none;
}

.section-eyebrow {
  width: fit-content;
  border: 1px solid rgba(11, 144, 123, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: #096e60;
  background: #e6f7f2;
}

.topbar-progress {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.topbar-actions .primary-action,
.topbar-actions .quiet-button {
  min-height: 38px;
}

.primary-action,
.quiet-button {
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.primary-action {
  border-color: #b3482c;
  background:
    linear-gradient(180deg, #f07a55, #b9492d);
  box-shadow: 0 12px 24px rgba(216, 95, 61, 0.24), var(--hairline-shadow);
}

.primary-action:hover {
  box-shadow: 0 16px 30px rgba(216, 95, 61, 0.3), var(--hairline-shadow);
}

.catalog-view,
.dashboard-view,
.admin-view,
.account-view {
  width: min(1380px, calc(100% - 48px));
}

.view-heading {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  align-items: center;
  border: 1px solid rgba(207, 218, 226, 0.86);
  border-radius: var(--radius);
  padding: clamp(18px, 2.8vw, 28px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(245, 250, 249, 0.86)),
    repeating-linear-gradient(135deg, rgba(11, 144, 123, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: var(--soft-shadow);
}

.view-heading::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--gold), var(--accent));
}

.view-heading h2 {
  max-width: 760px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
}

.view-heading > p,
#catalogStats,
#dashboardStats,
#adminStats,
#accountStatusText {
  border-color: rgba(207, 218, 226, 0.92);
  color: #25404c;
  background: rgba(255, 255, 255, 0.86);
}

.catalog-filters {
  top: 92px;
  border-color: rgba(207, 218, 226, 0.82);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 252, 251, 0.88));
  box-shadow: 0 18px 42px rgba(13, 31, 42, 0.1);
}

.catalog-filters input,
.catalog-filters select,
.admin-form input,
.admin-form select,
.admin-form textarea,
.inline-search input,
.inline-search select,
.curriculum-search input,
.notes-editor textarea,
.speed-control select,
.lms-item input,
.lms-item select,
.lms-item textarea {
  min-height: 42px;
  border-color: #cbd8e0;
}

.catalog-filters input:focus,
.catalog-filters select:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.inline-search input:focus,
.inline-search select:focus,
.curriculum-search input:focus,
.notes-editor textarea:focus,
.speed-control select:focus,
.lms-item input:focus,
.lms-item select:focus,
.lms-item textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(11, 144, 123, 0.14);
}

.course-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.course-card {
  isolation: isolate;
  grid-template-rows: 188px 1fr auto;
  border-color: rgba(205, 218, 226, 0.88);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.course-card:hover {
  border-color: rgba(11, 144, 123, 0.42);
  box-shadow: var(--deep-shadow);
  transform: translateY(-4px);
}

.course-card-media {
  padding: 20px;
  background:
    linear-gradient(140deg, rgba(9, 28, 33, 0.96), rgba(13, 71, 70, 0.78) 54%, rgba(47, 117, 187, 0.74)),
    linear-gradient(45deg, rgba(199, 139, 30, 0.22), transparent 50%);
}

.course-card[data-course-state="locked"] .course-card-media {
  background:
    linear-gradient(140deg, rgba(49, 61, 73, 0.94), rgba(99, 112, 126, 0.78)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px);
}

.course-card[data-course-state="conversion"] .course-card-media {
  background:
    linear-gradient(140deg, rgba(77, 55, 15, 0.94), rgba(199, 139, 30, 0.72), rgba(216, 95, 61, 0.72));
}

.course-card-media img {
  transform: scale(1.01);
}

.course-card:hover .course-card-media img {
  transform: scale(1.045);
}

.course-card-body {
  padding: 18px;
}

.course-card h3 {
  font-size: 21px;
  line-height: 1.22;
}

.course-card-meta {
  justify-content: flex-start;
  gap: 8px;
}

.course-card-meta span {
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f7fafb;
}

.course-card > .primary-action {
  justify-self: stretch;
  margin: 0 18px 18px;
}

.dashboard-grid {
  align-items: start;
  gap: 18px;
}

.dashboard-card,
.admin-panel,
.admin-metrics article,
.lms-item,
.account-course-row,
.admin-course-row,
.user-row,
.analytics-row,
.activity-item,
.intake-job,
.lesson-material-admin-row {
  border-color: rgba(205, 218, 226, 0.9);
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-card {
  min-height: 230px;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.dashboard-card::before,
.admin-panel::before {
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--gold), var(--accent));
}

.dashboard-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.dashboard-card-mark {
  width: 12px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal), var(--blue));
}

.dashboard-card:nth-child(2n) .dashboard-card-mark {
  background: linear-gradient(180deg, var(--gold), var(--accent));
}

.dashboard-card:nth-child(3n) .dashboard-card-mark {
  background: linear-gradient(180deg, var(--violet), var(--blue));
}

.dashboard-card-header h3 {
  min-width: 0;
  font-size: 18px;
}

.dashboard-card-meta {
  justify-self: end;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted-strong);
  background: #f7fafb;
}

.dashboard-card .lms-item {
  border: 0;
  border-bottom: 1px solid var(--soft-line);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-card .lms-item:last-child {
  border-bottom: 0;
}

.lms-item h4,
.account-course-row strong,
.admin-course-row strong,
.analytics-row strong {
  color: var(--ink-strong);
}

.admin-metrics {
  gap: 16px;
}

.admin-metrics article {
  min-height: 128px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 251, 0.96));
  box-shadow: var(--soft-shadow);
}

.admin-metrics article::before {
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.admin-metrics article:nth-child(2)::before,
.admin-metrics article:nth-child(6)::before {
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.admin-metrics article:nth-child(3)::before,
.admin-metrics article:nth-child(7)::before {
  background: linear-gradient(90deg, var(--violet), var(--blue));
}

.admin-metrics span {
  color: var(--muted-strong);
  font-weight: 850;
}

.admin-metrics strong {
  margin-top: 8px;
}

.admin-panel {
  padding: 20px;
  box-shadow: var(--soft-shadow);
}

.admin-course-row,
.user-row,
.analytics-row,
.activity-item,
.account-course-row,
.intake-job,
.lesson-material-admin-row {
  border-radius: var(--radius);
  box-shadow: var(--hairline-shadow);
}

.admin-course-row:hover,
.user-row:hover,
.analytics-row:hover,
.activity-item:hover,
.account-course-row:hover {
  box-shadow: 0 14px 34px rgba(13, 31, 42, 0.12);
}

.player-stage {
  background:
    linear-gradient(120deg, #04100f, #081c1e 48%, #101d2c),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 42px);
}

.player-stage video,
.player-stage iframe {
  border-radius: 8px;
}

.lesson-header {
  background:
    linear-gradient(135deg, #ffffff, #f7fbfb);
}

.tabs {
  background: rgba(255, 255, 255, 0.92);
}

.tab-button.active {
  color: #085f54;
  border-bottom-color: var(--teal);
}

.curriculum-panel {
  background:
    linear-gradient(180deg, #ffffff, #f5f9f8);
}

.module-heading {
  background: #f4f8f8;
}

.module.open .module-heading {
  background: #eaf6f3;
}

.lesson-button.active {
  background: #eaf7f3;
  box-shadow: inset 5px 0 0 var(--teal);
}

.material-action,
.status-pill,
.badge {
  border-radius: 999px;
}

.pdf-viewer-window {
  border-radius: 8px;
}

@media (max-width: 860px) {
  .catalog-view,
  .dashboard-view,
  .admin-view,
  .account-view {
    width: min(100% - 28px, 1380px);
  }

  .view-heading {
    min-height: 0;
    align-items: flex-start;
  }

  .catalog-filters {
    top: auto;
  }

  .dashboard-card-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-card-meta {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 0;
  }

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

  .course-card {
    grid-template-rows: 164px 1fr auto;
  }
}
