/* Course detail v27. Shared palette, fonts and header come from styles.css. */
.course-detail-page { --cd-border: #d9dfd8; --cd-muted: #5b6b63; }
.course-detail-page .site-header { background: var(--page); }
.course-detail-page .desktop-nav a,
.course-detail-page .account-link { font-size: .875rem; }
.course-detail-page .desktop-nav .is-active { color: var(--green-dark); }
.course-detail-page .brand-copy small { font-size: .75rem; }
.course-detail-page .mobile-menu { z-index: 20; }
.course-detail-page .mobile-menu a { font-size: .875rem; }
.cd-skip {
  position: fixed; top: 10px; left: 16px; z-index: 100;
  padding: 12px 18px; border-radius: 10px; background: var(--green-dark);
  color: white; transform: translateY(-160%);
}
.cd-skip:focus { transform: translateY(0); }
.cd-main { padding-top: 28px; padding-bottom: 76px; }
.cd-main :where(h1,h2,h3,p,dl,dd) { margin: 0; }
.cd-main :where(h1,h2,h3,dt,dd,p) { overflow-wrap: anywhere; }
.cd-hero {
  overflow: hidden; background: var(--surface); border: 1px solid var(--cd-border);
  border-radius: 30px; box-shadow: 0 10px 30px rgb(23 34 30 / 3%);
}
.cd-hero__top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.cd-hero__copy { padding: 40px 34px 36px 42px; align-self: center; }
.cd-eyebrow {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  color: var(--green-dark); font-size: .875rem; font-weight: 700;
}
.cd-tag { padding: 5px 11px; border-radius: 7px; background: #e6ede5; }
.cd-eyebrow__meta { color: var(--cd-muted); font-size: .8125rem; font-weight: 500; }
.cd-hero h1 {
  margin-top: 20px; color: var(--green-dark); font-size: clamp(2.375rem, 4.5vw, 3.75rem);
  font-weight: 600; line-height: 1.07; letter-spacing: -.045em;
}
.cd-hero__lead {
  max-width: 475px; margin-top: 19px !important; color: var(--cd-muted);
  font-size: 1rem; line-height: 1.7;
}
.cd-hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 27px; }
.cd-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 20px;
  min-height: 50px; padding: 13px 22px; border: 1px solid transparent; border-radius: 11px;
  background: var(--green-dark); color: #fff; font: 700 .875rem/1.5 var(--body);
  text-decoration: none; cursor: pointer; transition: background .18s, box-shadow .18s;
}
.cd-button:hover { background: #163a32; box-shadow: 0 4px 12px rgb(33 74 65 / 12%); }
.cd-button svg { width: 18px; height: 18px; flex-shrink: 0; }
.cd-text-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  gap: 10px; color: var(--green-dark); font-size: .875rem; font-weight: 700;
  text-decoration: underline; text-decoration-color: #b9c8bb; text-underline-offset: 5px;
}
.cd-text-link:hover { text-decoration-color: var(--green-dark); }
.cd-hero__art { min-width: 0; margin: 14px 14px 14px 0; border-radius: 21px; overflow: hidden; background: #efece2; }
.cd-hero__art img { display: block; width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.cd-facts {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  padding: 23px 22px; border-top: 1px solid var(--cd-border); background: #f5f6ef;
}
.cd-facts > div { padding: 0 20px; border-left: 1px solid #d6ddd3; }
.cd-facts > div:first-child { border-left: 0; }
.cd-facts dt { margin-bottom: 5px; color: var(--cd-muted); font-size: .8125rem; }
.cd-facts dd { color: var(--green-dark); font-family: var(--display); font-size: 1.125rem; font-weight: 600; }
.cd-section { margin-top: 72px; scroll-margin-top: 28px; }
.cd-section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 17px !important; color: var(--cd-muted); font-size: .8125rem; }
.cd-section-number { color: var(--green-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-section-label::after { content: ''; width: 44px; height: 1px; background: #becac0; }
.cd-section h2 { color: var(--green-dark); font-size: clamp(1.875rem, 3vw, 2.5rem); font-weight: 600; line-height: 1.12; letter-spacing: -.035em; }
.cd-program { display: grid; grid-template-columns: minmax(0,.72fr) minmax(0,1.8fr); gap: 62px; align-items: start; }
.cd-section-description { margin-top: 18px !important; max-width: 300px; color: var(--cd-muted); font-size: 1rem; line-height: 1.7; }
.cd-program__meta { display: inline-flex; gap: 10px; align-items: center; margin-top: 23px !important; color: var(--green-dark); font-size: .875rem; font-weight: 600; }
.cd-program__meta svg { width: 18px; height: 18px; }
.cd-modules { overflow: hidden; border: 1px solid var(--cd-border); border-radius: 22px; background: var(--surface); }
.cd-module + .cd-module { border-top: 1px solid var(--cd-border); }
.cd-module summary {
  display: grid; grid-template-columns: 30px minmax(0,1fr) auto 34px; align-items: center;
  gap: 16px; padding: 22px 25px; cursor: pointer; list-style: none;
  transition: background .18s;
}
.cd-module summary::-webkit-details-marker { display: none; }
.cd-module--no-count summary { grid-template-columns: 30px minmax(0,1fr) 34px; }
.cd-module summary:hover { background: #f1f4eb; }
.cd-module summary:focus-visible { outline-offset: -5px; border-radius: 10px; }
.cd-module__number { color: var(--cd-muted); font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-module h3 { color: var(--ink); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; letter-spacing: -.015em; }
.cd-module__count { color: var(--cd-muted); font-size: .8125rem; white-space: nowrap; }
.cd-module__toggle {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid #d4ded3; border-radius: 50%; color: var(--green-dark);
}
.cd-module__toggle svg { width: 16px; height: 16px; }
.cd-module[open] { background: #f3f6ed; }
.cd-module[open] .cd-module__number { color: var(--green-dark); }
.cd-module[open] .cd-module__toggle { background: var(--green-dark); color: #fff; border-color: var(--green-dark); }
.cd-module[open] .cd-module__vertical { display: none; }
.cd-module__body { padding: 0 76px 25px 71px; }
.cd-module__body p { color: var(--cd-muted); font-size: 1rem; line-height: 1.7; }
.cd-module__topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.cd-module__topics li { padding: 5px 10px; border: 1px solid #dce3d5; border-radius: 6px; color: #4c6253; font-size: .8125rem; line-height: 1.5; }
.cd-groups__heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 25px; }
.cd-groups__count { color: var(--cd-muted); font-size: .875rem; padding-bottom: 3px; }
.cd-group-list { display: grid; gap: 18px; }
.cd-group {
  --cd-muted: #53635d;
  display: grid; grid-template-columns: minmax(0,1fr) 295px; overflow: hidden;
  border: 1px solid rgba(33,74,65,.13); border-radius: 28px; background: rgba(251,250,246,.98);
  box-shadow: 0 12px 32px rgba(23,34,30,.045); font-family: var(--body);
}
.cd-group__main { min-width: 0; padding: 29px 34px 27px; }
.cd-group__top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.cd-group h3 { color: var(--ink); font-family: var(--display); font-size: 1.75rem; font-weight: 620; line-height: 1.08; letter-spacing: -.05em; }
.cd-seat { margin-left: auto; padding: 6px 11px; border-radius: 7px; color: var(--green-dark); background: var(--mint-soft); font-size: .8125rem; font-weight: 700; }
.cd-teacher { display: flex; align-items: center; gap: 11px; margin-top: 20px; }
.cd-teacher img { display: block; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: center 25%; }
.cd-teacher__copy { display: grid; gap: 2px; }
.cd-teacher__copy span { color: var(--cd-muted); font-size: .75rem; }
.cd-teacher__copy strong { font-size: .875rem; font-weight: 800; }
.cd-teacher button {
  display: grid; place-items: center; margin-left: 2px; width: 44px; height: 44px; padding: 0;
  color: var(--green-dark); border: 1px solid var(--cd-border); border-radius: 50%; background: transparent; cursor: pointer;
}
.cd-teacher button:hover { background: #e6ede4; }
.cd-teacher button svg { width: 17px; height: 17px; }
.cd-schedule { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 25px !important; }
.cd-schedule > div { min-width: 0; display: block; padding: 0 20px; border: 0; border-right: 1px solid rgba(33,74,65,.13); border-radius: 0; }
.cd-schedule > div:first-child { padding-left: 0; }
.cd-schedule > div:last-child { padding-right: 0; border-right: 0; }
.cd-schedule dt { margin-bottom: 4px; color: var(--cd-muted); font-size: .8125rem; font-weight: 700; }
.cd-schedule dd { color: var(--ink); font-family: var(--body); font-size: 1.125rem; font-weight: 800; line-height: 1.25; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.cd-group__dates { margin-top: 18px !important; display: flex; align-items: start; gap: 9px; color: var(--cd-muted); font-size: .875rem; }
.cd-group__dates svg { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.cd-group__note { margin-top: 20px !important; padding-top: 18px; border-top: 1px solid #e1e4db; color: var(--cd-muted); font-size: .8125rem; line-height: 1.65; }
.cd-group__aside { display: flex; flex-direction: column; padding: 34px 30px 26px; border-left: 1px solid rgba(33,74,65,.13); background: transparent; }
.cd-group__price-label { display: none; }
.cd-price { margin-top: 0 !important; color: var(--green-dark); font-family: var(--display); font-size: 2.25rem; line-height: .98; font-weight: 650; letter-spacing: -.04em; }
.cd-price-caption { margin: 5px 0 0 10px !important; color: #56665f; font-family: var(--body); font-size: .875rem; font-weight: 650; line-height: 1.2; }
.cd-package { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin-top: 21px !important; padding-top: 18px; border-top: 1px solid rgba(33,74,65,.14); color: #56665f; font-size: .875rem; font-weight: 650; }
.cd-package strong { color: var(--green-dark); font-family: var(--display); font-size: 1rem; font-weight: 650; white-space: nowrap; }
.cd-group__aside .cd-button { width: 100%; min-height: 48px; margin-top: 25px; padding: 0 16px; border-color: var(--green-dark); font-family: var(--body); font-size: .8125rem; font-weight: 800; text-align: center; transition: transform .18s ease, background .18s ease, color .18s ease; }
.cd-group__aside .cd-button:hover { background: #183d35; box-shadow: none; transform: translateY(-1px); }
.cd-group__aside .cd-button svg { display: none; }
.cd-group__next { margin-top: 11px !important; color: #56665f; font-size: .75rem; line-height: 1.6; text-align: center; }
.cd-empty { display: flex; align-items: center; gap: 24px; padding: 34px; border: 1px solid var(--cd-border); border-radius: 24px; background: var(--surface); }
.cd-empty__icon { width: 64px; height: 64px; flex-shrink: 0; display: grid; place-items: center; border-radius: 18px; background: #e8eedf; color: var(--green-dark); }
.cd-empty__icon svg { width: 27px; height: 27px; }
.cd-empty h3 { color: var(--green-dark); font-size: 1.375rem; font-weight: 600; line-height: 1.4; }
.cd-empty p { margin-top: 8px; color: var(--cd-muted); font-size: 1rem; line-height: 1.65; }
.cd-empty[hidden], .cd-group[hidden] { display: none; }
.course-detail-page .site-footer-expanded {
  width: var(--shell); margin: 0 auto; padding: 35px 0 18px; display: grid;
  grid-template-columns: 1.1fr 1.15fr 1fr .9fr; gap: 25px 40px;
  border-top: 1px solid var(--line); font-size: .8125rem; color: var(--cd-muted);
}
.course-detail-page .site-footer-expanded > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.course-detail-page .site-footer-expanded strong { color: var(--ink); font-size: .875rem; }
.course-detail-page .site-footer-expanded small { font-size: .75rem; line-height: 1.6; }
.course-detail-page .site-footer-expanded a { text-decoration: none; overflow-wrap: anywhere; }
.course-detail-page .site-footer-expanded a:hover { color: var(--green-dark); text-decoration: underline; text-underline-offset: 4px; }
.course-detail-page .footer-label { margin-bottom: 4px; color: var(--cd-muted); font-size: .75rem; }
.course-detail-page .footer-legal-links { display: grid; gap: 11px; align-content: start; }
.course-detail-page .footer-copyright { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; font-size: .75rem; }
.course-detail-page dialog {
  width: min(500px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
  padding: 32px; border: 1px solid var(--cd-border); border-radius: 24px;
  background: var(--surface); color: var(--ink); box-shadow: 0 25px 90px rgb(23 34 30 / 20%);
}
.course-detail-page dialog::backdrop { background: rgb(20 40 31 / 40%); backdrop-filter: blur(4px); }
.course-detail-page dialog h2 { margin: 14px 0; padding-right: 15px; color: var(--green-dark); font-size: 1.875rem; font-weight: 600; line-height: 1.2; letter-spacing: -.03em; }
.course-detail-page dialog p { color: var(--cd-muted); font-size: 1rem; line-height: 1.7; }
.course-detail-page dialog .eyebrow { margin-top: 14px; font-size: .8125rem; }
.course-detail-page .auth-gate-close,
.course-detail-page .cd-dialog-close {
  display: grid; place-items: center; position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--green-dark); font-size: 1.75rem; cursor: pointer;
}
.course-detail-page :where(.auth-gate-close,.cd-dialog-close):hover { background: #e6ede4; }
.course-detail-page .auth-gate-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.course-detail-page .auth-gate-actions .button { font-size: .875rem; }
.course-detail-page .auth-gate-actions .button-primary { background: var(--green-dark); color: #fff; }
.course-detail-page .auth-gate-actions .button-secondary { background: transparent; border: 1px solid #b9c8b8; }
.cd-dialog-photo { width: 76px; height: 76px; object-fit: cover; object-position: center 25%; border-radius: 50%; }
.course-detail-page.teacher-dialog-open { overflow: hidden; }
@media (max-width: 1100px) {
  .cd-price { font-size: 2.125rem; }
  .cd-group__aside { padding: 30px 24px 24px; }
}
@media (max-width: 1050px) {
  .cd-hero__copy { padding: 32px 28px; }
  .cd-hero__top { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
  .cd-program { gap: 35px; grid-template-columns: minmax(0,.8fr) minmax(0,1.6fr); }
  .cd-module summary { gap: 10px; padding: 19px; grid-template-columns: 24px minmax(0,1fr) auto 30px; }
  .cd-module--no-count summary { grid-template-columns: 24px minmax(0,1fr) 30px; }
  .cd-module__toggle { width: 30px; height: 30px; }
  .cd-module__body { padding: 0 30px 24px 53px; }
  .cd-group { grid-template-columns: minmax(0,1fr) 265px; }
  .cd-group__main { padding: 26px; }
  .course-detail-page .site-footer-expanded { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .cd-main { padding-top: 18px; padding-bottom: 50px; }
  .cd-hero { border-radius: 24px; }
  .cd-hero__top { grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); }
  .cd-hero__copy { padding: 28px 24px; }
  .cd-hero h1 { font-size: 2.5rem; }
  .cd-hero__art { margin: 12px 12px 12px 0; border-radius: 16px; }
  .cd-hero__art img { object-position: 43% center; }
  .cd-facts { padding-inline: 10px; }
  .cd-facts > div { padding-inline: 14px; }
  .cd-facts dd { font-size: 1rem; }
  .cd-program { grid-template-columns: 1fr; gap: 23px; }
  .cd-section { margin-top: 48px; }
  .cd-section-description { max-width: 550px; margin-top: 12px !important; }
  .cd-program__meta { margin-top: 14px !important; }
  .cd-section-label { margin-bottom: 12px !important; }
  .cd-group { grid-template-columns: minmax(0,1fr) 235px; }
  .cd-group__main { padding: 24px; }
  .cd-schedule > div { padding-inline: 16px; }
  .cd-schedule dt { width: 100%; }
  .cd-group__top { align-items: start; }
  .cd-seat { margin-left: 0; }
}
@media (max-width: 680px) {
  .cd-price { font-size: 2.0625rem; }
  .cd-price-caption { margin-left: 8px !important; }
}
@media (max-width: 600px) {
  .cd-hero__top { grid-template-columns: 1fr; }
  .cd-hero__copy { padding: 26px 24px 24px; }
  .cd-eyebrow { gap: 8px; }
  .cd-hero h1 { margin-top: 17px; font-size: clamp(2.1rem,9vw,2.875rem); }
  .cd-hero__lead { margin-top: 15px !important; line-height: 1.65; }
  .cd-hero__actions { gap: 12px; margin-top: 22px; }
  .cd-hero__actions .cd-button { flex: 1 0 auto; }
  .cd-hero__actions .cd-text-link { flex: 1 0 auto; }
  .cd-hero__art { margin: 0 12px 12px; height: 164px; }
  .cd-hero__art img { min-height: 0; height: 100%; object-position: center 48%; }
  .cd-facts { grid-template-columns: 1fr 1fr; padding: 19px 10px; row-gap: 21px; }
  .cd-facts > div:nth-child(3) { border-left: 0; }
  .cd-facts dt { font-size: .75rem; }
  .cd-facts dd { font-size: 1rem; }
  .cd-section h2 { font-size: 2rem; }
  .cd-module summary { grid-template-columns: 21px minmax(0,1fr) 30px; gap: 10px; padding: 18px 16px; }
  .cd-module--no-count summary { grid-template-columns: 21px minmax(0,1fr) 30px; }
  .cd-module h3 { font-size: 1rem; }
  .cd-module__count { grid-column: 2; grid-row: 2; margin-top: -5px; }
  .cd-module__toggle { grid-column: 3; grid-row: 1 / span 2; }
  .cd-module--no-count .cd-module__toggle { grid-row: 1; }
  .cd-module__body { padding: 0 20px 22px 47px; }
  .cd-module__topics { gap: 6px; }
  .cd-module__topics li { padding: 4px 8px; }
  .cd-groups__heading { gap: 12px; margin-bottom: 20px; }
  .cd-groups__count { width: 100%; }
  .cd-group { grid-template-columns: 1fr; }
  .cd-group__main { padding: 24px 20px 22px; }
  .cd-group h3 { font-size: 1.625rem; }
  .cd-seat { margin-left: auto; font-size: .75rem; }
  .cd-schedule { margin-top: 22px !important; }
  .cd-group__aside { padding: 22px 20px; border-left: 0; border-top: 1px solid rgba(33,74,65,.13); }
  .cd-group__price-label { display: none; }
  .cd-package { margin-top: 18px !important; padding-top: 16px; }
  .cd-group__aside .cd-button { margin-top: 20px; }
  .cd-empty { align-items: start; padding: 24px 20px; gap: 16px; }
  .cd-empty__icon { width: 42px; height: 42px; border-radius: 12px; }
  .cd-empty__icon svg { width: 21px; height: 21px; }
  .cd-empty h3 { font-size: 1.125rem; }
  .course-detail-page .site-footer-expanded { grid-template-columns: 1fr; padding-top: 28px; gap: 25px; }
  .course-detail-page dialog { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .course-detail-page *, .course-detail-page *::before, .course-detail-page *::after {
    transition-duration: .01ms !important; animation-duration: .01ms !important;
  }
}
