:root {
  --aimcf-blue: #4285f4;
  --aimcf-blue-dark: #2563d9;
  --aimcf-blue-soft: #eef4ff;
  --aimcf-ink: #172033;
  --aimcf-muted: #667085;
  --aimcf-line: #e5e9f0;
  --aimcf-warm: #fbfaf9;
  --aimcf-orange: #f9ab00;
  --aimcf-success: #4285f4;
  --aimcf-radius: 20px;
  --aimcf-shadow: 0 16px 40px rgba(31, 55, 90, 0.08);
}

.aimcf-smart-course,
.aimcf-smart-course * {
  box-sizing: border-box;
}

.aimcf-smart-course {
  width: min(1560px, calc(100vw - 32px));
  max-width: none;
  margin: 32px 0 64px 50%;
  transform: translateX(-50%);
  color: var(--aimcf-ink);
  font-family: inherit;
}

.aimcf-smart-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
  padding: 30px 34px;
  border: 1px solid #e1eaff;
  border-radius: 26px;
  background: linear-gradient(135deg, #f4f8ff 0%, #ffffff 58%, #fff9eb 100%);
}

.aimcf-smart-hero h1 {
  margin: 5px 0 8px;
  color: var(--aimcf-ink);
  font-family: inherit;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.aimcf-smart-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--aimcf-muted);
  font-size: 16px;
  line-height: 1.75;
}

.aimcf-kicker,
.aimcf-eyebrow {
  color: var(--aimcf-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aimcf-reset {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #cad7ee;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #38506d;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.aimcf-reset:hover {
  border-color: var(--aimcf-blue);
  background: #fff;
  color: var(--aimcf-blue);
}

.aimcf-smart-layout {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  align-items: start;
  gap: 26px;
}

.aimcf-selector {
  position: sticky;
  top: 24px;
  overflow: hidden;
  border: 1px solid var(--aimcf-line);
  border-radius: var(--aimcf-radius);
  background: #fff;
  box-shadow: var(--aimcf-shadow);
}

.aimcf-selector-head {
  padding: 23px 24px 20px;
  border-bottom: 1px solid var(--aimcf-line);
  background: var(--aimcf-warm);
}

.aimcf-selector-head > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aimcf-selector-head strong {
  font-size: 20px;
}

.aimcf-selector-head span {
  color: var(--aimcf-muted);
  font-size: 12px;
}

.aimcf-selector-head p {
  margin: 8px 0 0;
  color: var(--aimcf-muted);
  font-size: 12px;
}

.aimcf-selector-head p b {
  color: var(--aimcf-blue);
  font-size: 14px;
}

.aimcf-step-progress {
  overflow: hidden;
  height: 5px;
  margin-top: 14px;
  border-radius: 99px;
  background: #e8edf5;
}

.aimcf-step-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--aimcf-blue), #6ea6ff);
  transition: width .28s ease;
}

.aimcf-smart-form {
  margin: 0;
}

.aimcf-accordion-step {
  border-bottom: 1px solid var(--aimcf-line);
  background: #fff;
  transition: opacity .18s ease, background .18s ease;
}

.aimcf-accordion-step:last-child {
  border-bottom: 0;
}

.aimcf-accordion-step.is-locked {
  opacity: .5;
}

.aimcf-step-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 26px;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 17px 20px;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.aimcf-accordion-step.is-locked .aimcf-step-summary {
  cursor: default;
}

.aimcf-accordion-step.is-open {
  background: #fbfdff;
}

.aimcf-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #f1f4f9;
  color: #6f7e92;
  font-size: 12px;
  font-weight: 800;
}

.aimcf-accordion-step.is-open .aimcf-step-number {
  background: var(--aimcf-blue);
  color: #fff;
}

.aimcf-accordion-step.is-complete .aimcf-step-number {
  background: #e9f8f1;
  color: var(--aimcf-success);
}

.aimcf-step-title {
  min-width: 0;
}

.aimcf-step-title strong,
.aimcf-step-title small {
  display: block;
}

.aimcf-step-title strong {
  margin-bottom: 3px;
  color: var(--aimcf-ink);
  font-size: 15px;
  line-height: 1.35;
}

