.page.dashboard-page {
  width: 100%;
  max-width: none;
}

.dashboard-page .dashboard-active-course {
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-active-course .lesson-copy {
  justify-content: center;
}

.dashboard-active-course .lesson-copy h2 {
  max-width: none;
}

.dashboard-active-course .lesson-copy .overview-course-description {
  max-width: 68ch;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.course-description-editor {
  display: grid;
  gap: 12px;
  margin-block: 24px;
  min-width: 0;
}

.course-description-editor label {
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 2.4vw, 30px);
}

.course-description-editor textarea {
  width: 100%;
  min-width: 0;
  min-height: 12lh;
  resize: vertical;
  field-sizing: content;
  padding: 16px;
  font: inherit;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

#course-short-description {
  min-height: 5lh;
  margin-bottom: 12px;
}

.course-description-editor textarea:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .dashboard-page .dashboard-active-course {
    grid-template-columns: clamp(156px, 32%, 360px) minmax(0, 1fr);
  }

  .dashboard-page .dashboard-active-course:has(.overview-cover-panel[data-portrait="true"]) {
    grid-template-columns: clamp(140px, 24%, 244px) minmax(0, 1fr);
  }

  .dashboard-active-course .lesson-copy {
    min-width: 0;
    padding: clamp(22px, 3vw, 42px);
  }
}

@media (max-width: 767px) {
  .overview-cover-panel[data-portrait="true"] .dashboard-course-cover {
    max-width: 232px;
    justify-self: center;
  }
}

.overview-cover-panel {
  position: relative;
  min-width: 0;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #16382a;
}

.overview-cover-backdrop {
  position: absolute;
  inset: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  object-fit: cover;
  filter: blur(14px) brightness(.75);
}

.dashboard-course-cover {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: var(--overview-ratio, 16 / 9);
  align-self: center;
  background: #16382a;
}

.dashboard-course-cover img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--overview-position, 50% 50%);
}

.overview-cover-editor {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 20px;
  border: 1px solid #16382a24;
  border-radius: 16px;
}

.overview-cover-editor > p,
.overview-cover-editor > h2 {
  margin: 0;
}

.overview-cover-preview {
  max-width: 360px;
  border-radius: 12px;
}

.course-block video,
.welcome-editor-preview video,
.welcome-media.welcome-video,
.welcome-media.welcome-video > video,
video:fullscreen {
  background: #000;
}

