:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #17212f;
  --muted: #647184;
  --line: #dce3eb;
  --dark: #162232;
  --dark-2: #203144;
  --orange: #f46b21;
  --blue: #1769d2;
  --green: #208a45;
  --red: #ce2d2d;
  --shadow: 0 14px 40px rgba(20, 34, 50, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px 18px;
  color: #eff5fb;
  background: linear-gradient(180deg, #111c29 0%, #203447 100%);
  overflow-y: auto;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.progress-card span,
.tool-link {
  color: #b8c5d3;
  font-size: 13px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--orange);
  border: 1px solid rgba(244, 107, 33, 0.42);
  border-radius: 8px;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark svg {
  fill: currentColor;
  stroke: none;
}

.progress-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

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

.meter {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--green);
  transition: width 0.25s ease;
}

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

.module-button,
.tool-link {
  width: 100%;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  color: #eef4fb;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.module-button:hover,
.module-button.is-active,
.tool-link:hover,
.tool-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.13);
}

.module-button.is-active .icon {
  background: var(--orange);
  border-color: var(--orange);
}

.module-title {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.module-meta {
  color: #aab7c6;
  font-size: 12px;
}

.icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.icon.small {
  width: 28px;
  height: 28px;
}

.sidebar-tools {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.photo-strip {
  min-height: 88px;
  background:
    linear-gradient(90deg, rgba(16, 27, 40, 0.75), rgba(16, 27, 40, 0.08)),
    url("assets/course-concept.png") center 11% / cover;
}

.profile {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 28px;
  border-left: 1px solid var(--line);
}

.landing-body,
.registration-body {
  background: #f7f9fb;
}

.landing-nav {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.landing-brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.landing-brand .brand-mark {
  color: var(--orange);
  background: #fff;
}

.landing-brand strong,
.landing-brand small {
  display: block;
}

.landing-brand small {
  color: var(--muted);
  font-size: 12px;
}

.landing-nav nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.landing-nav nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
}

.landing-hero,
.landing-band {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: 36px 0;
}

.landing-hero h1,
.registration-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.96;
  letter-spacing: 0;
}

.landing-hero p,
.registration-copy p,
.registration-band p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.landing-visual {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.landing-photo {
  min-height: 230px;
  background-position: center 12%;
}

.locked-preview {
  padding: 24px;
}

.locked-preview span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.locked-preview strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
}

.landing-band {
  padding: 40px 0;
}

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

.landing-card-grid .guide-card h3 {
  margin-top: 0;
}

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

.module-preview-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.module-preview-list strong {
  color: var(--orange);
}

.registration-band {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 28px;
  padding: 28px;
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
}

.registration-band h2 {
  margin: 0;
  font-size: 30px;
}

.registration-band p {
  max-width: 720px;
  margin-bottom: 0;
  color: #cbd7e3;
}

.registration-shell {
  width: min(1100px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 44px;
  align-items: center;
  padding: 36px 0;
}

.registration-copy {
  display: grid;
  gap: 24px;
}

.registration-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.registration-card h2 {
  margin: 0 0 18px;
}

.registration-card form,
.code-form {
  display: grid;
  gap: 14px;
}

.registration-card label,
.code-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.registration-card input,
.code-form input {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 500;
}

.profile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile strong {
  display: block;
  white-space: nowrap;
  font-size: 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 34px 42px 24px;
  align-items: end;
}

.hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

.hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.recognition-line {
  max-width: 760px;
  margin-top: 16px;
  padding: 12px 14px;
  color: #324155;
  background: #eef5f1;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 7px;
  font-weight: 750;
  font-size: 14px;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.secondary-button,
.ghost-button {
  color: var(--blue);
  background: #fff;
  border: 1px solid #bcd0ea;
}

.status-panel,
.lesson-panel,
.playbook,
.practice-panel,
.guide-card,
.scenario-card,
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status-panel {
  padding: 22px;
}

.status-label,
.eyebrow {
  color: var(--orange);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.status-panel strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
}

.access-status {
  margin-top: 14px;
  padding: 10px 12px;
  color: #255f3a;
  background: #eaf6ee;
  border: 1px solid #bfdfca;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.access-status.is-review {
  color: #855014;
  background: #fff4e8;
  border-color: #ffd3a3;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding: 0 42px 30px;
}

.lesson-panel {
  overflow: hidden;
}

.lesson-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.lesson-header h2 {
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.1;
}

.lesson-header p,
.lesson-body p,
.scenario-card p,
.guide-card li,
.guide-card textarea,
.playbook p,
.modal-card p {
  color: var(--muted);
  line-height: 1.5;
}

.lesson-body {
  display: grid;
  gap: 18px;
  padding: 24px 28px 28px;
}

.content-block {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.content-block h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.check-list,
.power-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.power-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
}

.check-list li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: radial-gradient(circle at center, var(--green) 0 3px, transparent 4px);
}

.power-list strong {
  color: var(--ink);
}

.module-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.playbook {
  align-self: start;
  position: sticky;
  top: 20px;
  overflow: hidden;
}

.playbook-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  color: #fff;
  background: var(--dark);
}

.playbook-head h2 {
  margin: 0;
  font-size: 17px;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: currentColor;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.playbook-section {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.playbook.is-collapsed #playbookContent {
  display: none;
}

.playbook-section h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.playbook-section ul {
  margin: 0;
  padding-left: 18px;
}

.playbook-section li {
  margin: 8px 0;
  color: var(--muted);
}

.practice-panel,
.guide-grid {
  margin: 0 42px 34px;
}

.practice-panel {
  padding: 24px;
}

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

.section-head h2,
.guide-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.segmented {
  display: flex;
  padding: 4px;
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
}

.segmented button.is-selected {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 6px rgba(24, 36, 50, 0.08);
}

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

.scenario-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  box-shadow: none;
}

.scenario-card h3 {
  margin: 0;
  font-size: 18px;
}

.scenario-card p {
  margin: 0;
}

.tag {
  justify-self: start;
  padding: 4px 8px;
  color: var(--green);
  background: #eaf6ee;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tag.conflict {
  color: var(--orange);
  background: #fff0e8;
}

.tag.coaching {
  color: var(--blue);
  background: #eaf2ff;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.guide-card {
  padding: 24px;
  box-shadow: none;
}

.recognition-card {
  grid-column: 1 / -1;
  border-left: 4px solid var(--orange);
}

.recognition-card p {
  color: var(--muted);
  line-height: 1.55;
}

.fine-print {
  font-size: 13px;
}

.analytics-body {
  background: #f4f7fa;
}

.analytics-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.analytics-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.analytics-header h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
}