.aimcf-step-title small {
  overflow: hidden;
  color: var(--aimcf-muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aimcf-accordion-step.is-complete .aimcf-step-title small {
  color: var(--aimcf-success);
}

.aimcf-step-status {
  color: #98a2b3;
  font-size: 24px;
  font-weight: 500;
  text-align: center;
  transform: rotate(0deg);
  transition: transform .18s ease, color .18s ease;
}

.aimcf-accordion-step.is-open .aimcf-step-status {
  color: var(--aimcf-blue);
  transform: rotate(90deg);
}

.aimcf-accordion-step.is-complete .aimcf-step-status {
  color: var(--aimcf-success);
  font-size: 16px;
  transform: none;
}

.aimcf-step-panel {
  display: none;
  padding: 0 20px 20px 72px;
}

.aimcf-accordion-step.is-open .aimcf-step-panel {
  display: block;
  animation: aimcfFadeIn .18s ease;
}

@keyframes aimcfFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.aimcf-choice-list {
  display: grid;
  gap: 8px;
}

.aimcf-choice-list.is-two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aimcf-choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 44px;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #dfe5ee;
  border-radius: 12px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.aimcf-choice:hover {
  border-color: #9bbcf6;
  background: #f8fbff;
}

.aimcf-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.aimcf-choice-control {
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #c4ccd8;
  border-radius: 50%;
  color: transparent;
  font-size: 11px;
  font-weight: 800;
}

.aimcf-choice.is-checkbox .aimcf-choice-control {
  border-radius: 5px;
}

.aimcf-choice:has(input:checked) {
  border-color: var(--aimcf-blue);
  background: var(--aimcf-blue-soft);
  box-shadow: 0 0 0 2px rgba(66, 133, 244, .08);
}

.aimcf-choice input:checked + .aimcf-choice-control {
  border-color: var(--aimcf-blue);
  background: var(--aimcf-blue);
  color: #fff;
  box-shadow: inset 0 0 0 3px var(--aimcf-blue);
}

.aimcf-choice:not(.is-checkbox) input:checked + .aimcf-choice-control {
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
  border: 6px solid var(--aimcf-blue);
}

.aimcf-choice input:focus-visible + .aimcf-choice-control {
  outline: 3px solid rgba(66, 133, 244, .25);
  outline-offset: 2px;
}

.aimcf-goal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.aimcf-goal-actions span {
  color: var(--aimcf-muted);
  font-size: 12px;
}

.aimcf-goal-actions button {
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  background: var(--aimcf-blue);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.aimcf-goal-actions button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.aimcf-privacy-note {
  padding: 15px 20px;
  border-top: 1px solid var(--aimcf-line);
  background: #fafafa;
  color: #7c8798;
  font-size: 11px;
  line-height: 1.6;
}

.aimcf-honeypot {
  position: absolute !important;
  left: -9999px !important;
}

.aimcf-live-results {
  position: relative;
  min-width: 0;
  min-height: 560px;
  padding: 26px;
  border: 1px solid var(--aimcf-line);
  border-radius: var(--aimcf-radius);
  background: #fff;
  box-shadow: var(--aimcf-shadow);
}

.aimcf-live-results.is-loading::after {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(255, 255, 255, .62);
  content: "";
  backdrop-filter: blur(1px);
}

.aimcf-live-results.is-loading::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid #d9e6ff;
  border-top-color: var(--aimcf-blue);
  border-radius: 50%;
  content: "";
  animation: aimcfSpin .7s linear infinite;
}

@keyframes aimcfSpin { to { transform: rotate(360deg); } }

.aimcf-live-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #ffc9c9;
  border-radius: 10px;
  background: #fff5f5;
  color: #b42318;
  font-size: 13px;
}

.aimcf-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.aimcf-results-head h2 {
  margin: 4px 0 0;
  color: var(--aimcf-ink);
  font-family: inherit;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.25;
}

.aimcf-result-count {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f2f4f7;
  color: var(--aimcf-muted);
  font-size: 12px;
  font-weight: 600;
}

.aimcf-course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.aimcf-course-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--aimcf-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(31, 55, 90, .05);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.aimcf-course-card:hover {
  border-color: #b8cff9;
  box-shadow: 0 13px 28px rgba(31, 55, 90, .11);
}

.aimcf-course-card.is-top-match {
  border-color: #94b9fb;
  box-shadow: 0 12px 30px rgba(66, 133, 244, .14);
}

.aimcf-course-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  background: linear-gradient(135deg, #eaf2ff, #fff7e5);
  text-decoration: none;
}

.aimcf-course-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .28s ease;
}

