:root {
  --ink: #071626;
  --ink-soft: #173252;
  --paper: #f5f9fc;
  --white: #ffffff;
  --line: #d6e3ee;
  --blue: #1f6feb;
  --blue-deep: #123a65;
  --blue-soft: #e6f1ff;
  --cyan: #2bbfd3;
  --green: #4f9f5e;
  --gold: #d59b2d;
  --orange: #d9573d;
  --muted: #607080;
  --shadow: 0 18px 45px rgba(7, 22, 38, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body.is-authenticated .access-panel,
body:not(.is-authenticated) .dashboard {
  display: none !important;
}

body.is-investor-role [data-admin-only],
body.is-investor-role [data-view-link]:not([data-view-link="investors"]) {
  display: none !important;
}

body.is-investor-role .investor-workbench {
  grid-template-columns: minmax(0, 760px);
}

body.is-investor-role .investor-feed-panel {
  max-width: 760px;
}

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

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

.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  color: var(--paper);
  background: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 900;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: contain;
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 36px;
}

.side-nav a {
  padding: 12px 14px;
  color: rgba(245, 249, 252, 0.76);
  border-radius: 8px;
  font-weight: 850;
}

.side-nav a.is-active,
.side-nav a:hover {
  color: var(--ink);
  background: var(--cyan);
}

.admin-main {
  min-width: 0;
  padding: 30px;
}

.topbar,
.panel-header,
.detail-header,
.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 26px;
}

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

.session-pill,
.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--ink-soft);
  background: var(--blue-soft);
  border: 1px solid rgba(31, 111, 235, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 24px;
}

p {
  font-size: 16px;
  line-height: 1.55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  padding: 10px 14px;
}

.button-primary {
  color: var(--ink);
  background: var(--cyan);
  border-color: var(--cyan);
}

.button-secondary {
  color: #071626;
  background: #ffffff;
  border-color: #b8c8d8;
}

.button:disabled {
  color: #3f5268;
  background: #eef4f9;
  border-color: #c9d8e6;
  cursor: not-allowed;
  opacity: 1;
}

.access-panel,
.lead-list-panel,
.lead-detail-panel,
.admin-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.access-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: start;
  padding: 28px;
}

.login-form,
.lead-detail:not([hidden]),
.user-form,
.company-form,
.person-form,
.course-form,
.module-form,
.lesson-form {
  display: grid;
  gap: 16px;
}

label,
.search-box {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 10px 12px;
}

textarea {
  min-height: 130px;
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.14);
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  display: grid;
  gap: 7px;
  padding: 16px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.stat.is-active {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(43, 191, 211, 0.15);
}

