/* MyOCD lessons shared styles */
:root {
  --brand-purple: #5b6cae;
  --accent-purple: #9187d3;
  --soft-purple: #d4ccff;
  --pale-purple: #e3deff;
  --green: #55ccaa;
  --soft-green: #e3f9f3;
  --red: #fb7179;
  --soft-red: #ffe3e4;
  --soft-yellow: #fff4e3;
  --cream: #fffbf3;
  --lavender: #bbc2dd;
  --ink: #1f1f2c;
  --muted: #5c5c6e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--brand-purple); }
a.noStyle { color: inherit; text-decoration: none; }

/* --- top bar --- */
.lessonNav {
  background: var(--cream);
  border-bottom: 1px solid #ebe6d8;
  padding: 16px 24px;
}
.lessonNav .inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lessonNav .brand {
  color: var(--brand-purple);
  font-weight: 700;
  font-size: 1.4rem;
  text-decoration: none;
}
.lessonNav .navLinks a {
  color: var(--brand-purple);
  text-decoration: none;
  font-weight: 600;
  margin-left: 24px;
}
.lessonNav .navLinks a:hover { text-decoration: underline; }

/* --- page layout --- */
.lessonPage {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.lessonTitle {
  color: var(--brand-purple);
  font-size: 2.4rem;
  margin: 12px 0 8px;
  line-height: 1.15;
}

.lessonSubtitle {
  color: var(--muted);
  margin-top: 0;
  font-size: 1.05rem;
}

.lessonPage hr {
  border: 0;
  height: 1px;
  background: #ebe6d8;
  margin: 24px 0;
}

.lessonPage h2 {
  color: var(--brand-purple);
  font-size: 1.5rem;
  margin-top: 36px;
}

.lessonPage h3 {
  font-size: 1.15rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.lessonPage p, .lessonPage li {
  font-size: 1.02rem;
}

.chapterTrack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
  font-size: 0.85rem;
  color: var(--muted);
}
.chapterTrack span {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1ecdf;
}
.chapterTrack span.current {
  background: var(--pale-purple);
  color: var(--brand-purple);
  font-weight: 600;
}

/* page breaks become section dividers */
.pageBreak {
  margin: 48px 0;
  border-top: 1px dashed #d8d2c2;
}

/* --- emphasized callouts --- */
.emphasizedText {
  border-radius: 16px;
  background: white;
  padding: 16px 20px;
  margin: 12px 0;
}
.emphasizedText.purple { background: var(--soft-purple); }
.emphasizedText.green  { background: var(--soft-green); }
.emphasizedText.red    { background: var(--soft-red); }
.emphasizedText.yellow { background: var(--soft-yellow); }

.largeNumber {
  font-size: 1.6rem;
  font-weight: 700;
  margin-right: 8px;
  color: var(--accent-purple);
}
.largeNumber.red   { color: var(--red); }
.largeNumber.green { color: var(--green); }

.pillText {
  border-radius: 8px;
  padding: 2px 6px;
  font-weight: 600;
  white-space: nowrap;
}
.pillText.red    { background: var(--soft-red); }
.pillText.green  { background: var(--soft-green); }
.pillText.purple { background: var(--pale-purple); }
.pillText.yellow { background: var(--soft-yellow); }
.pillText.darkRed    { background: #d16163; color: white; }
.pillText.darkGreen  { background: #26ab5c; color: white; }
.pillText.darkYellow { background: #ffbb7e; }
.pillText.darkPurple { background: #8a78b6; color: white; }

/* --- tip list (20 tips lesson) --- */
.tipList {
  list-style: none;
  counter-reset: tip;
  padding-left: 0;
}
.tipList li {
  counter-increment: tip;
  background: white;
  border-radius: 16px;
  padding: 18px 20px 18px 64px;
  margin-bottom: 14px;
  position: relative;
}
.tipList li::before {
  content: counter(tip);
  position: absolute;
  left: 18px;
  top: 16px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-purple);
}
.tipTitle { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.tipContent { font-size: 0.98rem; color: var(--muted); }

/* --- chart container --- */
.chartContainer {
  background: white;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  text-align: center;
}
.chartContainer canvas {
  max-width: 100%;
  height: 280px !important;
}

.standardButton {
  background: var(--accent-purple);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 10px 24px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.standardButton:hover { background: var(--brand-purple); }
.redButton {
  background: var(--red);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 10px 24px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.redButton:hover { filter: brightness(0.95); }

/* --- collapsible "see more" --- */
.seeMore {
  background: var(--soft-purple);
  border-radius: 16px;
  padding: 8px 16px;
  margin: 12px 0;
}
.seeMore summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-purple);
  padding: 8px 0;
  list-style: none;
}
.seeMore summary::-webkit-details-marker { display: none; }
.seeMore summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s;
}
.seeMore[open] summary::before { transform: rotate(90deg); }
.seeMore .inner { padding: 4px 0 12px; }

/* --- list of options shown statically --- */
.optionList {
  list-style: none;
  padding-left: 0;
}
.optionList li {
  background: white;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border: 1px solid #ebe6d8;
}

/* --- centered image --- */
.lessonImg {
  display: block;
  margin: 24px auto;
  max-width: 100%;
  border-radius: 12px;
}

/* --- index page card grid --- */
.lessonGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.lessonCard {
  display: block;
  background: white;
  border-radius: 16px;
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid #ebe6d8;
  transition: transform 0.15s, box-shadow 0.15s;
}
.lessonCard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 108, 174, 0.1);
}
.lessonCard h3 {
  color: var(--brand-purple);
  margin: 0 0 8px;
  font-size: 1.15rem;
}
.lessonCard p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- responsive --- */
@media (max-width: 600px) {
  .lessonTitle { font-size: 1.8rem; }
  .lessonPage { padding: 24px 16px 64px; }
  .lessonNav .navLinks a { margin-left: 12px; }
}