.aimcf-course-card:hover .aimcf-course-image img {
  transform: scale(1.025);
}

.aimcf-course-image > span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--aimcf-blue);
  font-size: 18px;
  font-weight: 800;
}

.aimcf-course-image em {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--aimcf-blue);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 5px 12px rgba(37, 99, 217, .2);
}

.aimcf-course-body {
  padding: 16px;
}

.aimcf-course-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.aimcf-course-meta span,
.aimcf-course-meta strong,
.aimcf-course-tags span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f2f4f7;
  color: #637083;
  font-size: 10px;
  font-weight: 700;
}

.aimcf-course-meta strong {
  margin-left: auto;
  background: #eaf2ff;
  color: var(--aimcf-blue-dark);
}

.aimcf-course-body h3 {
  margin: 0 0 10px;
  color: var(--aimcf-ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: 0;
}

.aimcf-course-body h3 a {
  color: inherit;
  text-decoration: none;
}

.aimcf-course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.aimcf-course-tags span {
  background: #fff7e5;
  color: #8a5a00;
}

.aimcf-course-summary {
  min-height: 63px;
  margin: 0 0 11px;
  color: var(--aimcf-muted);
  font-size: 13px;
  line-height: 1.65;
}

.aimcf-course-reasons {
  min-height: 46px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.aimcf-course-reasons li {
  position: relative;
  margin: 4px 0;
  padding-left: 18px;
  color: #526174;
  font-size: 12px;
  line-height: 1.5;
}

.aimcf-course-reasons li::before {
  position: absolute;
  left: 0;
  color: var(--aimcf-success);
  font-weight: 800;
  content: "✓";
}

.aimcf-course-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--aimcf-blue);
  border-radius: 10px;
  background: #fff;
  color: var(--aimcf-blue);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none !important;
  transition: background .18s ease, color .18s ease;
}

.aimcf-course-button:hover {
  background: var(--aimcf-blue);
  color: #fff;
}

.aimcf-empty-state {
  display: flex;
  min-height: 480px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.aimcf-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--aimcf-blue-soft);
  color: var(--aimcf-blue);
  font-size: 30px;
  font-weight: 800;
}

.aimcf-empty-state h3 { margin: 15px 0 6px; font-family: inherit; }
.aimcf-empty-state p { margin: 0 0 16px; color: var(--aimcf-muted); }
.aimcf-empty-state a { color: var(--aimcf-blue); font-weight: 700; }

.aimcf-featured-grid {
  display: grid;
  grid-template-columns: repeat(var(--aimcf-featured-columns, 4), minmax(0, 1fr));
  gap: 20px;
}

.aimcf-featured-card {
  overflow: hidden;
  border: 1px solid var(--aimcf-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 55, 90, .06);
}

.aimcf-featured-image {
  display: block;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: var(--aimcf-blue-soft);
}

.aimcf-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.aimcf-featured-image span { display: grid; height: 100%; place-items: center; color: var(--aimcf-blue); font-weight: 800; }
.aimcf-featured-card > div { padding: 17px; }
.aimcf-featured-card h3 { margin: 0 0 9px; font-family: inherit; font-size: 17px; font-weight: 650; line-height: 1.5; }
.aimcf-featured-card h3 a { color: var(--aimcf-ink); text-decoration: none; }
.aimcf-featured-card p { min-height: 58px; margin: 0 0 14px; color: var(--aimcf-muted); font-size: 13px; line-height: 1.65; }