.analytics-header p {
  color: var(--muted);
  font-size: 17px;
}

.analytics-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.request-code-link {
  justify-self: start;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.analytics-card,
.analytics-section,
.analytics-login {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analytics-login {
  max-width: 520px;
  padding: 24px;
}

.analytics-login h2 {
  margin: 0 0 8px;
}

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

.analytics-login form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 18px;
}

.hosted-dashboard-link {
  margin-top: 12px;
}

.analytics-login input {
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.login-error {
  min-height: 20px;
  color: var(--red) !important;
  font-size: 13px;
  font-weight: 750;
}

.file-warning {
  padding: 12px;
  color: #324155 !important;
  background: #fff4e8;
  border: 1px solid #ffd4ad;
  border-radius: 7px;
  font-size: 14px;
}

.analytics-card {
  padding: 20px;
}

.analytics-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.analytics-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.analytics-section {
  padding: 24px;
  margin-bottom: 24px;
}

.analytics-bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.bar-label strong {
  color: var(--ink);
}

.bar-track {
  height: 10px;
  overflow: hidden;
  background: #e7edf4;
  border-radius: 999px;
}

.bar-track span {
  display: block;
  height: 100%;
  background: var(--blue);
}

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

.activity-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.learner-row {
  align-items: center;
}

.activity-row strong,
.activity-row span {
  display: block;
}

.activity-row span,
.activity-row time,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.guide-card label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-weight: 750;
}

textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(8, 16, 25, 0.56);
  z-index: 50;
}

.modal.is-open {
  display: grid;
}

.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86vh, 780px);
  padding: 30px;
  overflow: auto;
}

.close-modal {
  position: absolute;
  top: 14px;
  right: 14px;
}

.roleplay {
  margin-top: 18px;
  padding: 16px;
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.roleplay strong {
  color: var(--ink);
}

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

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

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

  .workspace,
  .hero {
    grid-template-columns: 1fr;
  }

  .playbook {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar,
  .hero,
  .workspace,
  .guide-grid,
  .section-head,
  .landing-hero,
  .registration-shell,
  .landing-card-grid {
    grid-template-columns: 1fr;
  }

  .landing-nav,
  .landing-nav nav,
  .registration-band {
    display: grid;
    justify-items: start;
  }

  .topbar {
    display: block;
  }

  .profile,
  .hero,
  .workspace,
  .practice-panel,
  .guide-grid,
  .analytics-shell {
    margin: 0;
    padding-left: 18px;
    padding-right: 18px;
  }

  .practice-panel,
  .guide-grid {
    margin-bottom: 24px;
  }

  .module-list,
  .scenario-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .analytics-header,
  .activity-row {
    display: grid;
  }

  .segmented {
    overflow-x: auto;
  }

  .hero h1 {
    font-size: 34px;
  }

  .landing-hero h1,
  .registration-copy h1 {
    font-size: 42px;
  }

  .module-preview-list div {
    grid-template-columns: 1fr;
  }
}
