:root {
  --teal: #0CA58E;
  --teal-dark: #08896C;
  --navy: #0B162B;
  --navy-2: #122B5E;
  --ink: #17233c;
  --muted: #6f7785;
  --line: #dfe5ea;
  --soft-line: #edf1f4;
  --page: #f5f7f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --yellow: #ffd34d;
  --green: #35a853;
  --red: #ce4b3b;
  --shadow: 0 10px 24px rgba(11, 22, 43, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(11, 22, 43, 0.035) 0 1px, transparent 1px 26px),
    linear-gradient(60deg, rgba(11, 22, 43, 0.028) 0 1px, transparent 1px 30px),
    var(--page);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.45;
}

.platform-shell {
  min-height: 100vh;
}

.platform-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(1840px, calc(100vw - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto;
  grid-template-areas:
    "brand tabs"
    "brand actions";
  gap: 10px 18px;
  align-items: center;
  padding: 0 0 14px;
  border-top: 30px solid var(--teal);
  border-bottom: 8px solid var(--navy);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 0 28px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  height: 50px;
  width: auto;
  display: block;
}

.brand-divider {
  width: 1px;
  height: 34px;
  background: #E5E8EE;
  flex: none;
}

.brand-name {
  display: block;
  color: var(--teal);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.top-tabs {
  grid-area: tabs;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.top-tab,
.primary-btn,
.ghost-btn,
.status-btn {
  min-height: 38px;
  padding: 8px 18px;
  border: 0;
  border-radius: 0;
  color: white;
  background: var(--navy);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: background 0.15s ease, transform 0.15s ease;
}

.top-tab:hover,
.top-tab.active,
.primary-btn {
  background: var(--teal);
}

.top-tab:hover,
.primary-btn:hover,
.ghost-btn:hover,
.status-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn,
.status-btn {
  background: #cfd4d8;
  color: white;
}

.ghost-btn:hover,
.status-btn:hover {
  background: var(--navy-2);
}

.status-btn.complete {
  background: var(--green);
}

.header-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-right: 24px;
}

#open-current {
  display: none;
}

.platform-body {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  width: min(1840px, calc(100vw - 32px));
  margin: 0 auto 34px;
  background: #e4e4e4;
  box-shadow: var(--shadow);
}

.course-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100vh - 150px);
  padding: 0 0 20px;
  background: var(--navy);
  color: white;
}