@media (max-width: 1220px) {
  .aimcf-course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .aimcf-smart-layout { grid-template-columns: 1fr; }
  .aimcf-selector { position: static; }
  .aimcf-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .aimcf-smart-course {
    width: calc(100vw - 20px);
    margin-top: 16px;
    margin-bottom: 36px;
  }
  .aimcf-smart-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 20px;
    border-radius: 19px;
  }
  .aimcf-smart-hero h1 { font-size: 28px; }
  .aimcf-reset { min-height: 38px; }
  .aimcf-smart-layout { gap: 16px; }
  .aimcf-selector,
  .aimcf-live-results { border-radius: 16px; }
  .aimcf-step-panel { padding: 0 16px 17px 16px; }
  .aimcf-step-summary { grid-template-columns: 36px minmax(0,1fr) 22px; padding: 15px 16px; }
  .aimcf-choice-list.is-two-columns { grid-template-columns: 1fr; }
  .aimcf-live-results { min-height: 360px; padding: 17px; }
  .aimcf-results-head { align-items: flex-start; flex-direction: column; gap: 9px; }
  .aimcf-course-grid { grid-template-columns: 1fr; }
  .aimcf-course-summary,
  .aimcf-course-reasons { min-height: 0; }
  .aimcf-featured-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .aimcf-smart-course *,
  .aimcf-smart-course *::before,
  .aimcf-smart-course *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}


/* === AIMinEdu Smart Course 2.2: compact page and aligned cards === */
.aimcf-page-template {
  min-height: 70vh;
  padding: 28px 0 64px;
  background: #fbfaf9;
}

.aimcf-smart-course-page .content-area,
.aimcf-smart-course-page .site-main,
.aimcf-smart-course-page #primary {
  margin-top: 0;
  margin-bottom: 0;
}

.aimcf-smart-course {
  margin-top: 0;
}

.aimcf-smart-hero {
  align-items: center;
  margin-bottom: 20px;
  padding: 6px 2px 18px;
  border: 0;
  border-bottom: 1px solid #e4e9f2;
  border-radius: 0;
  background: transparent;
}

.aimcf-smart-hero h1 {
  margin: 3px 0 0;
  font-size: clamp(26px, 2.6vw, 38px);
}

.aimcf-kicker {
  font-size: 11px;
}

.aimcf-reset {
  min-height: 40px;
  border-color: #cbd9f4;
  background: #fff;
  color: var(--aimcf-blue);
}

/* Completed steps use the site blue instead of green. */
.aimcf-accordion-step.is-complete .aimcf-step-number {
  background: var(--aimcf-blue-soft);
  color: var(--aimcf-blue);
}
.aimcf-accordion-step.is-complete .aimcf-step-title small,
.aimcf-accordion-step.is-complete .aimcf-step-status,
.aimcf-course-reasons li::before {
  color: var(--aimcf-blue);
}