.workbench {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.lead-list-panel,
.lead-detail-panel {
  min-height: 620px;
  padding: 20px;
}

.admin-panel {
  padding: 22px;
}

.admin-panel > .panel-header {
  margin-bottom: 18px;
}

.lead-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.lead-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px;
  text-align: left;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.lead-card:hover,
.lead-card.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.lead-card-header,
.lead-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lead-card strong {
  font-size: 15px;
}

.lead-card span,
.lead-card small,
.detail-grid dt,
.status-message {
  color: var(--muted);
}

.lead-card small {
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  color: var(--ink);
  background: var(--blue-soft);
  border: 1px solid rgba(31, 111, 235, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.status-pill[data-status="follow_up"] {
  background: #fff4d7;
  border-color: rgba(213, 155, 45, 0.28);
}

.status-pill[data-status="company_lead"],
.status-pill[data-status="investor_lead"],
.status-pill[data-status="partner_lead"] {
  background: #e7f6ea;
  border-color: rgba(79, 159, 94, 0.25);
}

.status-pill[data-status="not_a_fit"] {
  background: #f1f3f6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-grid div {
  min-width: 0;
  padding: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-grid dt {
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.detail-grid dd {
  min-width: 0;
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.empty-detail {
  padding: 34px 8px;
}

.detail-header a {
  display: inline-block;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 850;
}

.status-message,
.login-status {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.login-status {
  margin: 0;
  color: var(--muted);
}

.user-grid,
.report-grid,
.settings-grid,
.course-grid,
.company-workbench,
.team-workbench,
.course-workbench,
.builder-workbench,
.assignment-workbench,
.investor-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.user-form,
.user-list-panel,
.investor-update-form,
.investor-feed-panel,
.company-list-panel,
.company-detail-panel,
.team-panel,
.person-form,
.people-list-panel,
.course-list-panel,
.course-detail-panel,
.course-builder-panel,
.module-form,
.lesson-form,
.resource-library,
.assignment-form-panel,
.assignment-list-panel,
.report-card,
.metric-card,
.sheet-panel {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-form h3,
.user-list-panel h3,
.investor-update-form h3,
.investor-feed-panel h3,
.company-list-panel h3,
.company-detail-panel h3,
.person-form h4,
.people-list-panel h4,
.course-list-panel h3,
.course-detail-panel h3,
.module-form h4,
.lesson-form h4,
.resource-library h4,
.assignment-form-panel h3,
.assignment-list-panel h3,
.report-card h3,
.sheet-panel h3 {
  margin: 0 0 14px;
}

.user-list,
.update-list,
.company-list,
.people-list,
.course-list,
.course-structure,
.asset-list,
.assignment-list {
  display: grid;
  gap: 10px;
}

.user-card,
.update-card,
.company-card,
.person-card,
.course-card,
.module-card,
.lesson-card,
.asset-card,
.assignment-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.company-card,
.course-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.course-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.password-reset-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.company-card:hover,
.company-card.is-selected,
.course-card:hover,
.course-card.is-selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.user-card strong,
.update-card strong,
.company-card strong,
.person-card strong,
.course-card strong,
.module-card strong,
.lesson-card strong,
.asset-card strong,
.assignment-card strong {
  font-size: 15px;
}

.user-card span,
.update-card span,
.company-card span,
.person-card span,
.course-card span,
.module-card span,
.lesson-card span,
.asset-card span,
.assignment-card span,
.report-card p,
.metric-card p,
.panel-note {
  color: var(--muted);
}

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

@media (max-width: 720px) {
  .password-reset-form {
    grid-template-columns: 1fr;
  }
}

.company-card-meta,
.person-card-meta,
.course-card-meta,
.module-card-meta,
.lesson-card-meta,
.update-card-meta,
.asset-card-meta,
.assignment-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-card-meta span,
.person-card-meta span,
.course-card-meta span,
.module-card-meta span,
.lesson-card-meta span,
.update-card-meta span,
.asset-card-meta span,
.assignment-card-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.team-panel {
  margin-top: 18px;
}

.course-builder-panel {
  margin-top: 18px;
}

.course-structure {
  margin-top: 18px;
}

.resource-library {
  margin-top: 18px;
}

.assignment-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.assignment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.compact-metric {
  min-height: 142px;
}

.module-card {
  background: var(--white);
}

.lesson-card {
  margin-left: 18px;
  background: var(--paper);
}

.assignment-note {
  margin-top: 18px;
  padding: 14px;
  color: var(--ink-soft);
  background: var(--blue-soft);
  border: 1px solid rgba(31, 111, 235, 0.18);
  border-radius: 8px;
  font-weight: 800;
}

.update-card-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.update-card p {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.update-card a,
.asset-card a {
  color: var(--blue);
  font-weight: 850;
  overflow-wrap: anywhere;
}

.asset-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.asset-card-actions .button {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.asset-card[draggable="true"] {
  cursor: grab;
}

.asset-card[draggable="true"]:active {
  cursor: grabbing;
}

.asset-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.update-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mini-button {
  min-height: 32px;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
}

.status-pill[data-status="draft"] {
  background: #f1f3f6;
}

.status-pill[data-status="published"] {
  background: #e7f6ea;
  border-color: rgba(79, 159, 94, 0.25);
}

.status-pill[data-status="archived"] {
  background: #f8e7e3;
  border-color: rgba(217, 87, 61, 0.22);
}

.report-card,
.metric-card {
  display: grid;
  gap: 12px;
  min-height: 176px;
  align-content: start;
}

.metric-card span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.metric-card p,
.panel-note {
  margin: 0;
}

.sheet-panel {
  margin-top: 18px;
}

.data-table {
  display: grid;
  gap: 8px;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(190px, 1fr) minmax(150px, 0.9fr) minmax(130px, 0.7fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

button.table-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

button.table-row:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.table-row.table-head {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.table-row strong,
.table-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-row > span {
  display: grid;
  gap: 4px;
}

.table-row small {
  color: var(--muted);
  font-weight: 800;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-list span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 11px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.muted-card {
  opacity: 0.82;
}

.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.report-card-head h3,
.report-card-head p {
  margin: 0;
}

.report-card-head p {
  margin-top: 6px;
  color: var(--muted);
}

.training-report-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.training-report-summary span,
.training-progress-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  color: var(--ink-soft);
  background: var(--blue-soft);
  border: 1px solid rgba(31, 111, 235, 0.14);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.report-progress-panel {
  margin-top: 18px;
}

.training-progress-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.training-progress-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.training-progress-row strong {
  display: block;
  font-size: 15px;
}

.training-progress-row span,
.training-progress-row small {
  color: var(--muted);
}

.training-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-account-panel {
  margin-top: 20px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.portal-account-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-top: 16px;
}

.compact-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.compact-header h3,
.compact-header p {
  margin: 0;
}

.compact-header p {
  margin-top: 6px;
}

.portal-link-output {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px;
  background: #eef8fb;
  border: 1px solid rgba(50, 191, 210, 0.28);
  border-radius: 8px;
}

.portal-link-output strong {
  font-size: 13px;
  text-transform: uppercase;
}

.portal-link-output label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
}

.portal-link-output input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
}

.portal-account-card {
  gap: 10px;
}

.portal-account-meta,
.portal-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-account-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 1120px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
  }

  .workbench,
  .access-panel,
  .user-grid,
  .report-grid,
  .settings-grid,
  .course-grid,
  .company-workbench,
  .team-workbench,
  .course-workbench,
  .builder-workbench,
  .portal-account-workbench,
  .investor-workbench,
  .admin-summary-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .admin-main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-header,
  .detail-header,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .button {
    width: 100%;
  }

  .status-strip,
  .detail-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    margin-left: 0;
  }
}

/* Modern portal shell */
:root {
  --ink: #071626;
  --ink-soft: #1d3553;
  --paper: #f4f7fb;
  --white: #ffffff;
  --line: #d9e4ee;
  --line-strong: #bed0df;
  --blue: #1769e0;
  --blue-deep: #0d3258;
  --blue-soft: #eaf3ff;
  --cyan: #24bfd3;
  --green: #3b9f6b;
  --gold: #d29b2c;
  --orange: #d9573d;
  --muted: #647589;
  --shadow: 0 18px 44px rgba(17, 42, 68, 0.08);
  --shadow-soft: 0 10px 24px rgba(17, 42, 68, 0.06);
}

body {
  background:
    linear-gradient(180deg, #f8fbff 0%, var(--paper) 46%, #eef4f9 100%);
}

.admin-shell {
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  padding: 22px 18px;
  background: #071626;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
}

.brand-mark {
  width: 40px;
  height: 40px;
}

.side-nav {
  gap: 4px;
  margin-top: 28px;
}

.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 11px 12px;
  color: rgba(245, 249, 252, 0.74);
  border: 1px solid transparent;
  border-radius: 8px;
}

.side-nav a.is-active {
  color: #ffffff;
  background: rgba(36, 191, 211, 0.18);
  border-color: rgba(36, 191, 211, 0.36);
}

.side-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-main {
  padding: 24px 28px 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -24px -28px 22px;
  padding: 22px 28px;
  background: rgba(248, 251, 255, 0.92);
  border-bottom: 1px solid rgba(217, 228, 238, 0.86);
  backdrop-filter: blur(14px);
}

h1 {
  font-size: clamp(28px, 3vw, 42px);
}

h2 {
  font-size: clamp(22px, 2vw, 30px);
}

h3 {
  line-height: 1.15;
}

.kicker {
  margin-bottom: 6px;
  color: var(--blue);
}

.button {
  min-height: 40px;
  border-radius: 7px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 42, 68, 0.08);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(36, 191, 211, 0.82);
  outline-offset: 2px;
}

.button-primary {
  color: #041421;
  background: var(--cyan);
  border-color: var(--cyan);
}

.button-secondary {
  color: #071626;
  background: #ffffff;
  border-color: #b8c8d8;
}

.button:disabled,
button:disabled {
  color: #3f5268;
  background: #eef4f9;
  border-color: #c9d8e6;
  cursor: not-allowed;
  opacity: 1;
}

.button-danger {
  color: #7b2a1b;
  background: #fff7f5;
  border-color: rgba(217, 87, 61, 0.34);
}

.button-danger:hover:not(:disabled) {
  color: #ffffff;
  background: var(--orange);
  border-color: var(--orange);
}

.session-pill,
.status-tag,
.health-pill,
.connection-state {
  border-radius: 999px;
}

.access-panel,
.lead-list-panel,
.lead-detail-panel,
.admin-panel {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.admin-panel {
  padding: 20px;
}

.status-strip {
  gap: 10px;
}

.stat,
.lead-card,
.user-card,
.update-card,
.company-card,
.person-card,
.course-card,
.module-card,
.lesson-card,
.asset-card,
.assignment-card,
.report-card,
.metric-card,
.sheet-panel,
.user-form,
.user-list-panel,
.investor-update-form,
.investor-feed-panel,
.company-list-panel,
.company-detail-panel,
.team-panel,
.person-form,
.people-list-panel,
.course-list-panel,
.course-detail-panel,
.course-builder-panel,
.module-form,
.lesson-form,
.resource-library,
.assignment-form-panel,
.assignment-list-panel,
.system-panel,
.owner-metric {
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.stat,
.lead-card,
.company-card,
.course-card,
.assignment-card,
.user-card,
.update-card,
.person-card,
.module-card,
.lesson-card,
.asset-card {
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.lead-card:hover,
.lead-card.is-selected,
.company-card:hover,
.company-card.is-selected,
.course-card:hover,
.course-card.is-selected {
  transform: translateY(-1px);
  border-color: rgba(23, 105, 224, 0.46);
  background: #f3f8ff;
}

input,
select,
textarea {
  border-color: #d4e1ec;
  border-radius: 7px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.13);
}

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

.owner-command-panel {
  padding: 0;
  overflow: hidden;
}

.owner-command-panel > .panel-header {
  margin: 0;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.owner-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, #ffffff 0%, #eef7ff 58%, #e9fbfd 100%);
  border-bottom: 1px solid var(--line);
}

.owner-hero h3 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
}

.owner-hero p:not(.kicker) {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.health-stack {
  display: grid;
  gap: 8px;
  min-width: 170px;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  color: #05351f;
  background: #e4f7ea;
  border: 1px solid rgba(59, 159, 107, 0.28);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.health-pill.muted {
  color: var(--ink-soft);
  background: #f5f8fb;
  border-color: var(--line);
}

.owner-command-panel > .status-message {
  margin: 0;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
}

.owner-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.owner-metric {
  display: grid;
  min-height: 148px;
  gap: 10px;
  align-content: start;
  padding: 18px;
  background: var(--white);
}

.owner-metric span,
.finance-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.owner-metric strong {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.owner-metric p,
.finance-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.money-metric strong {
  color: var(--green);
}

.owner-workbench {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(340px, 0.92fr);
  gap: 18px;
  padding: 22px;
}

.system-panel {
  padding: 18px;
  background: #fbfdff;
  border: 1px solid var(--line);
}

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

.connection-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.connection-row div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.connection-row strong {
  font-size: 15px;
}

.connection-row span:not(.connection-state) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.connection-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--ink-soft);
  background: #f5f8fb;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.connection-state[data-state="online"],
.connection-state[data-state="configured"] {
  color: #05351f;
  background: #e4f7ea;
  border-color: rgba(59, 159, 107, 0.28);
}

.connection-state[data-state="planned"] {
  color: #64420a;
  background: #fff5d9;
  border-color: rgba(210, 155, 44, 0.28);
}

.connection-state[data-state="not_connected"] {
  color: #7b2a1b;
  background: #fdebe7;
  border-color: rgba(217, 87, 61, 0.22);
}

.finance-grid {
  display: grid;
  gap: 10px;
}

.finance-grid article {
  display: grid;
  gap: 8px;
  padding: 15px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.finance-grid strong {
  font-size: 30px;
  line-height: 1;
}

.security-panel {
  margin: 0 22px 22px;
  background: #fbfdff;
}

.status-pill[data-status="assigned"] {
  background: var(--blue-soft);
  border-color: rgba(23, 105, 224, 0.2);
}

.status-pill[data-status="in_progress"] {
  background: #fff5d9;
  border-color: rgba(210, 155, 44, 0.28);
}

.status-pill[data-status="completed"] {
  background: #e4f7ea;
  border-color: rgba(59, 159, 107, 0.28);
}

.status-pill[data-status="paused"] {
  background: #f1f4f7;
}

@media (max-width: 1320px) {
  .owner-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .owner-workbench,
  .assignment-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-main {
    padding: 18px;
  }

  .topbar {
    margin: -18px -18px 18px;
    padding: 18px;
  }

  .owner-command-panel > .panel-header,
  .owner-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .owner-metric-grid {
    grid-template-columns: 1fr;
  }

  .owner-workbench {
    padding: 18px;
  }

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

  .security-panel {
    margin: 0 18px 18px;
  }
}

/* Product portal redesign */
:root {
  --ink: #07121f;
  --ink-soft: #25384d;
  --paper: #f6f8fb;
  --white: #ffffff;
  --line: #dbe3ec;
  --line-strong: #bdcbd8;
  --blue: #185fd0;
  --blue-deep: #0e315b;
  --blue-soft: #eaf2ff;
  --cyan: #21bdd1;
  --green: #258f60;
  --gold: #c98918;
  --orange: #cc4a32;
  --muted: #657589;
  --shadow: 0 16px 42px rgba(16, 38, 61, 0.08);
  --shadow-soft: 0 8px 22px rgba(16, 38, 61, 0.06);
}

body {
  color: var(--ink);
  background: var(--paper);
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", Inter, Arial, sans-serif;
}

.admin-shell {
  display: block;
  min-height: 100vh;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 72px;
  padding: 12px 28px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

body:not(.is-authenticated) .portal-header {
  grid-template-columns: 1fr;
}

body:not(.is-authenticated) .portal-nav,
body:not(.is-authenticated) .portal-actions {
  display: none !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: max-content;
  gap: 10px;
  padding: 0;
  color: var(--ink);
  border-radius: 0;
}

.brand:hover {
  color: var(--blue);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.brand-text {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 16px;
  font-weight: 900;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.portal-nav-link,
.nav-menu > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  user-select: none;
}

.portal-nav-link.is-active,
.portal-nav-link:hover,
.nav-menu.has-active > summary,
.nav-menu[open] > summary,
.nav-menu > summary:hover {
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-color: rgba(24, 95, 208, 0.2);
}

.nav-menu {
  position: relative;
}

.nav-menu > summary {
  list-style: none;
}

.nav-menu > summary::-webkit-details-marker,
.profile-menu > summary::-webkit-details-marker {
  display: none;
}

.nav-menu > summary::after {
  width: 7px;
  height: 7px;
  margin-left: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.nav-menu[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.nav-menu-panel,
.profile-panel {
  position: absolute;
  top: calc(100% + 10px);
  z-index: 40;
  display: grid;
  width: 220px;
  min-width: 220px;
  max-width: calc(100vw - 32px);
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.nav-menu-panel {
  left: 0;
}

.nav-menu-panel a,
.profile-panel a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  color: var(--ink-soft);
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.nav-menu-panel a:hover,
.nav-menu-panel a.is-active,
.profile-panel a:hover,
.profile-panel a.is-active {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.portal-actions {
  display: flex;
  justify-content: flex-end;
  min-width: max-content;
}

.profile-menu {
  position: relative;
}

.profile-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 8px 5px 5px;
  color: var(--ink);
  background: #f9fbfd;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
}

.profile-menu[open] > summary,
.profile-menu > summary:hover {
  border-color: rgba(24, 95, 208, 0.25);
  box-shadow: var(--shadow-soft);
}

.profile-avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #052c36;
  background: linear-gradient(135deg, var(--cyan), #79e0e8);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.profile-copy {
  display: grid;
  gap: 1px;
  min-width: 112px;
  line-height: 1.05;
}

.profile-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.profile-panel {
  right: 0;
  min-width: 240px;
}

.profile-panel .session-pill {
  justify-content: center;
  margin: 2px 2px 6px;
}

.profile-panel .button {
  width: 100%;
  margin-top: 6px;
}

.admin-main {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  position: static;
  display: block;
  margin: 0 0 22px;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
}

.topbar .kicker {
  margin-bottom: 6px;
  color: var(--muted);
}

h1 {
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: 0;
}

.dashboard > [data-view-panel],
.admin-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.access-panel {
  max-width: 980px;
  margin: 28px auto 0;
}

.status-strip {
  display: flex;
  gap: 0;
  overflow: hidden;
  margin: 0 0 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat {
  flex: 1 1 0;
  min-width: 145px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.stat:last-child {
  border-right: 0;
}

.stat.is-active {
  background: var(--blue-soft);
  border-color: var(--line);
  box-shadow: inset 0 -3px 0 var(--cyan);
}

.lead-list-panel,
.lead-detail-panel,
.user-form,
.user-list-panel,
.investor-update-form,
.investor-feed-panel,
.company-list-panel,
.company-detail-panel,
.team-panel,
.person-form,
.people-list-panel,
.course-list-panel,
.course-detail-panel,
.course-builder-panel,
.module-form,
.lesson-form,
.resource-library,
.assignment-form-panel,
.assignment-list-panel,
.report-card,
.metric-card,
.sheet-panel,
.system-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.lead-card,
.user-card,
.update-card,
.company-card,
.person-card,
.course-card,
.module-card,
.lesson-card,
.asset-card,
.assignment-card,
.table-row {
  background: #ffffff;
  border-color: var(--line);
  border-radius: 7px;
}

.lead-card:hover,
.lead-card.is-selected,
.company-card:hover,
.company-card.is-selected,
.course-card:hover,
.course-card.is-selected {
  transform: none;
  background: #f8fbff;
  border-color: rgba(24, 95, 208, 0.35);
}

.owner-command-panel {
  overflow: visible;
}

.owner-command-panel > .panel-header,
.owner-hero,
.owner-command-panel > .status-message,
.owner-metric-grid {
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.owner-command-panel > .panel-header {
  padding: 18px 20px;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
}

.owner-hero {
  padding: 18px 20px;
}

.owner-hero h3 {
  font-size: clamp(22px, 2.3vw, 32px);
}

.owner-metric-grid {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
}

.owner-workbench {
  padding: 18px 0 0;
}

.security-panel {
  margin: 18px 0 0;
}

.learning-header {
  align-items: flex-end;
}

.learning-header .panel-note {
  max-width: 760px;
  margin-top: 8px;
}

.builder-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 18px 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.builder-stats article {
  display: grid;
  gap: 8px;
  min-height: 110px;
  align-content: center;
  padding: 18px;
  background: var(--white);
}

.builder-stats span,
.builder-tab-row button,
.readiness-list span,
.access-rule-list span {
  font-size: 12px;
  font-weight: 900;
}

.builder-stats span {
  color: var(--muted);
  text-transform: uppercase;
}

.builder-stats strong {
  font-size: 28px;
  line-height: 1;
}

.course-studio-steps {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0 0 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-studio-steps button {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
  color: var(--ink-soft);
  background: var(--white);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
}

.course-studio-steps button:hover,
.course-studio-steps button.is-active {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.course-studio-steps .internal-step {
  color: #5f6f86;
  background: #f3f6fb;
}

.course-studio-steps strong {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--blue-deep);
  border-radius: 999px;
  font-size: 11px;
}

.course-studio-steps button.is-active strong {
  background: var(--cyan);
  color: #041421;
}

.builder-path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.builder-path-grid button {
  display: grid;
  gap: 10px;
  min-height: 160px;
  align-content: start;
  padding: 20px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.86)),
    var(--white);
  border: 1px solid rgba(24, 95, 208, 0.18);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(12, 38, 72, 0.08);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.builder-path-grid button:hover,
.builder-path-grid button:focus-visible,
.builder-path-grid button.is-selected {
  border-color: rgba(43, 191, 211, 0.78);
  box-shadow: 0 22px 46px rgba(12, 38, 72, 0.14);
  outline: 0;
  transform: translateY(-1px);
}

.builder-path-grid small {
  width: max-content;
  max-width: 100%;
  padding: 6px 9px;
  color: #043861;
  background: rgba(43, 191, 211, 0.16);
  border: 1px solid rgba(43, 191, 211, 0.28);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.builder-path-grid strong {
  font-size: 18px;
  line-height: 1.12;
}

.builder-path-grid span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.internal-builder-tools {
  margin-top: 14px;
}

.internal-tool-note {
  margin: 10px 0 14px;
  padding: 12px 14px;
  color: var(--ink-soft);
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.course-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 4px;
  padding: 4px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-mode-tabs button {
  min-height: 34px;
  padding: 7px 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.course-mode-tabs button:hover,
.course-mode-tabs button.is-active {
  color: #041421;
  background: var(--cyan);
}

.course-card {
  cursor: default;
}

.course-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.course-card-actions .button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

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

.is-course-catalog-mode .course-detail-panel,
.is-course-catalog-mode .course-builder-panel,
.is-course-catalog-mode .builder-stats,
.is-course-catalog-mode .course-studio-steps {
  display: none;
}

.is-course-catalog-mode .course-workbench {
  grid-template-columns: minmax(0, 1fr);
}

.is-course-catalog-mode .course-list-panel {
  max-width: none;
}

.is-course-catalog-mode .course-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.is-course-builder-mode .course-list-panel {
  display: none;
}

.is-course-builder-mode .course-workbench {
  grid-template-columns: minmax(0, 1fr);
}

.is-first-course-mode .builder-stats,
.is-first-course-mode .course-studio-steps {
  display: none;
}

.is-first-course-mode .course-workbench {
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
  margin-top: 22px;
}

.is-first-course-mode .course-list-panel [data-course-new],
.is-first-course-mode .course-list-panel .search-box {
  display: none;
}

.is-first-course-mode .course-list-panel {
  background: #f8fbff;
}

.is-first-course-mode .course-list-panel .status-message {
  min-height: 0;
  margin-top: 12px;
  padding: 14px;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.45;
}

.is-first-course-mode .course-detail-panel {
  background: var(--white);
}

.is-course-builder-mode.is-first-course-mode .course-workbench {
  grid-template-columns: minmax(0, 1fr);
}

.learning-area-landing {
  display: none;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 22px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.learning-area-landing h3 {
  margin: 4px 0 8px;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
}

.learning-area-landing p {
  max-width: 760px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.learning-area-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.learning-course-picker {
  display: grid;
  min-width: min(420px, 100%);
  gap: 8px;
}

.learning-course-picker > strong {
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
}

.learning-picker-row {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.learning-picker-row:hover,
.learning-picker-row:focus-visible {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.learning-picker-row span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.learning-picker-row small {
  color: var(--muted);
  font-weight: 800;
}

.learning-picker-row em {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.is-course-area-studio:not(.has-selected-course) .studio-empty-panel,
.is-course-area-files:not(.has-selected-course) .files-empty-panel {
  display: flex;
}

.is-course-area-studio:not(.has-selected-course) .builder-stats,
.is-course-area-files:not(.has-selected-course) .builder-stats,
.is-course-area-studio:not(.has-selected-course) .course-studio-steps,
.is-course-area-files:not(.has-selected-course) .course-studio-steps,
.is-course-area-studio:not(.has-selected-course) .course-workbench,
.is-course-area-files:not(.has-selected-course) .course-workbench {
  display: none;
}

.template-details {
  display: grid;
  gap: 10px;
}

.template-details summary {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border: 1px solid rgba(24, 95, 208, 0.18);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.template-details summary::after {
  content: "+";
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #ffffff;
  background: var(--blue-deep);
  border-radius: 999px;
  font-weight: 950;
}

.template-details[open] summary::after {
  content: "-";
}

.helper-text {
  margin: 0 0 12px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

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

.course-template-grid-compact button {
  min-height: 72px;
}

.course-workflow-page {
  margin: 0;
}

.course-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.course-page-heading h4 {
  margin: 0;
  font-size: 18px;
}

.course-workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-workflow-strip button {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 8px;
  color: var(--ink-soft);
  background: #f8fbff;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.course-workflow-strip button:hover,
.course-workflow-strip button.is-active,
.builder-tab-row button:hover,
.builder-tab-row button.is-active {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.course-template-panel,
.section-preset-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-preset-panel {
  margin-bottom: 16px;
}

.course-template-grid,
.section-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.course-template-grid button,
.section-template-grid button {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.course-template-grid button:hover,
.course-template-grid button:focus-visible,
.section-template-grid button:hover,
.section-template-grid button:focus-visible {
  border-color: rgba(24, 95, 208, 0.34);
  box-shadow: 0 12px 28px rgba(12, 38, 72, 0.08);
  outline: 0;
}

.course-template-grid button.is-selected,
.section-template-grid button.is-selected {
  color: #061525;
  background: linear-gradient(135deg, rgba(47, 197, 217, 0.2), rgba(232, 242, 255, 0.95));
  border-color: #2fc5d9;
  box-shadow: 0 0 0 2px rgba(47, 197, 217, 0.18), 0 14px 30px rgba(18, 97, 214, 0.12);
}

.course-template-grid button.is-selected strong,
.section-template-grid button.is-selected strong {
  color: #061525;
}

.course-template-grid strong,
.section-template-grid strong {
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.course-template-grid span,
.section-template-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.builder-panel-title,
.builder-toolbar-actions,
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-app-ribbon,
.studio-layout-ribbon {
  display: none;
}

.learning-studio-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(320px, 0.42fr);
  gap: 18px;
  margin-top: 18px;
}

.builder-tool-panel,
.course-preview-panel,
.access-model-panel,
.sales-requirement-panel,
.ceu-requirement-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.builder-tool-panel {
  min-width: 0;
  padding: 18px;
}

.course-preview-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
}

.builder-tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.builder-tab-row button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 11px;
  color: var(--muted);
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.builder-tab-row button.is-active {
  color: var(--blue-deep);
  background: var(--blue-soft);
  border-color: rgba(24, 95, 208, 0.22);
}

.studio-command-center,
.studio-block-preview {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.studio-command-center {
  margin-bottom: 16px;
}

.studio-command-center h4,
.studio-block-preview h4 {
  margin: 0;
  font-size: 16px;
}

.studio-command-center p:not(.kicker),
.studio-block-preview p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.studio-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.studio-action-grid button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  min-height: 70px;
  padding: 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.studio-action-grid button i {
  grid-row: 1 / span 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.studio-action-grid button i::before {
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
}

.studio-action-grid button:hover,
.studio-action-grid button:focus-visible {
  border-color: rgba(24, 95, 208, 0.34);
  box-shadow: 0 12px 28px rgba(12, 38, 72, 0.08);
  outline: 0;
}

.course-builder-panel.is-standard-course .section-preset-panel,
.course-builder-panel.is-standard-course .ceu-requirement-panel,
.course-builder-panel.is-standard-course .internal-field-group {
  display: none;
}

.course-builder-panel.is-standard-course .builder-workbench {
  align-content: start;
}

.course-builder-panel.is-standard-course .module-form {
  border-color: rgba(43, 191, 211, 0.24);
  background: linear-gradient(180deg, rgba(247, 252, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.studio-action-grid strong {
  grid-column: 2;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.studio-action-grid span,
.studio-save-strip span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.studio-tool-button.tool-ce i::before {
  content: "CE";
}

.studio-tool-button.tool-text i::before {
  content: "T";
  font-size: 18px;
}

.studio-tool-button.tool-video i::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #ffffff;
}

.studio-tool-button.tool-audio i::before {
  content: "";
  width: 16px;
  height: 16px;
  border-left: 5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 7px 0 0 -2px rgba(255, 255, 255, 0.82), 13px 0 0 -5px rgba(255, 255, 255, 0.62);
}

.studio-tool-button.tool-slides i::before {
  content: "";
  width: 18px;
  height: 14px;
  border: 2px solid #ffffff;
  border-radius: 3px;
  box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.42);
}

.studio-tool-button.tool-quiz i::before {
  content: "?";
  font-size: 20px;
}

.studio-tool-button.tool-checklist i::before {
  content: "OK";
  font-size: 12px;
}

.studio-save-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.studio-save-strip span {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.studio-media-frame {
  display: grid;
  min-height: 190px;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(7, 22, 38, 0.92), rgba(24, 95, 208, 0.72)),
    #071626;
  border: 1px solid rgba(24, 95, 208, 0.22);
  border-radius: 8px;
  text-align: center;
}

.studio-media-frame span {
  max-width: 32ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.studio-media-frame video {
  width: 100%;
  max-height: 260px;
  background: #000000;
}

.studio-media-frame audio {
  width: min(100%, 520px);
}

.studio-media-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 12px;
  color: #ffffff;
  background: rgba(43, 191, 211, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.selected-media-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.selected-media-panel > strong {
  font-size: 14px;
  font-weight: 950;
}

.selected-media-panel > span,
.selected-media-list > span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.selected-media-list {
  display: grid;
  gap: 8px;
}

.selected-media-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.selected-media-list article div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.selected-media-list article strong,
.selected-media-list article span {
  overflow-wrap: anywhere;
}

.studio-canvas-shell {
  display: none;
}

.studio-canvas-topbar,
.studio-canvas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.studio-canvas-topbar h4 {
  margin: 0;
  font-size: 16px;
}

.studio-canvas-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.studio-canvas-stage {
  display: grid;
  min-height: 310px;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #071626;
  background-size: 28px 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.studio-slide-page {
  display: grid;
  width: min(760px, 100%);
  min-height: 300px;
  grid-template-rows: auto minmax(150px, 1fr) auto;
  overflow: hidden;
  color: #071626;
  background: #ffffff;
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26);
}

.studio-slide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  background: #f5f9fd;
  border-bottom: 1px solid #d9e2ec;
}

.studio-slide-header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.studio-slide-header strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
  text-align: right;
  overflow-wrap: anywhere;
}

.studio-slide-media {
  display: grid;
  min-height: 170px;
  place-items: center;
  padding: 18px;
  color: rgba(255, 255, 255, 0.76);
  background:
    radial-gradient(circle at 18% 18%, rgba(43, 191, 211, 0.22), transparent 30%),
    linear-gradient(135deg, #08213a, #123f69);
  text-align: center;
}

.studio-slide-media span {
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.studio-slide-media video,
.studio-slide-media img,
.studio-slide-media iframe {
  width: 100%;
  max-height: 270px;
  object-fit: contain;
  background: #000000;
}

.studio-slide-media audio {
  width: min(100%, 540px);
}

.studio-slide-media iframe {
  aspect-ratio: 16 / 9;
  min-height: 260px;
  border: 0;
}

.studio-slide-media a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 13px;
  color: #041421;
  background: var(--cyan);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
}

.studio-slide-copy {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.studio-slide-copy h5 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.studio-slide-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.studio-layer-strip {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.studio-layer-chip,
.studio-layer-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #d9edff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.studio-layer-button {
  cursor: pointer;
}

.studio-layer-button:hover,
.studio-layer-button.is-selected {
  color: #041421;
  background: var(--cyan);
  border-color: var(--cyan);
}

.studio-start-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  color: #ffffff;
  background: #0d2942;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.studio-start-panel h4 {
  margin: 0;
  font-size: 17px;
}

.studio-start-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.studio-start-steps span {
  display: grid;
  min-height: 52px;
  align-content: center;
  padding: 10px;
  color: rgba(217, 237, 255, 0.82);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.clip-inspector-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.clip-inspector {
  display: grid;
  gap: 12px;
}

.clip-inspector > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.clip-inspector-head {
  display: grid;
  gap: 5px;
}

.clip-inspector-head strong {
  font-size: 15px;
  font-weight: 950;
}

.clip-inspector-head span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.clip-property-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.clip-property-grid div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.clip-property-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.clip-property-grid dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.clip-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.editor-title-row h4 {
  margin: 0;
  font-size: 16px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.editor-timeline-shell {
  display: grid;
  gap: 0;
  overflow: hidden;
  background: #071626;
  border: 1px solid rgba(24, 95, 208, 0.22);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(7, 22, 38, 0.14);
}

.editor-timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  color: #ffffff;
  background: #0c253f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-timeline-header h4 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
}

.editor-timeline-header .kicker {
  color: var(--cyan);
}

.editor-timeline-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.editor-timeline-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 6px 9px;
  color: #d9edff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.editor-timeline-ruler {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  min-width: 680px;
  margin-left: 188px;
  color: rgba(217, 237, 255, 0.7);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.12) 0,
      rgba(255, 255, 255, 0.12) 1px,
      transparent 1px,
      transparent 56px
    ),
    #071626;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-timeline-ruler span {
  min-height: 34px;
  padding: 10px 12px 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.editor-timeline-lanes {
  display: grid;
  overflow-x: auto;
}

.editor-timeline-lane {
  display: grid;
  grid-template-columns: 188px minmax(640px, 1fr);
  min-height: 108px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-timeline-lane:last-child {
  border-bottom: 0;
}

.editor-lane-label {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  color: #ffffff;
  background: #092033;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-lane-label strong {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.25;
}

.editor-lane-label span {
  color: rgba(217, 237, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
}

.editor-lane-label em {
  width: max-content;
  max-width: 100%;
  padding: 5px 7px;
  color: #041421;
  background: #ffcb6e;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  line-height: 1.2;
}

.editor-timeline-lane.has-duplicates .editor-lane-label {
  box-shadow: inset 4px 0 0 #ffcb6e;
}

.editor-lane-track {
  display: flex;
  min-width: 640px;
  align-items: stretch;
  gap: 8px;
  padding: 16px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 56px
    ),
    linear-gradient(180deg, #071626, #081b2f);
}

.editor-timeline-clip,
.editor-timeline-gate,
.editor-timeline-empty {
  display: grid;
  min-width: 104px;
  min-height: 76px;
  align-content: space-between;
  gap: 8px;
  padding: 10px;
  color: #ffffff;
  background: #163a5e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.editor-timeline-clip {
  flex: 0 0 128px;
  cursor: grab;
  font: inherit;
  text-align: left;
}

.editor-timeline-clip:active {
  cursor: grabbing;
}

.editor-timeline-clip:hover,
.editor-timeline-clip.is-selected {
  border-color: rgba(43, 191, 211, 0.76);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16), inset 0 0 0 2px rgba(43, 191, 211, 0.22);
}

.editor-timeline-clip.is-asset-drop-ready {
  position: relative;
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(43, 191, 211, 0.2), 0 16px 30px rgba(0, 0, 0, 0.18);
}

.editor-timeline-clip.is-asset-drop-ready::after {
  content: "Drop media";
  position: absolute;
  inset: auto 8px 8px;
  display: grid;
  min-height: 24px;
  place-items: center;
  color: #041421;
  background: var(--cyan);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.editor-timeline-clip.is-dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.editor-timeline-clip strong,
.editor-timeline-gate strong {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.editor-timeline-clip small,
.editor-timeline-gate small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.clip-type,
.editor-timeline-gate > span {
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  color: #041421;
  background: var(--cyan);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.editor-timeline-clip.clip-video {
  background: #185fd0;
}

.editor-timeline-clip.clip-audio {
  background: #7753d8;
}

.editor-timeline-clip.clip-quiz {
  background: #d9573d;
}

.editor-timeline-clip.clip-file {
  background: #557089;
}

.editor-timeline-clip.clip-checklist {
  background: #1f7f65;
}

.editor-timeline-clip.clip-lesson {
  background: #19415f;
}

.editor-timeline-clip.is-warning,
.editor-timeline-gate.is-warning {
  border-color: rgba(255, 203, 110, 0.76);
  box-shadow: inset 0 0 0 2px rgba(255, 203, 110, 0.2);
}

.editor-timeline-gate {
  flex: 0 0 138px;
  background: #3a2232;
  border-style: dashed;
}

.editor-timeline-gate.is-ready {
  background: #133c33;
}

.editor-timeline-empty {
  width: 240px;
  min-height: 76px;
  place-items: center;
  color: rgba(217, 237, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border-style: dashed;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.editor-timeline-insert-marker {
  position: relative;
  flex: 0 0 14px;
  min-width: 14px;
  align-self: stretch;
  pointer-events: none;
}

.editor-timeline-insert-marker::before {
  content: "";
  position: absolute;
  inset: 0 5px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(43, 191, 211, 0.16), 0 0 24px rgba(43, 191, 211, 0.7);
}

.editor-timeline-insert-marker::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 13px;
  height: 13px;
  background: var(--cyan);
  border-radius: 3px;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 0 4px rgba(43, 191, 211, 0.14);
}

.editor-lane-track.is-drop-ready {
  outline: 2px solid var(--cyan);
  outline-offset: -6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(43, 191, 211, 0.2) 0,
      rgba(43, 191, 211, 0.2) 1px,
      transparent 1px,
      transparent 56px
    ),
    linear-gradient(180deg, rgba(43, 191, 211, 0.18), rgba(8, 27, 47, 0.95));
}

body.course-studio-mode {
  overflow: hidden;
  background: #071626;
}

body.course-studio-mode .portal-header,
body.course-studio-mode .topbar,
body.course-studio-mode .learning-header,
body.course-studio-mode .course-mode-tabs,
body.course-studio-mode .builder-stats,
body.course-studio-mode .course-studio-steps,
body.course-studio-mode .course-list-panel,
body.course-studio-mode .course-detail-panel {
  display: none;
}

body.course-studio-mode .admin-main {
  max-width: none;
  min-height: 100vh;
  padding: 0;
}

body.course-studio-mode .dashboard,
body.course-studio-mode [data-view-panel="courses"],
body.course-studio-mode .course-workbench {
  min-height: 100vh;
}

body.course-studio-mode [data-view-panel="courses"] {
  display: block;
  background: #071626;
}

body.course-studio-mode .course-workbench {
  display: block;
}

body.course-studio-mode .course-builder-panel:not([hidden]) {
  display: grid;
  height: 100vh;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: #071626;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.course-studio-mode .builder-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  padding: 12px 16px;
  color: #ffffff;
  background: #0c253f;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
}

body.course-studio-mode .builder-toolbar h3 {
  color: #ffffff;
}

body.course-studio-mode .builder-toolbar .kicker {
  color: var(--cyan);
}

body.course-studio-mode .builder-toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.course-studio-mode .builder-toolbar-actions .status-tag {
  color: #d9edff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

body.course-studio-mode .studio-app-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

body.course-studio-mode .studio-app-ribbon button {
  min-height: 28px;
  padding: 6px 9px;
  color: rgba(217, 237, 255, 0.76);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

body.course-studio-mode .studio-app-ribbon button:hover,
body.course-studio-mode .studio-app-ribbon button.is-active {
  color: #041421;
  background: var(--cyan);
}

body.course-studio-mode .learning-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 0;
  min-height: 0;
  overflow: hidden;
}

body.course-studio-mode .builder-tool-panel {
  display: grid;
  grid-template-columns: clamp(300px, 22vw, 360px) minmax(0, 1fr);
  grid-template-rows: minmax(320px, 1fr) minmax(250px, 0.54fr);
  gap: 0;
  min-height: 0;
  overflow: hidden;
  background: #071626;
}

body.course-studio-mode .studio-command-center {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 12px;
  background: #092033;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
}

body.course-studio-mode .studio-command-center h4,
body.course-studio-mode .studio-command-center p:not(.kicker) {
  color: #ffffff;
}

body.course-studio-mode .studio-action-grid {
  grid-template-columns: 1fr;
  gap: 7px;
}

body.course-studio-mode .studio-action-grid button {
  min-height: 54px;
  padding: 10px;
  color: #ffffff;
  background: #12314f;
  border-color: rgba(255, 255, 255, 0.12);
  cursor: grab;
}

body.course-studio-mode .studio-action-grid button i {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #185fd0, #2bbfd3);
}

body.course-studio-mode .studio-action-grid button:active {
  cursor: grabbing;
}

body.course-studio-mode .studio-action-grid strong {
  color: var(--cyan);
}

body.course-studio-mode .studio-action-grid span,
body.course-studio-mode .studio-save-strip span {
  color: rgba(217, 237, 255, 0.76);
}

body.course-studio-mode .studio-save-strip {
  display: none;
}

body.course-studio-mode .builder-workbench {
  grid-column: 1;
  grid-row: 2;
  align-content: start;
  gap: 10px;
  min-height: 0;
  min-width: 0;
  padding: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0a1d30;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-gutter: stable;
}

body.course-studio-mode .builder-workbench > *,
body.course-studio-mode .section-preset-panel,
body.course-studio-mode .module-form,
body.course-studio-mode .lesson-form,
body.course-studio-mode .quiz-builder-panel {
  min-width: 0;
  color: #ffffff;
  background: #0d2942;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body.course-studio-mode .builder-workbench label,
body.course-studio-mode .builder-workbench .status-message,
body.course-studio-mode .builder-workbench p,
body.course-studio-mode .builder-workbench span {
  color: rgba(217, 237, 255, 0.78);
}

body.course-studio-mode .builder-workbench h4,
body.course-studio-mode .builder-workbench strong {
  color: #ffffff;
}

body.course-studio-mode .builder-workbench .form-row,
body.course-studio-mode .quiz-answer-grid,
body.course-studio-mode .section-template-grid {
  grid-template-columns: 1fr;
}

body.course-studio-mode .builder-workbench input,
body.course-studio-mode .builder-workbench select,
body.course-studio-mode .builder-workbench textarea {
  min-height: 34px;
  color: #ffffff;
  background: #071626;
  border-color: rgba(255, 255, 255, 0.16);
}

body.course-studio-mode .builder-workbench textarea {
  min-height: 76px;
}

body.course-studio-mode .section-template-grid {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

body.course-studio-mode .section-template-grid button {
  min-width: 0;
  min-height: 50px;
  padding: 10px 11px;
  color: #ffffff;
  background: #12314f;
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .section-template-grid strong {
  color: var(--cyan);
}

body.course-studio-mode .section-template-grid span {
  font-size: 11px;
}

body.course-studio-mode .section-preset-panel {
  gap: 10px;
  padding: 14px;
}

body.course-studio-mode .section-preset-panel .section-title-row {
  align-items: flex-start;
}

body.course-studio-mode .section-preset-panel h4 {
  font-size: 15px;
  line-height: 1.25;
}

body.course-studio-mode .studio-canvas-shell:not([hidden]) {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  color: #ffffff;
  background: #071626;
  border: 0;
  border-radius: 0;
}

body.course-studio-mode .studio-canvas-topbar h4 {
  color: #ffffff;
}

body.course-studio-mode .studio-canvas-topbar .kicker {
  color: var(--cyan);
}

body.course-studio-mode .studio-canvas-stage {
  min-height: 0;
}

body.course-studio-mode .course-structure {
  grid-column: 2;
  grid-row: 2;
  gap: 14px;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: #071626;
  border: 0;
  border-radius: 0;
}

body.course-studio-mode .course-timeline-section {
  display: none;
}

body.course-studio-mode .course-preview-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: #0a1d30;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

body.course-studio-mode .course-preview-panel > section,
body.course-studio-mode .learner-preview {
  color: #ffffff;
  background: #0d2942;
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .course-preview-panel h4,
body.course-studio-mode .course-preview-panel strong {
  color: #ffffff;
}

body.course-studio-mode .course-preview-panel p,
body.course-studio-mode .course-preview-panel span,
body.course-studio-mode .course-preview-panel label {
  color: rgba(217, 237, 255, 0.78);
}

body.course-studio-mode .clip-inspector-head span,
body.course-studio-mode .clip-inspector > p,
body.course-studio-mode .clip-property-grid dt {
  color: rgba(217, 237, 255, 0.74);
}

body.course-studio-mode .clip-property-grid div {
  background: #071626;
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .clip-property-grid dd {
  color: #ffffff;
}

body.course-studio-mode .course-preview-panel input,
body.course-studio-mode .course-preview-panel select,
body.course-studio-mode .course-preview-panel textarea {
  color: #ffffff;
  background: #071626;
  border-color: rgba(255, 255, 255, 0.16);
}

body.course-studio-mode .resource-library {
  display: grid;
  gap: 12px;
  margin-top: 0;
  background: #0d2942;
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .slides-import-panel {
  grid-template-columns: 1fr;
  color: #ffffff;
  background: #071626;
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .slides-import-panel p:not(.kicker) {
  color: rgba(217, 237, 255, 0.76);
}

body.course-studio-mode .asset-form {
  margin: 0;
  padding: 12px;
  background: #071626;
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .asset-form .form-row {
  grid-template-columns: 1fr;
}

body.course-studio-mode .asset-list {
  max-height: 360px;
  overflow: auto;
}

body.course-studio-mode .asset-card,
body.course-studio-mode .selected-media-panel,
body.course-studio-mode .selected-media-list article {
  color: #ffffff;
  background: #102f4d;
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .asset-card.is-attached-selected {
  border-color: rgba(43, 191, 211, 0.78);
  box-shadow: inset 3px 0 0 var(--cyan);
}

body.course-studio-mode .asset-card-meta span {
  color: rgba(217, 237, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

body.course-studio-mode .asset-card a {
  color: var(--cyan);
}

body.course-studio-mode .editor-timeline-shell {
  min-width: 0;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

body.course-studio-mode.studio-timeline-expanded .learning-studio-grid {
  grid-template-columns: minmax(0, 1fr);
}

body.course-studio-mode.studio-timeline-expanded .course-preview-panel,
body.course-studio-mode.studio-timeline-expanded .studio-canvas-shell,
body.course-studio-mode.studio-timeline-expanded .builder-workbench {
  display: none !important;
}

body.course-studio-mode.studio-timeline-expanded .builder-tool-panel {
  grid-template-columns: clamp(260px, 20vw, 320px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.course-studio-mode.studio-timeline-expanded .studio-command-center {
  grid-row: 1;
}

body.course-studio-mode.studio-timeline-expanded .course-structure {
  grid-column: 2;
  grid-row: 1;
  overflow: auto;
}

body.course-studio-mode.studio-timeline-expanded .editor-timeline-shell {
  min-height: calc(100vh - 92px);
}

body.course-studio-mode.studio-timeline-expanded .editor-timeline-lane {
  min-height: 124px;
}

body.course-studio-mode {
  background: #eef4f8;
}

body.course-studio-mode [data-view-panel="courses"] {
  background: #eef4f8;
}

body.course-studio-mode .course-builder-panel:not([hidden]) {
  background: #eef4f8;
}

body.course-studio-mode .builder-toolbar {
  min-height: 72px;
  align-items: center;
  padding: 12px 18px;
  color: var(--ink);
  background: #ffffff;
  border-bottom: 1px solid #ccd9e5;
  box-shadow: 0 10px 28px rgba(7, 22, 38, 0.08);
}

body.course-studio-mode .builder-toolbar h3 {
  color: var(--ink);
  font-size: 18px;
}

body.course-studio-mode .builder-toolbar .kicker {
  color: var(--blue);
}

body.course-studio-mode .builder-toolbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

body.course-studio-mode .builder-toolbar-actions .button,
body.course-studio-mode .builder-toolbar-actions .status-tag {
  flex: 0 0 auto;
  min-height: 36px;
  white-space: nowrap;
}

body.course-studio-mode .builder-toolbar-actions .status-tag {
  color: var(--blue-deep);
  background: #edf5ff;
  border-color: #c8ddef;
}

body.course-studio-mode .studio-app-ribbon {
  flex: 0 0 auto;
  background: #eef5fb;
  border-color: #c8ddef;
}

body.course-studio-mode .studio-layout-ribbon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  background: #f7fbff;
  border: 1px solid #c8ddef;
  border-radius: 8px;
}

body.course-studio-mode .studio-app-ribbon button {
  color: #4a6178;
}

body.course-studio-mode .studio-layout-ribbon button {
  min-height: 28px;
  padding: 6px 9px;
  color: #4a6178;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

body.course-studio-mode .studio-app-ribbon button:hover,
body.course-studio-mode .studio-app-ribbon button.is-active,
body.course-studio-mode .studio-layout-ribbon button:hover,
body.course-studio-mode .studio-layout-ribbon button.is-active {
  color: #041421;
  background: var(--cyan);
}

body.course-studio-mode .learning-studio-grid {
  grid-template-columns: minmax(0, 1fr);
  height: calc(100vh - 72px);
  min-height: 0;
  background: #eef4f8;
}

body.course-studio-mode.studio-inspector-open .learning-studio-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

body.course-studio-mode:not(.studio-inspector-open) .course-preview-panel {
  display: none;
}

body.course-studio-mode .builder-tool-panel {
  display: grid;
  grid-template-columns: 96px clamp(280px, 23vw, 360px) minmax(520px, 1fr);
  grid-template-rows: minmax(300px, 0.48fr) minmax(260px, 0.52fr);
  gap: 0;
  min-height: 0;
  overflow: hidden;
  background: #eef4f8;
  border: 0;
}

body.course-studio-mode .studio-command-center {
  grid-column: 1;
  grid-row: 1 / 3;
  align-content: start;
  padding: 12px 10px;
  background: #071626;
  border-right: 1px solid rgba(7, 22, 38, 0.2);
  border-bottom: 0;
}

body.course-studio-mode .studio-command-center > div:first-child {
  display: none;
}

body.course-studio-mode .studio-action-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

body.course-studio-mode .studio-action-grid button {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  min-height: 74px;
  padding: 9px 7px;
  color: #ffffff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  text-align: center;
  cursor: grab;
}

body.course-studio-mode .studio-action-grid button:hover,
body.course-studio-mode .studio-action-grid button:focus-visible {
  background: #102f4d;
  border-color: rgba(43, 191, 211, 0.44);
  box-shadow: none;
}

body.course-studio-mode .studio-action-grid button i {
  grid-row: auto;
  grid-column: 1;
  width: 38px;
  height: 38px;
}

body.course-studio-mode .studio-action-grid strong {
  grid-column: 1;
  color: #d9edff;
  font-size: 11px;
  line-height: 1.15;
}

body.course-studio-mode .studio-action-grid span {
  display: none;
}

body.course-studio-mode .builder-workbench {
  grid-column: 2;
  grid-row: 1 / 3;
  padding: 14px;
  background: #dde9f2;
  border-right: 1px solid #c7d7e4;
}

body.course-studio-mode .builder-workbench > *,
body.course-studio-mode .section-preset-panel,
body.course-studio-mode .module-form,
body.course-studio-mode .lesson-form,
body.course-studio-mode .quiz-builder-panel {
  color: var(--ink);
  background: #ffffff;
  border-color: #c8ddef;
  border-radius: 8px;
}

body.course-studio-mode .builder-workbench label,
body.course-studio-mode .builder-workbench .status-message,
body.course-studio-mode .builder-workbench p,
body.course-studio-mode .builder-workbench span {
  color: #4d6379;
}

body.course-studio-mode .builder-workbench h4,
body.course-studio-mode .builder-workbench strong {
  color: var(--ink);
}

body.course-studio-mode .builder-workbench input,
body.course-studio-mode .builder-workbench select,
body.course-studio-mode .builder-workbench textarea {
  color: var(--ink);
  background: #f8fbff;
  border-color: #c8ddef;
}

body.course-studio-mode .section-template-grid button {
  color: var(--ink);
  background: #f8fbff;
  border-color: #c8ddef;
}

body.course-studio-mode .section-template-grid button:hover,
body.course-studio-mode .section-template-grid button:focus-visible {
  border-color: rgba(31, 111, 235, 0.44);
  background: #eef6ff;
}

body.course-studio-mode .section-template-grid strong {
  color: var(--blue-deep);
}

body.course-studio-mode .studio-canvas-shell:not([hidden]) {
  grid-column: 3;
  grid-row: 1;
  min-height: 0;
  padding: 18px;
  color: var(--ink);
  background: #eef4f8;
}

body.course-studio-mode .studio-canvas-topbar h4 {
  color: var(--ink);
}

body.course-studio-mode .studio-canvas-topbar .kicker {
  color: var(--blue);
}

body.course-studio-mode .studio-canvas-stage {
  min-height: 0;
  padding: 16px;
  background:
    linear-gradient(rgba(7, 22, 38, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 22, 38, 0.04) 1px, transparent 1px),
    #dfeaf2;
  background-size: 24px 24px;
  border: 1px solid #c7d7e4;
  border-radius: 8px;
}

body.course-studio-mode .studio-slide-page {
  box-shadow: 0 24px 70px rgba(7, 22, 38, 0.18);
}

body.course-studio-mode .course-structure {
  grid-column: 3;
  grid-row: 2;
  padding: 0 18px 18px;
  background: #eef4f8;
}

body.course-studio-mode .editor-timeline-shell {
  min-width: 0;
  max-height: 100%;
  overflow: hidden;
  border-color: #c7d7e4;
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(7, 22, 38, 0.12);
  content-visibility: auto;
  contain: layout paint style;
  contain-intrinsic-size: 720px;
}

body.course-studio-mode .editor-timeline-header {
  padding: 12px 14px;
}

body.course-studio-mode .editor-timeline-ruler {
  min-width: 720px;
  margin-left: 160px;
}

body.course-studio-mode .editor-timeline-lanes {
  max-height: calc(52vh - 118px);
  overflow: auto;
}

body.course-studio-mode .editor-timeline-lane {
  grid-template-columns: 160px minmax(720px, 1fr);
  min-height: 94px;
}

body.course-studio-mode .editor-lane-label {
  padding: 12px;
}

body.course-studio-mode .editor-lane-track {
  min-width: 720px;
  padding: 12px;
}

body.course-studio-mode .editor-timeline-clip,
body.course-studio-mode .editor-timeline-gate,
body.course-studio-mode .editor-timeline-empty {
  min-height: 68px;
  padding: 9px;
}

body.course-studio-mode .course-preview-panel {
  padding: 14px;
  background: #ffffff;
  border-left: 1px solid #c7d7e4;
}

body.course-studio-mode .course-preview-panel > section,
body.course-studio-mode .learner-preview {
  color: var(--ink);
  background: #f8fbff;
  border-color: #c8ddef;
}

body.course-studio-mode .course-preview-panel h4,
body.course-studio-mode .course-preview-panel strong {
  color: var(--ink);
}

body.course-studio-mode .course-preview-panel p,
body.course-studio-mode .course-preview-panel span,
body.course-studio-mode .course-preview-panel label {
  color: #52687d;
}

body.course-studio-mode .clip-inspector-head span,
body.course-studio-mode .clip-inspector > p,
body.course-studio-mode .clip-property-grid dt {
  color: #52687d;
}

body.course-studio-mode .clip-property-grid dd {
  color: var(--ink);
}

body.course-studio-mode .clip-property-grid div,
body.course-studio-mode .asset-form,
body.course-studio-mode .slides-import-panel {
  background: #ffffff;
  border-color: #c8ddef;
}

body.course-studio-mode .resource-library,
body.course-studio-mode .asset-card,
body.course-studio-mode .selected-media-panel,
body.course-studio-mode .selected-media-list article {
  color: var(--ink);
  background: #ffffff;
  border-color: #c8ddef;
}

body.course-studio-mode .asset-card-meta span {
  color: #52687d;
  background: #edf5ff;
  border-color: #c8ddef;
}

body.course-studio-mode .course-preview-panel input,
body.course-studio-mode .course-preview-panel select,
body.course-studio-mode .course-preview-panel textarea {
  color: var(--ink);
  background: #f8fbff;
  border-color: #c8ddef;
}

body.course-studio-mode.studio-layout-canvas .builder-tool-panel {
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.course-studio-mode.studio-layout-canvas .builder-workbench,
body.course-studio-mode.studio-layout-canvas .course-structure {
  display: none !important;
}

body.course-studio-mode.studio-layout-canvas .studio-canvas-shell:not([hidden]) {
  grid-column: 2;
  grid-row: 1;
}

body.course-studio-mode.studio-layout-canvas .studio-canvas-stage {
  min-height: calc(100vh - 210px);
}

body.course-studio-mode.studio-layout-timeline .builder-tool-panel {
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.course-studio-mode.studio-layout-timeline .builder-workbench,
body.course-studio-mode.studio-layout-timeline .studio-canvas-shell {
  display: none !important;
}

body.course-studio-mode.studio-layout-timeline .course-structure {
  grid-column: 2;
  grid-row: 1;
  padding: 18px;
}

body.course-studio-mode.studio-layout-timeline .editor-timeline-lanes {
  max-height: calc(100vh - 178px);
}

body.course-studio-mode.studio-layout-builder .builder-tool-panel {
  grid-template-columns: 96px clamp(330px, 32vw, 460px) minmax(420px, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.course-studio-mode.studio-layout-builder .builder-workbench {
  grid-column: 2;
  grid-row: 1;
}

body.course-studio-mode.studio-layout-builder .studio-canvas-shell {
  display: none !important;
}

body.course-studio-mode.studio-layout-builder .course-structure {
  grid-column: 3;
  grid-row: 1;
  padding: 18px;
}

body.course-studio-mode.studio-layout-builder .editor-timeline-lanes {
  max-height: calc(100vh - 178px);
}

body.course-studio-mode.studio-timeline-expanded .builder-tool-panel {
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

body.course-studio-mode.studio-timeline-expanded .course-structure {
  grid-column: 2;
  grid-row: 1;
  padding: 18px;
}

body.course-studio-mode.studio-timeline-expanded .editor-timeline-lanes {
  max-height: calc(100vh - 178px);
}

@media (max-width: 1180px) {
  .builder-path-grid {
    grid-template-columns: 1fr;
  }

  .builder-path-grid button {
    min-height: 132px;
  }

  body.course-studio-mode .builder-tool-panel {
    grid-template-columns: 84px minmax(250px, 320px) minmax(420px, 1fr);
  }
}

.course-timeline-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.timeline-section-header > div:first-child {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.timeline-section-header strong {
  font-size: 15px;
  font-weight: 950;
}

.timeline-section-header span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.timeline-section-meta,
.timeline-block-meta,
.quiz-answer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.timeline-section-meta {
  justify-content: flex-end;
}

.timeline-section-meta span,
.timeline-block-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 9px;
  color: var(--ink-soft);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.timeline-section-meta span.is-warning,
.timeline-block-meta span.is-warning {
  color: #7b2a1b;
  background: #fdebe7;
  border-color: rgba(217, 87, 61, 0.22);
}

.timeline-block-list {
  display: grid;
  gap: 8px;
}

.timeline-block {
  display: grid;
  width: 100%;
  gap: 10px;
  padding: 13px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.timeline-block:hover,
.timeline-block.is-selected {
  border-color: rgba(24, 95, 208, 0.42);
  background: #f3f8ff;
}

.timeline-block.is-selected {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.timeline-block-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.timeline-block-main strong {
  font-size: 14px;
  font-weight: 950;
}

.timeline-block-main span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.quiz-builder-panel,
.board-package-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.quiz-question-form:has(:disabled) {
  opacity: 0.72;
}

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

.quiz-question-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quiz-question-card strong {
  font-size: 14px;
}

.quiz-question-card span,
.quiz-question-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.quiz-answer-grid span {
  flex: 1 1 180px;
  padding: 8px 10px;
  color: var(--ink-soft);
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.learner-preview {
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0e315b, #185fd0 58%, #21bdd1);
  border-radius: 8px;
}

.learner-preview .kicker {
  color: rgba(255, 255, 255, 0.78);
}

.learner-preview h4 {
  margin: 0;
  font-size: 22px;
}

.learner-preview p:not(.kicker) {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.learner-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.learner-preview-meta span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.publish-checklist,
.board-package-panel,
.access-model-panel,
.sales-requirement-panel,
.ceu-requirement-panel {
  padding: 16px;
}

.readiness-list,
.board-package-list,
.access-rule-list,
.sales-current-map,
.ceu-current-map,
.ceu-matrix {
  display: grid;
  gap: 8px;
}

.readiness-list span,
.board-package-list span,
.access-rule-list span,
.sales-current-map span,
.ceu-current-map span,
.ceu-matrix div {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  color: var(--ink-soft);
  line-height: 1.35;
}

.course-public-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 12px;
  padding: 9px 12px;
  color: var(--blue-deep);
  background: var(--blue-soft);
  border: 1px solid rgba(24, 95, 208, 0.22);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.readiness-list span::before,
.board-package-list span::before,
.access-rule-list span::before {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  background: #f3f6f9;
  border: 1px solid var(--line);
  border-radius: 999px;
  content: "";
}

.readiness-list span.is-ready::before {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
  content: "\2713";
}

.access-rule-list span::before {
  background: var(--blue-soft);
  border-color: rgba(24, 95, 208, 0.2);
}

.course-form-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.course-accordion {
  padding: 0;
}

.course-accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 16px;
}

.course-accordion summary::-webkit-details-marker {
  display: none;
}

.course-accordion summary::after {
  color: var(--muted);
  content: "+";
  font-size: 20px;
  font-weight: 900;
}

.course-accordion[open] summary {
  border-bottom: 1px solid var(--line);
}

.course-accordion[open] summary::after {
  content: "-";
}

.course-accordion-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.course-form-section h4,
.sales-requirement-panel h4,
.ceu-requirement-panel h4,
.resource-library h4 {
  margin: 0;
  font-size: 16px;
}

.asset-form {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.slides-import-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.slides-import-panel h4,
.slides-import-panel p {
  margin: 0;
}

.slides-import-panel p:not(.kicker) {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.sales-current-map,
.ceu-current-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 12px 0;
}

.sales-current-map span,
.ceu-current-map span,
.ceu-matrix div {
  padding: 10px 11px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ceu-matrix div {
  align-items: flex-start;
  flex-direction: column;
}

.ceu-matrix strong {
  font-size: 13px;
}

.ceu-matrix span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.course-preview-panel .resource-library {
  margin-top: 0;
}

.ceu-template-choice {
  color: #061525;
  background:
    linear-gradient(135deg, rgba(47, 197, 217, 0.22), rgba(18, 97, 214, 0.14)),
    #ffffff;
  border-color: #2fc5d9 !important;
  box-shadow: 0 14px 34px rgba(18, 97, 214, 0.12);
}

.ceu-template-choice strong::after {
  content: "Most important";
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 10px;
  padding: 4px 8px;
  color: #061525;
  background: #2fc5d9;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.ceu-template-panel {
  display: grid;
  gap: 16px;
  margin: 14px 0;
  padding: 16px;
  background: #f2fbfe;
  border: 1px solid #9ee8f1;
  border-left: 5px solid #2fc5d9;
  border-radius: 8px;
}

.ceu-template-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) auto;
  gap: 16px;
  align-items: center;
}

.ceu-template-heading h4,
.ceu-template-heading p {
  margin: 0;
}

.ceu-template-heading p:not(.kicker) {
  margin-top: 5px;
  max-width: 780px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ceu-template-grid button {
  background: #ffffff;
}

.ceu-template-grid button:hover {
  border-color: #2fc5d9;
  box-shadow: 0 12px 26px rgba(18, 97, 214, 0.1);
}

.ceu-selected-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #9ee8f1;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 97, 214, 0.08);
}

.ceu-selected-card span {
  color: #1261d6;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.ceu-selected-card strong {
  color: #061525;
  font-size: 15px;
  line-height: 1.2;
}

.ceu-selected-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.ceu-workflow-notice {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #f2fbfe;
  border: 1px solid #9ee8f1;
  border-radius: 8px;
}

.ceu-workflow-notice strong {
  color: #061525;
  font-size: 14px;
}

.ceu-workflow-notice span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

  .portal-nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .learning-studio-grid,
  .course-workbench {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .portal-header {
    gap: 12px;
    padding: 12px 16px;
  }

  .portal-nav {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-menu {
    position: relative;
  }

  .nav-menu-panel {
    position: fixed;
    top: 118px;
    left: 16px;
    right: auto;
    width: min(260px, calc(100vw - 32px));
    min-width: 0;
    max-width: calc(100vw - 32px);
  }

  .profile-copy {
    display: none;
  }

  .admin-main {
    padding: 20px 16px 28px;
  }

  .status-strip {
    overflow-x: auto;
  }

  .topbar {
    margin-bottom: 18px;
  }

  .builder-stats {
    grid-template-columns: 1fr;
  }

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

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

  .course-template-grid,
  .section-template-grid,
  .studio-action-grid,
  .studio-save-strip {
    grid-template-columns: 1fr;
  }

  .builder-panel-title,
  .builder-toolbar-actions,
  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ceu-template-heading {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .sales-current-map,
  .ceu-current-map {
    grid-template-columns: 1fr;
  }
}

/* Course Studio viewport shell. Keep this block last so it wins over older studio layout rules. */
body.course-studio-mode,
body.course-studio-mode .admin-shell,
body.course-studio-mode .dashboard,
body.course-studio-mode .admin-main,
body.course-studio-mode [data-view-panel="courses"],
body.course-studio-mode .course-workbench {
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.course-studio-mode .admin-main {
  max-height: 100dvh;
}

body.course-studio-mode .course-builder-panel:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 100;
  height: 100%;
  max-height: 100dvh;
  margin: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

body.course-studio-mode .builder-toolbar {
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 10px 16px;
}

body.course-studio-mode .builder-toolbar > div:first-child {
  min-width: 0;
}

body.course-studio-mode .builder-toolbar h3 {
  margin: 0;
  max-width: none;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

body.course-studio-mode .builder-toolbar .kicker {
  margin: 0 0 2px;
}

body.course-studio-mode .builder-toolbar-actions {
  flex-direction: row;
  flex-wrap: nowrap;
  min-width: 0;
  justify-content: flex-start;
  overflow-x: auto;
  scrollbar-width: thin;
}

body.course-studio-mode .builder-toolbar-actions .button,
body.course-studio-mode .builder-toolbar-actions .status-tag,
body.course-studio-mode .studio-app-ribbon,
body.course-studio-mode .studio-layout-ribbon {
  flex: 0 0 auto;
  width: auto;
}

body.course-studio-mode button:disabled,
body.course-studio-mode .button:disabled,
body.course-studio-mode [aria-disabled="true"] {
  color: #60768b;
  background: #e7eff7;
  border-color: #c5d5e4;
  cursor: not-allowed;
  opacity: 1;
}

body.course-studio-mode .learning-studio-grid {
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
}

body.course-studio-mode.studio-inspector-open .learning-studio-grid,
body.course-studio-mode.studio-step-materials .learning-studio-grid,
body.course-studio-mode.studio-step-publish .learning-studio-grid {
  grid-template-columns: minmax(0, 1fr) minmax(330px, clamp(350px, 25vw, 440px));
}

body.course-studio-mode:not(.studio-inspector-open):not(.studio-step-materials):not(.studio-step-publish) .course-preview-panel {
  display: none;
}

body.course-studio-mode.studio-inspector-open .course-preview-panel,
body.course-studio-mode.studio-step-materials .course-preview-panel,
body.course-studio-mode.studio-step-publish .course-preview-panel {
  display: grid;
}

body.course-studio-mode .builder-tool-panel {
  height: 100%;
  min-height: 0;
  grid-template-columns: 88px clamp(270px, 22vw, 380px) minmax(360px, 1fr);
  grid-template-rows: minmax(0, 0.4fr) minmax(0, 0.6fr);
  overflow: hidden;
}

body.course-studio-mode .studio-command-center,
body.course-studio-mode .builder-workbench,
body.course-studio-mode .studio-canvas-shell:not([hidden]),
body.course-studio-mode .course-structure,
body.course-studio-mode .course-preview-panel {
  min-height: 0;
  max-height: 100%;
}

body.course-studio-mode .studio-command-center {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.course-studio-mode .builder-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.course-studio-mode .builder-workbench > *,
body.course-studio-mode .builder-workbench .form-row,
body.course-studio-mode .builder-workbench .quiz-answer-grid,
body.course-studio-mode .builder-workbench .section-template-grid {
  max-width: 100%;
  min-width: 0;
}

body.course-studio-mode .builder-workbench .form-row,
body.course-studio-mode .builder-workbench .quiz-answer-grid,
body.course-studio-mode .builder-workbench .section-template-grid {
  grid-template-columns: 1fr;
}

body.course-studio-mode .builder-workbench input,
body.course-studio-mode .builder-workbench select,
body.course-studio-mode .builder-workbench textarea {
  width: 100%;
  min-width: 0;
}

body.course-studio-mode .studio-canvas-shell:not([hidden]) {
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

body.course-studio-mode .studio-canvas-stage {
  min-height: 0;
  overflow: auto;
}

body.course-studio-mode .course-structure {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

body.course-studio-mode .course-structure > .editor-timeline-shell:only-child {
  grid-row: 1 / -1;
}

body.course-studio-mode .studio-start-panel {
  display: none;
}

body.course-studio-mode .editor-timeline-shell {
  height: 100%;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  content-visibility: visible;
  contain: layout paint style;
}

body.course-studio-mode .editor-timeline-header {
  min-width: 0;
}

body.course-studio-mode .editor-timeline-lanes {
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable;
}

body.course-studio-mode .editor-timeline-lane {
  grid-template-columns: 168px minmax(680px, 1fr);
  min-height: 86px;
}

body.course-studio-mode .editor-timeline-ruler {
  min-width: 680px;
  margin-left: 168px;
}

body.course-studio-mode .editor-lane-label {
  padding: 10px 12px;
}

body.course-studio-mode .editor-lane-track {
  min-width: 680px;
  padding: 10px;
}

body.course-studio-mode .editor-timeline-clip,
body.course-studio-mode .editor-timeline-gate,
body.course-studio-mode .editor-timeline-empty {
  min-height: 62px;
  padding: 8px;
}

body.course-studio-mode .course-preview-panel {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.course-studio-mode.studio-step-materials .course-preview-panel {
  align-content: stretch;
}

body.course-studio-mode.studio-step-materials .course-preview-panel > section:not(.resource-library),
body.course-studio-mode.studio-step-materials .course-preview-panel > div:not(.resource-library) {
  display: none;
}

body.course-studio-mode.studio-step-materials .course-preview-panel > :not(.files-workspace) {
  display: none !important;
}

body.course-studio-mode .files-workspace {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body.course-studio-mode.studio-step-materials .files-workspace,
body.course-studio-mode.studio-step-publish .files-workspace {
  display: grid;
  align-content: start;
  grid-template-rows: none;
}

.files-workspace-intro {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  background: #eef6ff;
  border: 1px solid #c8ddef;
  border-radius: 8px;
}

.files-workspace-intro strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.files-workspace-intro span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

body.course-studio-mode .asset-list {
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable;
}

body.course-studio-mode .asset-card {
  position: relative;
}

body.course-studio-mode .asset-card::before {
  display: inline-grid;
  min-width: 38px;
  min-height: 24px;
  margin-bottom: 6px;
  place-items: center;
  color: #041421;
  background: var(--cyan);
  border-radius: 999px;
  content: "FILE";
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0;
}

body.course-studio-mode .asset-card[data-asset-type="video"]::before {
  content: "VIDEO";
}

body.course-studio-mode .asset-card[data-asset-type="audio"]::before {
  content: "AUDIO";
}

body.course-studio-mode .asset-card[data-asset-type="slide"]::before {
  content: "SLIDE";
}

body.course-studio-mode .asset-card[data-asset-type="image"]::before {
  content: "IMAGE";
}

body.course-studio-mode .asset-card[data-asset-type="link"]::before {
  content: "LINK";
}

body.course-studio-mode.studio-layout-canvas .builder-tool-panel {
  grid-template-columns: 88px minmax(0, 1fr);
}

body.course-studio-mode.studio-layout-timeline .builder-tool-panel,
body.course-studio-mode.studio-timeline-expanded .builder-tool-panel {
  grid-template-columns: 88px minmax(0, 1fr);
}

body.course-studio-mode.studio-layout-builder .builder-tool-panel {
  grid-template-columns: 88px clamp(300px, 32vw, 460px) minmax(420px, 1fr);
}

body.course-studio-mode.studio-layout-canvas .studio-canvas-stage {
  min-height: 0;
}

body.course-studio-mode.studio-layout-timeline .editor-timeline-lanes,
body.course-studio-mode.studio-layout-builder .editor-timeline-lanes,
body.course-studio-mode.studio-timeline-expanded .editor-timeline-lanes {
  max-height: none;
}

body.course-studio-mode.studio-timeline-expanded .editor-timeline-shell {
  min-height: 0;
}

@media (min-width: 1600px) {
  body.course-studio-mode .builder-tool-panel {
    grid-template-columns: 96px minmax(320px, 430px) minmax(720px, 1fr);
  }

  body.course-studio-mode.studio-inspector-open .learning-studio-grid,
  body.course-studio-mode.studio-step-materials .learning-studio-grid,
  body.course-studio-mode.studio-step-publish .learning-studio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 480px);
  }

  body.course-studio-mode .editor-timeline-lane {
    grid-template-columns: 190px minmax(820px, 1fr);
  }

  body.course-studio-mode .editor-timeline-ruler {
    min-width: 820px;
    margin-left: 190px;
  }

  body.course-studio-mode .editor-lane-track {
    min-width: 820px;
  }
}

@media (max-width: 1280px) {
  body.course-studio-mode .builder-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  body.course-studio-mode .builder-tool-panel {
    grid-template-columns: 78px minmax(250px, 320px) minmax(360px, 1fr);
  }

  body.course-studio-mode .studio-action-grid button {
    min-height: 64px;
  }
}

@media (max-width: 980px) {
  body.course-studio-mode .builder-toolbar {
    grid-template-columns: 1fr;
  }

  body.course-studio-mode .builder-toolbar-actions {
    justify-content: flex-start;
  }

  body.course-studio-mode .learning-studio-grid,
  body.course-studio-mode.studio-inspector-open .learning-studio-grid,
  body.course-studio-mode.studio-step-materials .learning-studio-grid,
  body.course-studio-mode.studio-step-publish .learning-studio-grid {
    grid-template-columns: minmax(0, 1fr);
    overflow-y: auto;
  }

  body.course-studio-mode .course-preview-panel {
    min-height: 420px;
    border-left: 0;
    border-top: 1px solid #c7d7e4;
  }

  body.course-studio-mode .builder-tool-panel {
    min-height: 820px;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: minmax(320px, 0.52fr) minmax(300px, 0.48fr);
  }

  body.course-studio-mode .studio-command-center {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  body.course-studio-mode .builder-workbench {
    grid-column: 2;
    grid-row: 1;
  }

  body.course-studio-mode .studio-canvas-shell:not([hidden]) {
    display: none;
  }

  body.course-studio-mode .course-structure {
    grid-column: 2;
    grid-row: 2;
    padding: 12px;
  }

  body.course-studio-mode .studio-start-panel {
    grid-template-columns: 1fr;
  }

  body.course-studio-mode .studio-start-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body.course-studio-mode .builder-toolbar {
    padding: 10px 12px;
  }

  body.course-studio-mode .builder-toolbar h3 {
    max-width: none;
  }

  body.course-studio-mode .builder-toolbar-actions .status-tag {
    display: none;
  }

  body.course-studio-mode .builder-toolbar-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  body.course-studio-mode .builder-tool-panel {
    min-height: 900px;
    grid-template-columns: 64px minmax(0, 1fr);
  }

  body.course-studio-mode .studio-action-grid button {
    min-height: 58px;
    padding: 7px 5px;
  }

  body.course-studio-mode .studio-action-grid button i {
    width: 32px;
    height: 32px;
  }

  body.course-studio-mode .editor-timeline-lane {
    grid-template-columns: 132px minmax(560px, 1fr);
  }

  body.course-studio-mode .editor-timeline-ruler {
    min-width: 560px;
    margin-left: 132px;
  }

  body.course-studio-mode .editor-lane-track {
    min-width: 560px;
  }
}

.learning-command-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.learning-command-strip button,
.build-queue-list button {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 14px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.learning-command-strip button:hover,
.learning-command-strip button:focus-visible,
.build-queue-list button:hover,
.build-queue-list button:focus-visible {
  border-color: rgba(31, 111, 235, 0.42);
  box-shadow: 0 14px 32px rgba(7, 22, 38, 0.08);
  outline: 0;
}

.learning-command-strip span,
.build-queue-list span {
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  color: #041421;
  background: var(--cyan);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.learning-command-strip span {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.learning-command-strip strong,
.build-queue-list strong {
  font-size: 14px;
  font-weight: 950;
  line-height: 1.2;
}

.learning-command-strip small,
.build-queue-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

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

.build-queue-panel {
  margin-top: 18px;
  padding: 18px;
}

.build-queue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.build-queue-list span[data-state="active"] {
  background: var(--cyan);
}

.build-queue-list span[data-state="review"] {
  background: #ffdf95;
}

.build-queue-list span[data-state="planned"] {
  color: var(--ink-soft);
  background: var(--blue-soft);
}

body.course-studio-mode .course-builder-panel:not([hidden]) {
  background: #061524;
}

body.course-studio-mode .learning-studio-grid {
  gap: 0;
  background: #061524;
}

body.course-studio-mode .builder-tool-panel {
  display: grid;
  grid-template-columns: clamp(220px, 18vw, 320px) minmax(300px, 0.82fr) minmax(500px, 1.25fr);
  grid-template-rows: minmax(0, 1fr) minmax(220px, 0.62fr);
  grid-template-areas:
    "tools forms canvas"
    "tools forms timeline";
  gap: 12px;
  padding: 12px;
  background: #061524;
  border: 0;
}

body.course-studio-mode .studio-command-center {
  grid-area: tools;
  align-content: start;
}

body.course-studio-mode .builder-workbench {
  grid-area: forms;
}

body.course-studio-mode .studio-canvas-shell:not([hidden]) {
  grid-area: canvas;
}

body.course-studio-mode .course-structure {
  grid-area: timeline;
}

body.course-studio-mode .studio-command-center,
body.course-studio-mode .builder-workbench,
body.course-studio-mode .studio-canvas-shell:not([hidden]),
body.course-studio-mode .course-structure {
  border-radius: 8px;
}

body.course-studio-mode.studio-layout-canvas .builder-tool-panel {
  grid-template-columns: clamp(220px, 18vw, 320px) minmax(560px, 1fr);
  grid-template-areas:
    "tools canvas"
    "tools canvas";
}

body.course-studio-mode.studio-layout-canvas .builder-workbench,
body.course-studio-mode.studio-layout-canvas .course-structure {
  display: none;
}

body.course-studio-mode.studio-layout-timeline .builder-tool-panel,
body.course-studio-mode.studio-timeline-expanded .builder-tool-panel {
  grid-template-columns: clamp(190px, 16vw, 280px) minmax(560px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "tools timeline";
}

body.course-studio-mode.studio-layout-timeline .builder-workbench,
body.course-studio-mode.studio-layout-timeline .studio-canvas-shell,
body.course-studio-mode.studio-timeline-expanded .builder-workbench,
body.course-studio-mode.studio-timeline-expanded .studio-canvas-shell {
  display: none;
}

body.course-studio-mode.studio-layout-builder .builder-tool-panel {
  grid-template-columns: clamp(220px, 18vw, 330px) minmax(360px, 0.95fr) minmax(440px, 1.05fr);
  grid-template-areas:
    "tools forms timeline"
    "tools forms timeline";
}

body.course-studio-mode.studio-layout-builder .studio-canvas-shell {
  display: none;
}

body.course-studio-mode.studio-step-materials .builder-tool-panel,
body.course-studio-mode.studio-step-publish .builder-tool-panel {
  grid-template-columns: clamp(210px, 16vw, 280px) minmax(520px, 1fr);
  grid-template-areas:
    "tools timeline"
    "tools timeline";
}

body.course-studio-mode.studio-step-materials .builder-workbench,
body.course-studio-mode.studio-step-materials .studio-canvas-shell,
body.course-studio-mode.studio-step-publish .builder-workbench,
body.course-studio-mode.studio-step-publish .studio-canvas-shell {
  display: none;
}

@media (max-width: 1350px) {
  .learning-command-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.course-studio-mode .builder-tool-panel {
    grid-template-columns: clamp(190px, 22vw, 280px) minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  }
}

@media (max-width: 1020px) {
  .learning-command-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.course-studio-mode .learning-studio-grid,
  body.course-studio-mode.studio-inspector-open .learning-studio-grid,
  body.course-studio-mode.studio-step-materials .learning-studio-grid,
  body.course-studio-mode.studio-step-publish .learning-studio-grid {
    overflow-y: auto;
  }

  body.course-studio-mode .builder-tool-panel,
  body.course-studio-mode.studio-layout-builder .builder-tool-panel,
  body.course-studio-mode.studio-step-materials .builder-tool-panel,
  body.course-studio-mode.studio-step-publish .builder-tool-panel {
    min-height: 980px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(320px, 0.65fr) minmax(360px, 0.7fr);
    grid-template-areas:
      "tools"
      "forms"
      "timeline";
    overflow-y: visible;
  }

  body.course-studio-mode .studio-canvas-shell:not([hidden]) {
    display: none;
  }

  body.course-studio-mode .course-preview-panel {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .learning-command-strip {
    grid-template-columns: 1fr;
  }

  .builder-title-actions {
    justify-content: flex-start;
  }
}

/* Course Studio production polish. Keep this at the end so the app shell stays responsive. */
body.course-studio-mode .builder-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.78fr);
  align-items: center;
  gap: 8px 14px;
  padding: 8px 14px;
}

body.course-studio-mode .builder-toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  overflow: visible;
  scrollbar-width: none;
}

body.course-studio-mode .builder-toolbar-actions::-webkit-scrollbar {
  display: none;
}

body.course-studio-mode .builder-toolbar-actions .button,
body.course-studio-mode .builder-toolbar-actions .status-tag {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

body.course-studio-mode .studio-app-ribbon,
body.course-studio-mode .studio-layout-ribbon {
  min-height: 32px;
  padding: 3px;
}

body.course-studio-mode .studio-app-ribbon button,
body.course-studio-mode .studio-layout-ribbon button {
  min-height: 26px;
  padding: 5px 8px;
  font-size: 11px;
}

body.course-studio-mode .learning-studio-grid {
  height: calc(100dvh - var(--studio-toolbar-height, 92px));
}

body.course-studio-mode .course-builder-panel:not([hidden]) {
  --studio-toolbar-height: 92px;
}

body.course-studio-mode .builder-tool-panel {
  grid-template-rows: minmax(300px, 0.55fr) minmax(240px, 0.45fr);
}

body.course-studio-mode .studio-canvas-stage {
  display: grid;
  align-items: center;
  justify-items: center;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

body.course-studio-mode .studio-canvas-shell:not([hidden]),
body.course-studio-mode .studio-canvas-topbar,
body.course-studio-mode .studio-canvas-footer,
body.course-studio-mode .studio-layer-strip,
body.course-studio-mode .course-structure,
body.course-studio-mode .editor-timeline-shell {
  min-width: 0;
}

body.course-studio-mode .studio-canvas-shell:not([hidden]),
body.course-studio-mode .studio-canvas-topbar,
body.course-studio-mode .studio-canvas-footer,
body.course-studio-mode .studio-canvas-stage,
body.course-studio-mode .studio-layer-strip {
  max-width: 100%;
}

body.course-studio-mode .studio-slide-page {
  width: min(520px, 100%);
  height: 100%;
  max-width: 100%;
  min-height: 150px;
  min-width: 0;
  aspect-ratio: 16 / 10;
  grid-template-rows: auto minmax(52px, 1fr) auto;
}

body.course-studio-mode .studio-slide-header {
  padding: 7px 10px;
}

body.course-studio-mode .studio-slide-media {
  min-height: 52px;
  padding: 8px;
}

body.course-studio-mode .studio-slide-copy {
  padding: 8px 10px;
}

body.course-studio-mode .studio-slide-copy h5 {
  font-size: 13px;
}

body.course-studio-mode .studio-slide-copy p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 1.25;
}

body.course-studio-mode.studio-layout-canvas .studio-slide-page {
  height: auto;
  min-height: 300px;
}

body.course-studio-mode .studio-slide-header,
body.course-studio-mode .studio-slide-copy,
body.course-studio-mode .studio-slide-media {
  min-width: 0;
}

body.course-studio-mode .studio-slide-copy h5,
body.course-studio-mode .studio-slide-copy p,
body.course-studio-mode .studio-slide-header strong,
body.course-studio-mode .studio-slide-media span {
  overflow-wrap: anywhere;
}

body.course-studio-mode .studio-layer-strip {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

body.course-studio-mode .studio-layer-strip button,
body.course-studio-mode .studio-layer-strip span {
  flex: 0 0 auto;
}

body.course-studio-mode .editor-timeline-header {
  gap: 10px;
}

body.course-studio-mode .editor-timeline-meta {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 1320px) {
  body.course-studio-mode .builder-toolbar {
    grid-template-columns: minmax(0, 1fr);
    --studio-toolbar-height: 118px;
  }

  body.course-studio-mode .course-builder-panel:not([hidden]) {
    --studio-toolbar-height: 118px;
  }

  body.course-studio-mode .builder-toolbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  body.course-studio-mode .course-builder-panel:not([hidden]) {
    --studio-toolbar-height: 136px;
  }

  body.course-studio-mode .learning-studio-grid {
    height: calc(100dvh - var(--studio-toolbar-height, 136px));
  }

  body.course-studio-mode .builder-tool-panel {
    min-height: 760px;
    grid-template-rows: minmax(290px, 0.48fr) minmax(340px, 0.52fr);
  }
}

@media (max-width: 700px) {
  body.course-studio-mode .builder-toolbar-actions .status-tag {
    display: none;
  }

  body.course-studio-mode .studio-app-ribbon,
  body.course-studio-mode .studio-layout-ribbon {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* UI test refresh: operations portal and course studio shell. */
:root {
  --ink: #071626;
  --ink-soft: #254057;
  --paper: #eef5f8;
  --white: #ffffff;
  --surface-soft: #f7fbfd;
  --line: #c8dbe8;
  --line-strong: #8eaabd;
  --blue: #155fc7;
  --blue-deep: #082b55;
  --blue-soft: #e9f3ff;
  --cyan: #28bfd2;
  --green: #148a62;
  --gold: #b8861d;
  --orange: #c54b34;
  --muted: #667989;
  --shadow: 0 18px 44px rgba(7, 22, 38, 0.08);
  --shadow-soft: 0 10px 26px rgba(7, 22, 38, 0.06);
}

body:not(.course-studio-mode) {
  background:
    linear-gradient(180deg, rgba(238, 245, 248, 0.86), rgba(238, 245, 248, 1) 340px),
    var(--paper);
}

body:not(.course-studio-mode) .admin-shell {
  display: block;
  min-height: 100vh;
}

body:not(.course-studio-mode) .portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 70px;
  padding: 10px clamp(16px, 3vw, 34px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(142, 170, 189, 0.38);
  box-shadow: 0 8px 24px rgba(7, 22, 38, 0.05);
  backdrop-filter: blur(14px);
}

body:not(.course-studio-mode) .brand {
  gap: 10px;
  min-width: 0;
}

body:not(.course-studio-mode) .brand-mark {
  width: 42px;
  height: 42px;
  padding: 5px;
  background: linear-gradient(145deg, #061524, #0b3565);
  border: 1px solid rgba(40, 191, 210, 0.32);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(7, 22, 38, 0.15);
}

body:not(.course-studio-mode) .brand-text strong {
  font-size: 15px;
  line-height: 1;
}

body:not(.course-studio-mode) .brand-text small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body:not(.course-studio-mode) .portal-nav {
  gap: 4px;
  align-items: center;
}

body:not(.course-studio-mode) .portal-nav-link,
body:not(.course-studio-mode) .nav-menu summary {
  min-height: 40px;
  padding: 10px 12px;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 950;
}

body:not(.course-studio-mode) .portal-nav-link:hover,
body:not(.course-studio-mode) .portal-nav-link.is-active,
body:not(.course-studio-mode) .nav-menu[open] summary,
body:not(.course-studio-mode) .nav-menu summary:hover {
  color: #041421;
  background: var(--cyan-soft, #e4f8fb);
  border-color: rgba(40, 191, 210, 0.42);
}

body:not(.course-studio-mode) .nav-menu-panel,
body:not(.course-studio-mode) .profile-panel {
  margin-top: 8px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 48px rgba(7, 22, 38, 0.18);
}

body:not(.course-studio-mode) .nav-menu-panel a,
body:not(.course-studio-mode) .profile-panel a,
body:not(.course-studio-mode) .profile-panel button {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 6px;
  font-weight: 900;
}

body:not(.course-studio-mode) .nav-menu-panel a:hover,
body:not(.course-studio-mode) .profile-panel a:hover,
body:not(.course-studio-mode) .profile-panel button:hover {
  background: var(--cyan-soft, #e4f8fb);
}

body:not(.course-studio-mode) .profile-menu summary {
  min-height: 44px;
  padding: 5px 8px;
  background: #ffffff;
  border: 1px solid rgba(142, 170, 189, 0.56);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

body:not(.course-studio-mode) .profile-avatar {
  background: linear-gradient(145deg, #e4f8fb, #ffffff);
  border-color: rgba(21, 95, 199, 0.2);
}

body:not(.course-studio-mode) .admin-main {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px);
}

body:not(.course-studio-mode) .topbar {
  align-items: flex-end;
  min-height: 108px;
  margin-bottom: 16px;
  padding: 18px 0;
}

body:not(.course-studio-mode) .topbar h1 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
}

body:not(.course-studio-mode) .kicker {
  color: var(--blue);
  letter-spacing: 0.03em;
}

body:not(.course-studio-mode) .access-panel {
  min-height: 420px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: center;
  border-color: rgba(142, 170, 189, 0.5);
  box-shadow: var(--shadow);
}

body:not(.course-studio-mode) .dashboard {
  display: grid;
  gap: 16px;
}

body:not(.course-studio-mode) .status-strip,
body:not(.course-studio-mode) .builder-stats,
body:not(.course-studio-mode) .owner-control-grid,
body:not(.course-studio-mode) .company-metric-grid,
body:not(.course-studio-mode) .dashboard-stat-grid {
  gap: 10px;
}

body:not(.course-studio-mode) .stat,
body:not(.course-studio-mode) .metric-card,
body:not(.course-studio-mode) .owner-card,
body:not(.course-studio-mode) .builder-stats article,
body:not(.course-studio-mode) .status-card {
  min-height: 124px;
  background: #ffffff;
  border: 1px solid rgba(142, 170, 189, 0.48);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

body:not(.course-studio-mode) .stat strong,
body:not(.course-studio-mode) .metric-card strong,
body:not(.course-studio-mode) .owner-card strong,
body:not(.course-studio-mode) .builder-stats strong {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1;
}

body:not(.course-studio-mode) .lead-list-panel,
body:not(.course-studio-mode) .lead-detail-panel,
body:not(.course-studio-mode) .admin-panel,
body:not(.course-studio-mode) .course-list-panel,
body:not(.course-studio-mode) .course-detail-panel,
body:not(.course-studio-mode) .course-builder-panel,
body:not(.course-studio-mode) .assignment-form-panel,
body:not(.course-studio-mode) .assignment-list-panel,
body:not(.course-studio-mode) .portal-account-panel {
  background: #ffffff;
  border: 1px solid rgba(142, 170, 189, 0.5);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

body:not(.course-studio-mode) .panel-header,
body:not(.course-studio-mode) .detail-header,
body:not(.course-studio-mode) .portal-account-panel > .panel-header,
body:not(.course-studio-mode) .course-page-heading,
body:not(.course-studio-mode) .learning-header {
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  border-bottom-color: rgba(200, 219, 232, 0.82);
}

body:not(.course-studio-mode) input,
body:not(.course-studio-mode) select,
body:not(.course-studio-mode) textarea {
  min-height: 42px;
  background: #f8fbfd;
  border-color: rgba(142, 170, 189, 0.58);
  border-radius: 7px;
}

body:not(.course-studio-mode) input:focus,
body:not(.course-studio-mode) select:focus,
body:not(.course-studio-mode) textarea:focus {
  outline: 3px solid rgba(40, 191, 210, 0.18);
  border-color: var(--cyan);
}

body:not(.course-studio-mode) .button {
  min-height: 40px;
  border-radius: 7px;
}

body:not(.course-studio-mode) .button-primary {
  color: #041421;
  background: var(--cyan);
  border-color: rgba(40, 191, 210, 0.7);
  box-shadow: 0 10px 20px rgba(40, 191, 210, 0.18);
}

body:not(.course-studio-mode) .button-primary:hover,
body:not(.course-studio-mode) .button-primary:focus-visible {
  background: #42cddd;
}

body:not(.course-studio-mode) .button-secondary {
  background: #ffffff;
  border-color: rgba(142, 170, 189, 0.66);
}

body:not(.course-studio-mode) .course-card,
body:not(.course-studio-mode) .assignment-card,
body:not(.course-studio-mode) .portal-account-card,
body:not(.course-studio-mode) .person-card,
body:not(.course-studio-mode) .company-card,
body:not(.course-studio-mode) .lead-card,
body:not(.course-studio-mode) .training-report-card {
  background: #ffffff;
  border: 1px solid rgba(142, 170, 189, 0.48);
  border-radius: 8px;
  box-shadow: none;
}

body:not(.course-studio-mode) .course-card:hover,
body:not(.course-studio-mode) .assignment-card:hover,
body:not(.course-studio-mode) .portal-account-card:hover,
body:not(.course-studio-mode) .person-card:hover,
body:not(.course-studio-mode) .company-card:hover,
body:not(.course-studio-mode) .lead-card:hover {
  border-color: rgba(21, 95, 199, 0.42);
  box-shadow: 0 14px 30px rgba(7, 22, 38, 0.08);
}

body:not(.course-studio-mode) .course-mode-tabs,
body:not(.course-studio-mode) .course-workflow-strip,
body:not(.course-studio-mode) .learning-command-strip {
  background: #ffffff;
  border: 1px solid rgba(142, 170, 189, 0.48);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

body:not(.course-studio-mode) .course-mode-tabs button,
body:not(.course-studio-mode) .course-workflow-strip button {
  min-height: 38px;
  border-radius: 6px;
}

body:not(.course-studio-mode) .course-mode-tabs button.is-active,
body:not(.course-studio-mode) .course-workflow-strip button.is-active {
  color: #041421;
  background: var(--cyan);
}

body.course-studio-mode {
  background: #071626;
}

body.course-studio-mode .builder-toolbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(142, 170, 189, 0.44);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

body.course-studio-mode .builder-toolbar h3 {
  color: #071626;
}

body.course-studio-mode .builder-toolbar .kicker {
  color: var(--blue);
}

body.course-studio-mode .builder-toolbar-actions .button {
  border-radius: 7px;
}

body.course-studio-mode .studio-app-ribbon,
body.course-studio-mode .studio-layout-ribbon {
  background: #edf5fb;
  border: 1px solid rgba(142, 170, 189, 0.58);
  border-radius: 8px;
}

body.course-studio-mode .studio-app-ribbon button,
body.course-studio-mode .studio-layout-ribbon button {
  color: var(--ink-soft);
  border-radius: 6px;
}

body.course-studio-mode .studio-app-ribbon button.is-active,
body.course-studio-mode .studio-layout-ribbon button.is-active {
  color: #041421;
  background: var(--cyan);
}

body.course-studio-mode .builder-tool-panel,
body.course-studio-mode .studio-command-center,
body.course-studio-mode .builder-workbench,
body.course-studio-mode .studio-canvas-shell:not([hidden]),
body.course-studio-mode .course-structure,
body.course-studio-mode .course-preview-panel {
  border-color: rgba(112, 147, 171, 0.48);
  border-radius: 8px;
}

body.course-studio-mode .studio-command-center,
body.course-studio-mode .builder-workbench,
body.course-studio-mode .studio-canvas-shell:not([hidden]),
body.course-studio-mode .course-preview-panel {
  background: #0b2032;
}

body.course-studio-mode .studio-action-grid button,
body.course-studio-mode .section-template-grid button,
body.course-studio-mode .asset-card,
body.course-studio-mode .selected-media-panel,
body.course-studio-mode .selected-media-list article {
  border-color: rgba(112, 147, 171, 0.48);
  border-radius: 8px;
}

body.course-studio-mode .editor-timeline-shell {
  background: #081a2a;
}

body.course-studio-mode .editor-timeline-header {
  background: #0b2032;
  border-bottom: 1px solid rgba(112, 147, 171, 0.46);
}

body.course-studio-mode .editor-timeline-lane {
  min-height: 82px;
}

body.course-studio-mode .editor-timeline-clip,
body.course-studio-mode .editor-timeline-gate,
body.course-studio-mode .editor-timeline-empty {
  border-radius: 8px;
}

@media (max-width: 1120px) {
  body:not(.course-studio-mode) .portal-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body:not(.course-studio-mode) .portal-nav {
    grid-column: 1 / -1;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 720px) {
  body:not(.course-studio-mode) .portal-header,
  body:not(.course-studio-mode) .access-panel {
    grid-template-columns: 1fr;
  }

  body:not(.course-studio-mode) .topbar {
    min-height: 0;
  }
}