.sidebar-panel {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.course-overview {
  background: var(--navy);
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.course-overview .eyebrow,
.progress-panel .eyebrow {
  color: var(--yellow);
}

.course-overview h1 {
  margin: 8px 0 10px;
  font-size: 25px;
  line-height: 1.12;
}

.course-stats {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sidebar-title-row h2 {
  margin: 0;
  color: inherit;
  font-size: 18px;
  line-height: 1.1;
}

.sidebar-title-row span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.week-progress-rail {
  position: relative;
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.rail-item {
  position: relative;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  min-height: 54px;
  padding-bottom: 12px;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  background: transparent;
  border: 0;
}

.rail-item::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 28px;
  bottom: -4px;
  width: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.rail-item:last-child::before {
  display: none;
}

.rail-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.rail-item.current .rail-dot {
  background: var(--teal);
  color: white;
}

.rail-item.done .rail-dot {
  background: var(--green);
  color: white;
}

.rail-title {
  display: block;
  color: white;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.rail-subtitle {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  line-height: 1.25;
}

.week-switcher {
  padding-top: 16px;
}

.week-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.week-button {
  min-width: 54px;
  padding: 8px 9px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
}

.week-button:hover,
.week-button.active {
  color: var(--navy);
  background: var(--yellow);
  border-color: var(--yellow);
}

.week-button.empty {
  display: none;
}

.week-number {
  display: block;
  font-size: 13px;
  font-weight: 900;
}

.week-name,
.week-topic,
.week-status {
  display: none;
}

.coming-soon-note {
  width: 100%;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.4;
}

.workspace {
  min-width: 0;
  padding: 14px 14px 24px;
  background: #e4e4e4;
}

.workspace-view {
  display: none;
}

.workspace-view.active {
  display: block;
}

.hero-band,
.lesson-toolbar,
.frame-wrap,
.planner-card,
.report-summary-card,
.report-row,
.module-card {
  background: var(--panel);
  border: 1px solid var(--line);
}

.hero-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  min-height: 148px;
  padding: 26px 34px 28px;
  background:
    linear-gradient(90deg, rgba(12, 165, 142, 0.09), transparent 52%),
    var(--panel);
}

.hero-band h2,
.section-heading h2,
.lesson-toolbar h2 {
  margin: 5px 0 0;
  color: var(--teal);
  line-height: 1.15;
}

.hero-band h2 {
  max-width: 720px;
  font-size: clamp(30px, 3vw, 38px);
}

.hero-band p {
  max-width: 560px;
  margin: 12px 0 0;
  color: #333;
  font-size: 17px;
  line-height: 1.52;
}

.hero-actions,
.lesson-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 10px;
}

.section-heading h2 {
  font-size: 24px;
}

.compact-heading {
  margin-top: 18px;
}

.module-grid {
  display: grid;
  gap: 8px;
}

.module-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 96px;
  gap: 14px;
  align-items: center;
  min-height: 78px;
  padding: 14px 18px;
  text-align: left;
}

.module-card:hover {
  border-color: var(--teal);
  box-shadow: 0 3px 0 rgba(12, 165, 142, 0.16);
}

.module-card.complete {
  border-left: 6px solid var(--green);
}

.module-card.locked {
  opacity: 0.72;
}

.module-type {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 5px 9px;
  color: white;
  background: var(--navy);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-type.lesson {
  background: var(--teal);
}

.module-type.mock {
  background: var(--navy);
}

.module-type.past {
  background: var(--red);
}

.module-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.module-card p {
  display: none;
}

.module-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.module-state {
  color: var(--muted);
}

.module-state.done {
  color: var(--green);
}

.lesson-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 0;
}

.lesson-toolbar h2 {
  font-size: 24px;
}

.frame-wrap {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

#module-frame {
  display: block;
  width: 100%;
  height: 680px;
  border: 0;
  background: white;
}

.frame-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 34px;
  text-align: center;
  background: white;
}

.frame-empty.hidden {
  display: none;
}

.frame-empty h2 {
  margin: 0;
  color: var(--teal);
  font-size: 30px;
}

.frame-empty p {
  margin: 0;
  color: var(--muted);
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.planner-card {
  min-height: 130px;
  padding: 18px;
}

.planner-day {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 30px;
  margin-bottom: 12px;
  color: white;
  background: var(--navy);
  font-weight: 900;
}

.planner-card h3 {
  margin: 0;
  font-size: 18px;
}

.planner-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.report-summary-card {
  padding: 16px;
}

.report-summary-value {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.report-summary-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-table {
  display: grid;
  gap: 8px;
}

.report-row {
  display: grid;
  grid-template-columns: 90px 1fr 180px 70px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
}

.report-topic {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mini-meter {
  height: 10px;
  overflow: hidden;
  background: var(--soft-line);
}

.mini-meter span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.report-percent {
  font-weight: 900;
  text-align: right;
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  color: white;
  background: var(--navy);
  font-size: 20px;
  text-align: center;
  z-index: 100;
}

@media (max-width: 760px) {
  .platform-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "tabs"
      "actions";
    align-items: start;
  }

  .brand,
  .header-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  .top-tabs {
    justify-content: flex-start;
    padding: 0 20px;
    overflow-x: auto;
  }

  .week-progress-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .rail-item {
    grid-template-columns: 30px 1fr;
    min-height: auto;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
  }

  .rail-item::before {
    display: none;
  }
}

@media (max-width: 760px) {
  .platform-header,
  .platform-body {
    width: calc(100vw - 16px);
  }

  .hero-band,
  .lesson-toolbar,
  .section-heading {
    grid-template-columns: 1fr;
    align-items: flex-start;
    flex-direction: column;
  }

  .module-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .module-meta {
    justify-items: start;
  }

  .planner-grid,
  .report-summary,
  .week-progress-rail {
    grid-template-columns: 1fr;
  }

  .platform-body {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    position: static;
    min-height: auto;
  }

  .report-row {
    grid-template-columns: 1fr;
  }

  .report-percent {
    text-align: left;
  }
}