/* Every card uses the same vertical layout. */
.aimcf-course-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.aimcf-course-card {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.aimcf-course-image {
  flex: 0 0 auto;
}

.aimcf-course-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.aimcf-course-meta {
  min-height: 28px;
}

.aimcf-course-body h3 {
  display: -webkit-box;
  min-height: 53px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.aimcf-course-tags {
  min-height: 48px;
  align-content: flex-start;
  overflow: hidden;
}

.aimcf-course-summary {
  display: -webkit-box;
  height: 64px;
  min-height: 64px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.aimcf-course-reasons {
  min-height: 48px;
}

.aimcf-course-button {
  margin-top: auto;
}

.aimcf-featured-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.aimcf-featured-card {
  display: flex;
  height: 100%;
  flex-direction: column;
}
.aimcf-featured-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.aimcf-featured-card .aimcf-course-button {
  margin-top: auto;
}

@media (max-width: 680px) {
  .aimcf-page-template { padding: 16px 0 36px; }
  .aimcf-smart-hero {
    align-items: center;
    flex-direction: row;
    padding: 2px 2px 15px;
  }
  .aimcf-smart-hero h1 { font-size: 25px; }
  .aimcf-kicker { font-size: 10px; }
  .aimcf-reset { min-height: 36px; padding: 0 13px; font-size: 12px; }
  .aimcf-course-body h3,
  .aimcf-course-tags,
  .aimcf-course-summary,
  .aimcf-course-reasons {
    min-height: 0;
    height: auto;
  }
  .aimcf-course-body h3,
  .aimcf-course-summary {
    -webkit-line-clamp: initial;
  }
}

.aimcf-page-template .aimcf-smart-course {
  margin: 0 auto 64px;
  transform: none;
}

@media (max-width: 680px) {
  .aimcf-page-template .aimcf-smart-course { margin: 0 auto 36px; }
}

/* === AIMinEdu Smart Course 2.2: pricing and deterministic card alignment === */
.aimcf-course-price {
  display: flex;
  align-items: baseline;
  min-height: 31px;
  gap: 9px;
  margin: 0 0 10px;
  line-height: 1.25;
}

.aimcf-course-price.is-empty {
  visibility: hidden;
}

.aimcf-course-price del,
.aimcf-course-price ins {
  background: transparent;
  text-decoration-thickness: 1px;
}

.aimcf-price-regular {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 600;
}

.aimcf-price-sale,
.aimcf-price-current {
  color: var(--aimcf-blue-dark);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.aimcf-price-current.is-free {
  font-size: 17px;
}

.aimcf-course-price .woocommerce-Price-amount,
.aimcf-course-price .woocommerce-Price-currencySymbol {
  color: inherit;
  font: inherit;
}

.aimcf-course-tags.is-empty,
.aimcf-course-reasons.is-empty {
  visibility: hidden;
}

.aimcf-featured-card h3 {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.aimcf-featured-card .aimcf-course-price {
  flex: 0 0 auto;
}

@media (max-width: 680px) {
  .aimcf-course-price {
    min-height: 28px;
  }
  .aimcf-featured-card h3 {
    min-height: 0;
    -webkit-line-clamp: initial;
  }
}

/* Smart Learn 3.0 -------------------------------------------------------- */
.aimcf-smart-learn .aimcf-smart-hero {
  align-items: center;
  margin-bottom: 20px;
  padding: 18px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f6f9ff 0%, #fff 72%, #fffaf0 100%);
}

.aimcf-smart-learn .aimcf-smart-hero h1 {
  margin: 4px 0 0;
  font-size: clamp(26px, 2.5vw, 38px);
}

.aimcf-roadmap {
  display: grid;
  gap: 26px;
}

.aimcf-roadmap-stage {
  position: relative;
  padding-top: 2px;
}

.aimcf-roadmap-stage + .aimcf-roadmap-stage {
  padding-top: 26px;
  border-top: 1px dashed #d8e3f6;
}

.aimcf-stage-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 14px;
}

.aimcf-stage-head > span {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: #eaf2ff;
  color: var(--aimcf-blue);
  font-size: 13px;
  font-weight: 850;
}

.aimcf-stage-head h3 {
  margin: 1px 0 2px;
  color: var(--aimcf-ink);
  font-family: inherit;
  font-size: 19px;
  line-height: 1.35;
}

.aimcf-stage-head p {
  margin: 0;
  color: var(--aimcf-muted);
  font-size: 12px;
  line-height: 1.55;
}

.aimcf-stage-empty {
  padding: 18px;
  border: 1px dashed #d9e2ef;
  border-radius: 14px;
  background: #fbfcfe;
  color: #8290a3;
  font-size: 12px;
  text-align: center;
}

.aimcf-plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
  padding: 15px 16px;
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: linear-gradient(135deg, #f4f8ff, #fff);
}

.aimcf-plan-toolbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aimcf-plan-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--aimcf-blue);
  color: #fff;
  font-size: 18px;
}

.aimcf-plan-toolbar strong,
.aimcf-plan-toolbar small {
  display: block;
}

.aimcf-plan-toolbar strong {
  color: var(--aimcf-ink);
  font-size: 14px;
}

.aimcf-plan-toolbar small {
  margin-top: 2px;
  color: var(--aimcf-muted);
  font-size: 11px;
}

.aimcf-plan-toolbar small b {
  color: var(--aimcf-blue);
}

.aimcf-plan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.aimcf-plan-actions button,
.aimcf-plan-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none !important;
  cursor: pointer;
}

.aimcf-plan-save {
  border: 1px solid #c8d8f4;
  background: #fff;
  color: #365270;
}

.aimcf-plan-cart {
  border: 1px solid var(--aimcf-blue);
  background: var(--aimcf-blue);
  color: #fff;
}

.aimcf-plan-cart:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.aimcf-plan-actions a {
  color: var(--aimcf-blue);
}

.aimcf-course-grid {
  align-items: stretch;
}

.aimcf-course-card {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.aimcf-course-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.aimcf-course-body h3 {
  min-height: 53px;
}

.aimcf-course-price {
  min-height: 30px;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #172033;
  font-size: 16px;
  font-weight: 800;
}

.aimcf-price-regular {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 500;
}

.aimcf-price-sale {
  color: #e34b3f;
  font-size: 17px;
  text-decoration: none;
}

.aimcf-course-price.is-empty {
  visibility: hidden;
}

.aimcf-course-summary {
  min-height: 84px;
}

.aimcf-course-reasons {
  min-height: 50px;
}

.aimcf-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.aimcf-card-actions button {
  min-height: 42px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
}

.aimcf-card-actions .aimcf-course-button {
  width: auto;
  border: 1px solid var(--aimcf-blue);
  background: var(--aimcf-blue);
  color: #fff;
}

.aimcf-card-actions .aimcf-course-button:hover,
.aimcf-card-actions .aimcf-course-button.is-added {
  background: var(--aimcf-blue-dark);
  color: #fff;
}

.aimcf-cart-button {
  border: 1px solid #b9cef2;
  background: #fff;
  color: var(--aimcf-blue);
}

.aimcf-cart-button:hover,
.aimcf-cart-button.is-added {
  border-color: var(--aimcf-blue);
  background: #eef5ff;
}

.aimcf-detail-link {
  grid-column: 1 / -1;
  padding-top: 2px;
  color: #7b8798;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
}

.aimcf-detail-link:hover {
  color: var(--aimcf-blue);
}

.aimcf-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: 12px;
  background: #172033;
  color: #fff;
  box-shadow: 0 16px 40px rgba(23, 32, 51, .22);
  font-size: 13px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}

.aimcf-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.aimcf-toast.is-error {
  background: #b42318;
}

/* Member Pro optional panel */
.aimcf-member-plan-shell {
  padding: 4px 0 30px;
}

.aimcf-member-plan-shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid #dce7fb;
  border-radius: 20px;
  background: linear-gradient(135deg, #f4f8ff, #fff 65%, #fff9ec);
}

.aimcf-member-plan-shell > header span {
  color: var(--aimcf-blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.aimcf-member-plan-shell > header h2 {
  margin: 5px 0;
  font-family: inherit;
  font-size: 28px;
}

.aimcf-member-plan-shell > header p {
  margin: 0;
  color: var(--aimcf-muted);
}

.aimcf-member-plan-shell > header > a,
.aimcf-member-empty a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--aimcf-blue);
  color: #fff;
  font-weight: 750;
  text-decoration: none !important;
}

.aimcf-member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.aimcf-member-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf4ff;
  color: #315f9f;
  font-size: 12px;
  font-weight: 650;
}

