:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #5d6878;
  --line: #d8dee8;
  --paper: #fbfcff;
  --surface: #ffffff;
  --accent: #137a63;
  --accent-2: #d85f38;
  --blue: #2f68b1;
  --shadow: 0 18px 40px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(19, 122, 99, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(216, 95, 56, 0.08), transparent 30%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

.status-pill {
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 16px;
  text-align: center;
  font-weight: 800;
  white-space: nowrap;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  padding: 30px 0 24px;
}

.hero-copy {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy h2 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.flow-panel {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 26px;
}

.flow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  font-weight: 850;
  background: #f6f8fb;
}

.flow-step.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.flow-line {
  width: 3px;
  height: 20px;
  margin-left: 24px;
  background: var(--line);
}

.dashboard {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.sidebar,
.lesson-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(24, 33, 47, 0.08);
}

.sidebar {
  position: sticky;
  top: 18px;
  padding: 22px;
}

.sidebar h2 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.sidebar p,
.lesson-card p {
  color: var(--muted);
  line-height: 1.65;
}

.meter {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf2;
  margin: 20px 0;
}

.meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transition: width 180ms ease;
}

dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

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

dd {
  margin: 0;
  font-weight: 800;
}

.lesson-list {
  display: grid;
  gap: 14px;
}

.lesson-card {
  padding: 20px;
}

.lesson-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.lesson-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f7f9fc;
  color: #39475a;
  font-size: 0.85rem;
  font-weight: 700;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.checkpoint {
  border-left: 4px solid var(--accent-2);
  background: #fff8f5;
  padding: 14px 16px;
  margin: 16px 0;
  color: #533629;
  line-height: 1.55;
}

textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  background: white;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

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

button.done {
  background: var(--accent);
}

.saved {
  min-height: 22px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 750;
}

footer {
  border-top: 1px solid var(--line);
  padding: 22px 24px 28px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 820px) {
  .topbar,
  .lesson-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero-copy {
    min-height: auto;
  }

  .flow-panel {
    min-height: auto;
  }

  .sidebar {
    position: static;
  }
}