.course-block video {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.welcome-page .welcome-media.welcome-video > video {
  opacity: 1;
  mix-blend-mode: normal;
}

.welcome-page .welcome-media.welcome-photo > img {
  object-fit: contain;
  opacity: 1;
  mix-blend-mode: normal;
}

.welcome-photo .welcome-media-overlay {
  background: linear-gradient(#16382a80, transparent 28%);
  pointer-events: none;
}

.guided-recipe-page {
  width: min(100%, 960px);
}

.guided-recipe-chat {
  display: grid;
  gap: 16px;
  margin-block-start: 24px;
  overflow-anchor: none;
  min-block-size: calc(100svh - 120px);
  align-content: start;
}

.guided-recipe-history {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  block-size: 112px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  align-content: start;
}

.guided-recipe-history:empty {
  display: none;
}

.guided-recipe-history li {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.guided-recipe-history li > span {
  padding: 8px 12px;
  color: #16382a;
}

.guided-recipe-answer {
  justify-self: end;
  max-width: 85%;
  padding: 8px 14px;
  min-height: 44px;
  text-align: left;
  color: #16382a;
  background: #d9f2c4;
  border: 1px solid #16382a24;
  border-radius: 16px 16px 4px 16px;
}

.guided-recipe-question,
.guided-recipe-outcome {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: clamp(16px, 3vw, 28px);
  background: #fffcf5;
  border: 1px solid #16382a24;
  border-radius: 18px;
  box-shadow: 0 8px 22px #16382a0a;
}

.guided-recipe-question :is(h2, p),
.guided-recipe-outcome :is(h2, p) {
  margin: 0;
}

.guided-recipe-options,
.guided-recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guided-recipe-actions {
  margin-top: 4px;
}

.guided-recipe-option {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #16382a44;
  background: #fff;
  color: #16382a;
}

.guided-recipe-option[aria-pressed="true"] {
  background: #d9f2c4;
  border-color: #1f7a4d;
  font-weight: 700;
}

.guided-recipe-option[aria-pressed="true"]::before {
  content: "✓ ";
}

.guided-recipe-option:focus-visible,
.guided-recipe-answer:focus-visible {
  outline: 2px solid #1f7a4d;
  outline-offset: 2px;
}

.guided-recipe-result {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: clamp(14px, 3vw, 24px);
  border: 1px solid #1f7a4d55;
  border-radius: 14px;
  background: #edf6e5;
  color: #16382a;
}

.guided-recipe-outcome button {
  justify-self: start;
}

.guided-recipe-result .recipe-result-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .guided-recipe-result .recipe-result-details {
    grid-template-columns: minmax(0, 1fr);
  }
}

.course-details-page .market-course-cover {
  aspect-ratio: auto;
  container-type: inline-size;
}
.course-details-page .market-course-cover .overview-cover-panel {
  justify-items: center;
  border-radius: inherit;
}
.course-details-page .market-course-cover .dashboard-course-cover {
  width: 100%;
  max-width: min(100%, 510px);
}
.course-details-page .market-course-cover [data-portrait="true"] .dashboard-course-cover {
  max-width: min(100%, 290px);
}
.course-details-page .market-course-copy,
.course-details-page .course-description,
.page.checkout-page,
.page.checkout-page > * {
  min-width: 0;
  overflow-wrap: anywhere;
}
.course-details-page .course-description {
  white-space: pre-line;
  max-width: 68ch;
}
.page.checkout-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 768px;
  min-height: 0;
  justify-items: stretch;
  align-content: start;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.page.checkout-page > .card { padding: clamp(16px, 4vw, 28px); }
.page.checkout-page > button { justify-self: start; }
.checkout-page .offer-consent { max-width: 100%; }
.checkout-page .offer-consent input { flex-shrink: 0; }

.recipe-result-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 6px;
  margin-top: 16px;
}
.recipe-result-navigation button { min-width: 0; padding-inline: clamp(6px, 2vw, 16px); }

.overview-interests {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
  padding: clamp(16px, 3vw, 30px);
}
.overview-interests h2 { margin: 0 0 6px; font-size: clamp(20px, 2.5vw, 26px); }
.overview-interests p { margin: 0; }
.profile-card { align-items: start; }
.profile-card > div:nth-child(2) {
  flex: 1 1 220px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.profile-card .profile-interest-heading h3 {
  margin: 0;
  font: inherit;
  font-weight: 700;
  scroll-margin-top: 72px;
}
.profile-interest-editor {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.profile-interest-editor input { width: 100%; min-width: 0; box-sizing: border-box; }
.profile-card .profile-interest-editor .secondary-button { margin: 0; justify-self: start; width: auto; }
.profile-interest-options {
  display: grid;
  gap: 6px;
  max-width: 420px;
}
.interest-option {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 9px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.interest-option::before {
  content: "";
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid currentColor;
  flex: none;
}
.interest-option[aria-pressed="true"] { border-color: var(--olive); background: #d9f2c4; }
.interest-option[aria-pressed="true"]::before { content: "✓"; color: #fff; background: #1f7a4d; border-color: #1f7a4d; }
.profile-privacy { font-size: 13px; }
.profile-privacy summary { cursor: pointer; padding: 8px 0; color: var(--muted); }
.profile-privacy > div { display: grid; justify-items: start; gap: 4px; }
.profile-actions .profile-privacy button { min-height: 36px; text-decoration: none; }
.profile-actions .profile-privacy button:hover { text-decoration: underline; }

.lesson-editor-navigation, .lesson-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.lesson-editor-navigation { margin: 0 0 6px; font-weight: 600; font-size: 13px; }
.lesson-editor-navigation button, .lesson-list-actions .lesson-order-button {
  min-height: 32px;
  min-width: 34px;
  padding: 3px 8px;
}
.lesson-editor-head .editor-head-actions { flex-wrap: wrap; }
.lesson-editor-head .compact-lesson-delete { color: #862f2a; min-width: 35px; padding-inline: 8px; }
.lesson-editor-shell { grid-template-columns: minmax(130px, 190px) minmax(0, 1fr); }
.lesson-editor-shell.inspector-visible { grid-template-columns: minmax(130px, 190px) minmax(0, 1fr) minmax(210px, 258px); }
.lesson-editor-shell .lesson-inspector {
  grid-column: auto;
  max-height: none;
  min-width: 0;
  overflow: visible;
  position: static;
  padding: 14px;
}
.compact-inspector {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 12px 0 0;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 9px;
}
.compact-inspector .inspector-field { min-width: 0; gap: 4px; }
.compact-inspector :is(input, select, button) { min-width: 0; max-width: 100%; }
.compact-inspector .color-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.compact-inspector .color-row input { width: 100%; }
.inspector-background { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inspector-background-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  min-height: 36px;
  box-sizing: border-box;
}
.inspector-background-button:focus-within { outline: 2px solid var(--olive); outline-offset: 2px; }
.inspector-background-button input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.compact-inspector button.wide { width: 100%; white-space: normal; text-align: center; }
.lesson-editor-shell .stage-canvas { min-width: 0; }
.lesson-editor-shell .lesson-stage-upload { padding: 8px 12px; }
.lesson-stage-upload button { max-width: 100%; white-space: normal; }
@media (max-width: 1119px) {
  .lesson-editor-shell.inspector-visible { grid-template-columns: minmax(130px, 190px) minmax(0,1fr); }
  .lesson-editor-shell .lesson-inspector { grid-column: 2; grid-row: 1; }
  .lesson-editor-shell.inspector-visible .lesson-stage { grid-column: 2; }
  .lesson-editor-shell .lesson-outline { grid-row: 1 / span 2; }
}
@media (max-width: 767px) {
  .lesson-editor-shell, .lesson-editor-shell.inspector-visible { display: flex; }
  .lesson-editor-shell .lesson-outline { order: 0; }
  .lesson-editor-shell .lesson-inspector { order: 1; }
  .lesson-editor-shell .lesson-stage { order: 2; }
  .lesson-editor-shell > * { width: 100%; box-sizing: border-box; }
  .lesson-editor-head .editor-head-actions { justify-content: flex-start; }
  .profile-privacy summary, .profile-actions .profile-privacy button { min-height: 44px; }
}

.course-lesson-program {
  width: 100%;
  min-width: 0;
}
.course-lesson-program > h2 { margin: 0 0 12px; }
.lesson-program-card { overflow-wrap: anywhere; }
.lesson-program-card > img { display: block; width: 100%; max-height: 148px; aspect-ratio: 16 / 9; object-fit: cover; }
.lesson-program-card h3 { margin: 0 0 10px; }
.lesson-access-note {
  display: inline-block;
  border-radius: 8px;
  background: #eef2e7;
  color: #16382a;
  padding: 6px 9px;
  font-size: 13px;
}

.lesson-file-picker {
  display: inline-grid;
  place-items: center;
  align-self: flex-start;
  justify-self: start;
  position: relative;
  box-sizing: border-box;
  min-height: 44px;
  max-width: 100%;
  text-align: center;
  margin: 0;
  padding: 7px 14px;
}
.lesson-file-picker:focus-within { outline: 2px solid var(--olive); outline-offset: 2px; }
.lesson-file-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.lesson-file-picker[data-disabled="true"] { opacity: .62; }
.lesson-stage > .lesson-file-picker { margin: 7px 0 10px; }
.lesson-file-control { display: grid; justify-items: start; gap: 4px; min-width: 0; }
.lesson-stage > .lesson-file-control { margin: 7px 0 10px; }
.lesson-file-error { color: #862f2a; overflow-wrap: anywhere; }