.aimcf-member-route-list {
  display: grid;
  gap: 12px;
}

.aimcf-member-route-list article {
  display: grid;
  grid-template-columns: 42px 120px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.aimcf-member-route-list article > b {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #eaf2ff;
  color: var(--aimcf-blue);
}

.aimcf-member-route-list img {
  width: 120px;
  height: 68px;
  border-radius: 9px;
  object-fit: cover;
}

.aimcf-member-route-list h3 {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 16px;
}

.aimcf-member-route-list a {
  color: var(--aimcf-blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.aimcf-member-empty {
  padding: 38px 24px;
  border: 1px dashed #cfd9e8;
  border-radius: 18px;
  background: #fbfcfe;
  text-align: center;
}

.aimcf-member-empty p {
  color: var(--aimcf-muted);
}

@media (max-width: 900px) {
  .aimcf-plan-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .aimcf-plan-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .aimcf-smart-learn .aimcf-smart-hero {
    padding: 18px;
  }
  .aimcf-plan-actions button,
  .aimcf-plan-actions a {
    flex: 1 1 auto;
  }
  .aimcf-card-actions {
    grid-template-columns: 1fr;
  }
  .aimcf-detail-link {
    grid-column: auto;
  }
  .aimcf-course-body h3,
  .aimcf-course-summary,
  .aimcf-course-reasons {
    min-height: 0;
  }
  .aimcf-member-plan-shell > header {
    flex-direction: column;
  }
  .aimcf-member-route-list article {
    grid-template-columns: 36px 88px minmax(0, 1fr);
    gap: 9px;
  }
  .aimcf-member-route-list img {
    width: 88px;
    height: 54px;
  }
}

/* Final cascade corrections */
.aimcf-smart-learn .aimcf-smart-hero {
  border: 1px solid #e1eaff;
}
.aimcf-smart-learn .aimcf-course-summary {
  height: auto;
  min-height: 84px;
  -webkit-line-clamp: 4;
}
.aimcf-smart-learn .aimcf-card-actions .aimcf-course-button {
  margin-top: 0;
}
.aimcf-smart-learn .aimcf-course-tags {
  min-height: 48px;
}
.aimcf-field-wide {
  grid-column: 1 / -1;
}
@media (max-width:680px) {
  .aimcf-smart-learn .aimcf-smart-hero {
    align-items: flex-start;
    flex-direction: row;
  }
  .aimcf-smart-learn .aimcf-course-summary {
    min-height: 0;
  }
}

/* Smart Learn plan bundle total */
.aimcf-plan-summary{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:2px;white-space:nowrap}
.aimcf-plan-summary span{font-size:12px;color:#78869a}
.aimcf-plan-summary b{font-size:18px;color:#172238;letter-spacing:-.02em}
@media (max-width:900px){.aimcf-plan-summary{margin-left:0;align-items:flex-start}.aimcf-plan-toolbar{align-items:flex-start}}

/* v3.0.1 compact course cards */
.aimcf-smart-learn .aimcf-course-summary {
  display: none !important;
}

.aimcf-smart-learn .aimcf-course-tags {
  position: relative;
  display: flex;
  min-height: 28px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: visible;
}

.aimcf-smart-learn .aimcf-course-tags.is-empty {
  min-height: 0;
  margin-bottom: 0;
}

.aimcf-smart-learn .aimcf-course-tag {
  display: block;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 0;
  padding: 5px 9px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  appearance: none;
  background: #fff7e5;
  color: #8a5a00;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: help;
}

.aimcf-smart-learn .aimcf-course-tag:hover,
.aimcf-smart-learn .aimcf-course-tag:focus-visible {
  outline: 2px solid rgba(66, 133, 244, .22);
  outline-offset: 1px;
}

.aimcf-smart-learn .aimcf-course-tag.is-expanded {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  overflow: visible;
  box-shadow: 0 10px 24px rgba(31, 55, 90, .16);
  text-overflow: clip;
  white-space: normal;
  cursor: zoom-out;
}

.aimcf-smart-learn .aimcf-course-reasons {
  min-height: 48px;
  margin-bottom: 12px;
}

.aimcf-smart-learn .aimcf-card-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: auto;
}

.aimcf-smart-learn .aimcf-card-main-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.aimcf-smart-learn .aimcf-card-main-actions .aimcf-course-button,
.aimcf-smart-learn .aimcf-card-main-actions .aimcf-detail-link {
  display: inline-flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.2;
  text-align: center;
  text-decoration: none !important;
}

.aimcf-smart-learn .aimcf-card-main-actions .aimcf-detail-link {
  border: 1px solid #b9cef2;
  background: #fff;
  color: var(--aimcf-blue);
}

.aimcf-smart-learn .aimcf-card-main-actions .aimcf-detail-link:hover {
  border-color: var(--aimcf-blue);
  background: #eef5ff;
  color: var(--aimcf-blue-dark);
}

.aimcf-smart-learn .aimcf-card-actions .aimcf-cart-button {
  width: 100%;
  min-height: 34px;
  border-radius: 9px;
  font-size: 11px;
}

.aimcf-featured-card > div {
  display: flex;
  min-height: 150px;
  flex-direction: column;
}

.aimcf-featured-card .aimcf-course-button {
  margin-top: auto;
}

@media (max-width: 420px) {
  .aimcf-smart-learn .aimcf-card-main-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.aimcf-smart-learn .aimcf-card-main-actions .aimcf-detail-link {
  grid-column: auto;
  padding-top: 8px;
}

/* v3.4: allow parents to choose between structured filters and an Ami AI conversation. */
.aimcf-recommendation-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--aimcf-line);
  background: #fff;
}

.aimcf-recommendation-modes button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--aimcf-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.aimcf-recommendation-modes button small {
  padding: 2px 6px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #7b8494;
  font-size: 10px;
  font-weight: 600;
}

.aimcf-recommendation-modes button.is-active {
  background: var(--aimcf-blue-soft);
  color: var(--aimcf-blue-dark);
}

.aimcf-mode-panel[hidden] {
  display: none !important;
}

.aimcf-chat-panel {
  min-height: 610px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 26%);
}

.aimcf-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--aimcf-line);
}

.aimcf-chat-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.aimcf-chat-head strong,
.aimcf-chat-head small {
  display: block;
}

.aimcf-chat-head strong {
  color: var(--aimcf-ink);
  font-size: 15px;
}

.aimcf-chat-head small {
  margin-top: 2px;
  color: var(--aimcf-muted);
  font-size: 11px;
}

.aimcf-chat-head button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 0;
  background: transparent;
  color: var(--aimcf-blue);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.aimcf-chat-avatar {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #4285f4, #6ea6ff);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 8px 20px rgba(66, 133, 244, .2);
}

.aimcf-chat-messages {
  display: flex;
  min-height: 280px;
  max-height: 365px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 18px;
  scroll-behavior: smooth;
}

.aimcf-chat-message {
  max-width: 90%;
  padding: 11px 13px;
  border-radius: 15px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.aimcf-chat-message.is-assistant {
  align-self: flex-start;
  border: 1px solid #e5eaf2;
  border-bottom-left-radius: 5px;
  background: #fff;
  color: #344054;
}

.aimcf-chat-message.is-user {
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  background: var(--aimcf-blue);
  color: #fff;
}

.aimcf-chat-message.is-thinking {
  color: var(--aimcf-muted);
  font-style: italic;
}

.aimcf-chat-message.is-error {
  border-color: #ffd7d7;
  background: #fff7f7;
  color: #b42318;
}

.aimcf-chat-profile {
  display: flex;
  min-height: 42px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 18px 12px;
}

.aimcf-chat-profile > span,
.aimcf-chat-profile > strong {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
}

.aimcf-chat-profile > strong {
  background: var(--aimcf-blue-soft);
  color: var(--aimcf-blue-dark);
}

.aimcf-chat-prompts {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 0 18px 12px;
  scrollbar-width: thin;
}

.aimcf-chat-prompts button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #dbe8ff;
  border-radius: 999px;
  background: #fff;
  color: var(--aimcf-blue-dark);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.aimcf-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding: 0 18px;
}

.aimcf-chat-form textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid #d7deea;
  border-radius: 12px;
  background: #fff;
  color: var(--aimcf-ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
}

.aimcf-chat-form textarea:focus {
  border-color: var(--aimcf-blue);
  box-shadow: 0 0 0 3px rgba(66, 133, 244, .12);
}

.aimcf-chat-form button {
  align-self: stretch;
  min-width: 66px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--aimcf-blue);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.aimcf-chat-form button:disabled {
  cursor: wait;
  opacity: .65;
}

.aimcf-chat-privacy {
  margin: 10px 18px 0;
  padding-bottom: 16px;
  color: #98a2b3;
  font-size: 10px;
  line-height: 1.55;
}

.aimcf-chat-gate {
  display: flex;
  min-height: 500px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 24px;
  text-align: center;
}

.aimcf-chat-gate .aimcf-chat-avatar {
  width: 52px;
  height: 52px;
  margin-bottom: 15px;
  flex-basis: 52px;
}

.aimcf-chat-gate h3 {
  margin: 0 0 9px;
  color: var(--aimcf-ink);
  font-family: inherit;
  font-size: 20px;
  line-height: 1.4;
}

.aimcf-chat-gate p {
  max-width: 300px;
  margin: 0 0 18px;
  color: var(--aimcf-muted);
  font-size: 13px;
  line-height: 1.7;
}

.aimcf-chat-gate a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 10px;
  background: var(--aimcf-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 767px) {
  .aimcf-chat-panel { min-height: 520px; }
  .aimcf-chat-messages { min-height: 230px; max-height: 330px; padding: 14px; }
  .aimcf-chat-profile { padding-right: 14px; padding-left: 14px; }
  .aimcf-chat-prompts { padding-right: 14px; padding-left: 14px; }
  .aimcf-chat-form { grid-template-columns: 1fr; padding-right: 14px; padding-left: 14px; }
  .aimcf-chat-form button { min-height: 42px; }
  .aimcf-chat-privacy { margin-right: 14px; margin-left: 14px; }
}
