/* Kuliah Indo public site and auth pages. Visual reference: kuliahindo.vercel.app
   (white surfaces, Poppins headings, Inter body, orange accent, soft bordered cards).
   Everything is namespaced .kh-* so the older template CSS keeps working elsewhere. */

:root {
  --kh-bg: #ffffff;
  --kh-fg: #0a0a0a;
  --kh-fg-2: #262626;
  --kh-muted: #737373;
  --kh-muted-bg: #f5f5f5;
  --kh-subtle-bg: #fafafa;
  --kh-border: #e5e5e5;
  --kh-primary: #ee9733;
  --kh-primary-hover: #e0841c;
  --kh-primary-ink: #0a0a0a;
  --kh-primary-text: #b4620c;
  --kh-primary-soft: #fdf3e6;
  --kh-success: #15803d;
  --kh-danger: #b91c1c;

  --kh-head: "Poppins", system-ui, sans-serif;
  --kh-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --kh-nav-h: 64px;
  --kh-r-sm: 8px;
  --kh-r: 12px;
  --kh-shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --kh-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --kh-shadow-lg: 0 12px 28px -12px rgba(0, 0, 0, .18);
  --kh-ease: cubic-bezier(.2, .8, .2, 1);
  --kh-fast: 150ms;
  --kh-base: 220ms;
}

/* ---------- Base inside new pages ---------- */
.kh-page, .kh-nav, .kh-footer {
  font-family: var(--kh-body);
  color: var(--kh-fg);
  -webkit-font-smoothing: antialiased;
}
.kh-page {
  display: block;
  padding-top: var(--kh-nav-h);
  background: var(--kh-bg);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
}
.kh-page h1, .kh-page h2, .kh-page h3, .kh-page h4, .kh-footer h2 {
  font-family: var(--kh-head);
  color: var(--kh-fg);
  margin: 0;
  letter-spacing: -.01em;
}
.kh-page p { font-size: inherit; line-height: inherit; margin: 0; }
.kh-page span, .kh-page a, .kh-nav span, .kh-nav a, .kh-footer span, .kh-footer a { display: revert; transition: none; }
.kh-page ul, .kh-page ol, .kh-page dl, .kh-footer ul { list-style: none; margin: 0; padding: 0; }
/* Zero specificity, so component sizes (avatars, thumbnails) always win. */
:where(.kh-page) img { max-width: 100%; height: auto; display: block; }
.kh-page a { color: inherit; text-decoration: none; }
.kh-page a:focus-visible, .kh-page button:focus-visible, .kh-page input:focus-visible, .kh-page summary:focus-visible,
.kh-nav a:focus-visible, .kh-nav button:focus-visible, .kh-nav summary:focus-visible,
.kh-footer a:focus-visible, .kh-quotes:focus-visible {
  outline: 2px solid var(--kh-primary) !important;
  outline-offset: 2px;
}
.kh-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.kh-muted { color: var(--kh-muted); }

/* ---------- Buttons ---------- */
.kh-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--kh-r-sm);
  font-family: var(--kh-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--kh-fast), border-color var(--kh-fast), color var(--kh-fast), box-shadow var(--kh-fast) !important;
}
.kh-btn i { font-size: 13px; }
.kh-btn--primary { background: var(--kh-primary); color: var(--kh-primary-ink) !important; box-shadow: var(--kh-shadow-sm); }
.kh-btn--primary:hover { background: var(--kh-primary-hover); }
.kh-btn--outline { background: var(--kh-bg); border-color: var(--kh-border); color: var(--kh-fg) !important; box-shadow: var(--kh-shadow-sm); }
.kh-btn--outline:hover { background: var(--kh-muted-bg); }
.kh-btn--ghost { background: transparent; color: var(--kh-fg) !important; }
.kh-btn--ghost:hover { background: var(--kh-muted-bg); }
.kh-btn--disabled { background: var(--kh-muted-bg); color: var(--kh-muted) !important; cursor: not-allowed; }
.kh-btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.kh-btn--lg { min-height: 44px; padding: 0 22px; font-size: 15px; }
.kh-btn--block { width: 100%; }
.kh-link { color: var(--kh-primary-text) !important; font-weight: 500; font-size: 14px; display: inline-flex !important; align-items: center; gap: 4px; }
.kh-link:hover { text-decoration: underline !important; text-underline-offset: 3px; }

/* ---------- Chips & badges ---------- */
.kh-chip {
  display: inline-flex !important;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--kh-muted-bg);
  color: var(--kh-fg-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
}
.kh-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  background: var(--kh-primary);
  color: var(--kh-primary-ink);
}
.kh-badge--dark { background: var(--kh-fg); color: #fff; }
.kh-badge--success { background: var(--kh-success); color: #fff; }
.kh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--kh-muted); }
.kh-meta span { display: inline-flex !important; align-items: center; gap: 5px; }
.kh-meta i { font-size: 14px; }
.kh-star { color: var(--kh-primary); }
.kh-meta strong { color: var(--kh-fg); font-weight: 600; }

/* ---------- Navigation ---------- */
.kh-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--kh-nav-h);
  z-index: 1030;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(1.5) blur(10px);
  -webkit-backdrop-filter: saturate(1.5) blur(10px);
  border-bottom: 1px solid var(--kh-border);
}
.kh-nav__bar { height: 100%; display: flex; align-items: center; gap: 28px; }
.kh-nav__brand { flex: none; display: inline-flex !important; align-items: center; }
.kh-nav__brand img { height: 28px; width: auto; display: block; }
.kh-nav__links { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.kh-nav__links a {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--kh-fg-2);
  text-decoration: none;
  transition: background-color var(--kh-fast), color var(--kh-fast) !important;
}
.kh-nav__links a:hover { background: var(--kh-muted-bg); color: var(--kh-fg); }
.kh-nav__links a.is-active { color: var(--kh-primary-text); }
.kh-nav__mobile-only { display: none !important; }
.kh-nav__actions { display: flex; align-items: center; gap: 8px; }

.kh-menu { position: relative; }
.kh-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--kh-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  background: var(--kh-bg);
}
.kh-menu summary::-webkit-details-marker { display: none; }
.kh-menu summary img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.kh-menu summary i { font-size: 10px; color: var(--kh-muted); }
.kh-menu__name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-menu__panel {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 200px;
  padding: 4px;
  background: var(--kh-bg);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r-sm);
  box-shadow: var(--kh-shadow-lg);
}
.kh-menu__panel a { display: flex !important; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 14px; color: var(--kh-fg); }
.kh-menu__panel a:hover { background: var(--kh-muted-bg); }

.kh-nav__toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r-sm);
  background: var(--kh-bg);
  cursor: pointer;
  position: relative;
}
.kh-nav__toggle span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 2px; background: var(--kh-fg); transition: transform var(--kh-base) var(--kh-ease), top var(--kh-base) var(--kh-ease); }
.kh-nav__toggle span:first-child { top: 15px; }
.kh-nav__toggle span:last-child { top: 23px; }
.kh-nav.is-open .kh-nav__toggle span:first-child { top: 19px; transform: rotate(45deg); }
.kh-nav.is-open .kh-nav__toggle span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Sections ---------- */
.kh-section { padding: 80px 0; }
.kh-section--muted { background: var(--kh-subtle-bg); }
.kh-section--tight { padding: 40px 0 80px; }
.classes { scroll-margin-top: var(--kh-nav-h); }
.kh-heading { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.kh-heading h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 700; line-height: 1.2; }
.kh-heading p { margin-top: 12px !important; color: var(--kh-muted); font-size: 16px; }
.kh-more { margin-top: 40px; text-align: center; }
.kh-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  border: 1px dashed var(--kh-border);
  border-radius: var(--kh-r);
  text-align: center;
  color: var(--kh-muted);
  background: var(--kh-bg);
}

/* ---------- Hero ---------- */
.kh-hero {
  position: relative;
  padding: 96px 0 88px;
  text-align: center;
  background: linear-gradient(135deg, rgba(238, 151, 51, .06) 0%, #ffffff 50%, rgba(238, 151, 51, .12) 100%);
}
.kh-hero h1 {
  font-size: clamp(38px, 5.4vw, 60px);
  font-weight: 700;
  line-height: 1.12;
  max-width: 820px;
  margin: 0 auto;
}
.kh-hero h1 em { font-style: normal; color: var(--kh-primary); white-space: nowrap; }
.kh-hero__lead { max-width: 600px; margin: 20px auto 0 !important; font-size: 18px; color: var(--kh-muted); }
.kh-hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.kh-stats { margin: 56px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; gap: 16px; }
.kh-stat strong { display: block; font-family: var(--kh-head); font-size: 28px; font-weight: 700; color: var(--kh-primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kh-stat span { display: block !important; font-size: 13px; color: var(--kh-muted); }

/* Page hero (inner pages) */
.kh-pagehero { padding: 72px 0 56px; text-align: center; background: var(--kh-subtle-bg); border-bottom: 1px solid var(--kh-border); }
.kh-pagehero h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 700; line-height: 1.2; }
.kh-pagehero p { max-width: 620px; margin: 14px auto 0 !important; color: var(--kh-muted); font-size: 17px; }
.kh-pagehero .kh-eyebrow { margin-bottom: 12px !important; }
.kh-eyebrow { display: inline-flex !important; padding: 4px 12px; border-radius: 999px; background: var(--kh-primary-soft); color: var(--kh-primary-text); font-size: 13px; font-weight: 600; }

/* ---------- Banners ---------- */
.kh-banners { padding: 56px 0 0; }
.kh-banner-swiper { border-radius: var(--kh-r); overflow: hidden; border: 1px solid var(--kh-border); box-shadow: var(--kh-shadow); background: var(--kh-muted-bg); }
.kh-banner-swiper img { width: 100%; aspect-ratio: 1280 / 526; object-fit: cover; }
.kh-banners__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.kh-banners__count { font-size: 13px; color: var(--kh-muted); font-variant-numeric: tabular-nums; }
.kh-banners__arrows { display: flex !important; gap: 8px; }
.kh-arrow {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r-sm);
  background: var(--kh-bg);
  color: var(--kh-fg);
  cursor: pointer;
}
.kh-arrow:hover { background: var(--kh-muted-bg); }

/* ---------- Cards (classes) ---------- */
.kh-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.kh-card {
  display: flex;
  flex-direction: column;
  background: var(--kh-bg);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r);
  box-shadow: var(--kh-shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--kh-base), transform var(--kh-base) var(--kh-ease) !important;
}
.kh-card:hover { box-shadow: var(--kh-shadow-lg); transform: translateY(-2px); }
.kh-card[hidden] { display: none; }
/* Class posters are portrait (4:5); show them whole, never cropped. */
.kh-card__media { display: block !important; position: relative; aspect-ratio: 4 / 5; background: var(--kh-muted-bg); overflow: hidden; }
.kh-card__media img { width: 100%; height: 100%; object-fit: contain; }
.kh-card.is-ended .kh-card__media img { filter: grayscale(1); opacity: .75; }
.kh-card__badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex !important; justify-content: space-between; gap: 8px; }
.kh-card__badges > span:first-child { display: flex !important; flex: 1 1 auto; min-width: 0; }
.kh-card__badges .kh-badge { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: block !important; flex: none; }
.kh-card__badges > span:first-child .kh-badge { flex: 0 1 auto; }
.kh-card__body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.kh-card__title { font-size: 18px !important; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kh-card__title a:hover { color: var(--kh-primary-text); }
.kh-card__desc { font-size: 14px !important; line-height: 1.55 !important; color: var(--kh-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kh-price { font-family: var(--kh-head); font-size: 22px; font-weight: 700; color: var(--kh-primary); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kh-price s { display: block; font-family: var(--kh-body); font-size: 13px; font-weight: 400; color: var(--kh-muted); }
.kh-card__foot { margin-top: auto; padding-top: 6px; display: grid; gap: 14px; }

.kh-mentor-mini { display: flex !important; align-items: center; gap: 10px; }
.kh-mentor-mini img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--kh-muted-bg); }
.kh-mentor-mini span { display: grid !important; line-height: 1.3; }
.kh-mentor-mini strong { font-size: 13px; font-weight: 600; }
.kh-mentor-mini small { font-size: 12px; color: var(--kh-muted); }
a.kh-mentor-mini:hover strong { color: var(--kh-primary-text); }

/* ---------- Mentors ---------- */
.kh-mentor {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 24px 24px;
  background: var(--kh-bg);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r);
  box-shadow: var(--kh-shadow-sm);
  transition: box-shadow var(--kh-base), transform var(--kh-base) var(--kh-ease) !important;
}
.kh-mentor:hover { box-shadow: var(--kh-shadow-lg); transform: translateY(-2px); }
.kh-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--kh-muted-bg);
  box-shadow: 0 0 0 4px var(--kh-primary-soft);
  margin-bottom: 6px;
}
/* Portrait photos: anchor the crop near the top so heads are never cut off. */
.kh-avatar, .kh-mentor-mini img, .kh-person img, .kh-mosaic img, .kh-quote figcaption img { object-position: 50% 15%; }
.kh-avatar--lg { width: 128px; height: 128px; box-shadow: 0 0 0 6px var(--kh-primary-soft); }
.kh-mentor h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.kh-mentor__role { display: block !important; font-size: 14px; font-weight: 500; color: var(--kh-primary-text); }
.kh-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.kh-mentor__bio { font-size: 14px !important; line-height: 1.55 !important; color: var(--kh-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kh-mentor .kh-meta { justify-content: center; }
.kh-mentor .kh-btn { margin-top: auto; }
.kh-mentor__spacer { flex: 1; }

/* Mentor profile */
.kh-profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 32px;
  background: var(--kh-bg);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r);
  box-shadow: var(--kh-shadow-sm);
}
.kh-profile-card h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; line-height: 1.2; }
.kh-profile-card .kh-mentor__role { margin-top: 4px; font-size: 16px; }
.kh-profile-card .kh-chips { justify-content: flex-start; margin-top: 14px; }
.kh-profile-card .kh-meta { margin-top: 14px; font-size: 14px; }
.kh-profile-card .kh-prose { margin-top: 18px; }

/* Mentor reviews */
.kh-meta__link { display: inline-flex !important; align-items: center; gap: 5px; color: inherit; }
.kh-meta__link:hover { color: var(--kh-primary-text) !important; }
.kh-reviews { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.kh-rating-summary { position: sticky; top: calc(var(--kh-nav-h) + 24px); padding: 24px; background: var(--kh-bg); border: 1px solid var(--kh-border); border-radius: var(--kh-r); box-shadow: var(--kh-shadow-sm); text-align: center; }
.kh-rating-summary__value { display: block; font-family: var(--kh-head); font-size: 44px; font-weight: 700; line-height: 1; color: var(--kh-fg); }
.kh-rating-summary__stars { display: flex; justify-content: center; gap: 2px; margin: 10px 0 4px; font-size: 18px; color: var(--kh-border); }
.kh-rating-summary__stars .is-on { color: var(--kh-primary); }
.kh-rating-summary p { font-size: 13px; color: var(--kh-muted); }
.kh-rating-bars { margin-top: 18px !important; display: grid; gap: 8px; text-align: left; }
.kh-rating-bars li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 28px; align-items: center; gap: 8px; font-size: 13px; color: var(--kh-muted); }
.kh-rating-bars li > span:first-child { display: inline-flex !important; align-items: center; gap: 3px; }
.kh-rating-bars i { font-size: 11px; color: var(--kh-primary); }
.kh-rating-bars__track { display: block !important; height: 8px; border-radius: 999px; background: var(--kh-muted-bg); overflow: hidden; }
.kh-rating-bars__track span { display: block !important; height: 100%; border-radius: 999px; background: var(--kh-primary); }
.kh-rating-bars__count { text-align: right; font-variant-numeric: tabular-nums; }
.kh-review-list { display: grid; gap: 14px; }
.kh-review { padding: 18px 20px; background: var(--kh-bg); border: 1px solid var(--kh-border); border-radius: var(--kh-r); box-shadow: var(--kh-shadow-sm); }
.kh-review[hidden] { display: none; }
.kh-review__head { display: flex; align-items: center; gap: 12px; }
.kh-review__head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; background: var(--kh-muted-bg); flex: none; }
.kh-review__head > span:nth-child(2) { display: grid !important; min-width: 0; flex: 1; line-height: 1.35; }
.kh-review__head strong { font-size: 14px; font-weight: 600; }
.kh-review__head small { font-size: 12.5px; color: var(--kh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kh-review__stars { display: inline-flex !important; gap: 1px; font-size: 13px; color: var(--kh-border); flex: none; }
.kh-review__stars .is-on { color: var(--kh-primary); }
.kh-review__text { margin-top: 12px !important; font-size: 15px; line-height: 1.6 !important; color: var(--kh-fg-2); overflow-wrap: anywhere; }
.kh-review__date { display: block; margin-top: 10px; font-size: 12px; color: var(--kh-muted); }
@media (max-width: 860px) {
  .kh-reviews { grid-template-columns: 1fr; }
  .kh-rating-summary { position: static; }
}

/* ---------- Class detail ---------- */
.kh-crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 28px 0 0; font-size: 13px; color: var(--kh-muted); }
.kh-crumbs a:hover { color: var(--kh-fg); }
.kh-crumbs span[aria-current] { color: var(--kh-fg); }
.kh-detail { padding-bottom: 80px; }
.kh-detail__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; margin-top: 20px; }
.kh-detail__media { border-radius: var(--kh-r); overflow: hidden; border: 1px solid var(--kh-border); background: var(--kh-muted-bg); }
.kh-detail__media img { width: 100%; max-height: 560px; object-fit: contain; background: var(--kh-muted-bg); }
.kh-detail__head { margin-top: 20px; display: grid; gap: 12px; }
.kh-detail__head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; line-height: 1.25; }
.kh-panel {
  background: var(--kh-bg);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r);
  box-shadow: var(--kh-shadow-sm);
}
.kh-panel + .kh-panel { margin-top: 16px; }
.kh-panel__head { padding: 18px 20px 0; font-family: var(--kh-head); font-size: 16px; font-weight: 600; }
.kh-page .kh-panel__body { padding: 18px 20px 20px; }
.kh-desc { margin-top: 24px; }
.kh-prose { font-size: 15px; line-height: 1.75; color: var(--kh-fg-2); }
.kh-prose p { margin: 0 0 .9em !important; font-size: inherit !important; line-height: inherit !important; }
.kh-prose h1, .kh-prose h2, .kh-prose h3, .kh-prose h4 { margin: 1.4em 0 .5em; font-size: 1.1em; font-weight: 600; line-height: 1.3; }
.kh-prose ul, .kh-prose ol { margin: 0 0 .9em 1.25em !important; padding: 0 !important; }
.kh-prose ul { list-style: disc !important; }
.kh-prose ol { list-style: decimal !important; }
.kh-prose li { margin-bottom: .3em; }
.kh-prose a { color: var(--kh-primary-text); text-decoration: underline !important; }
.kh-prose img { max-width: 100%; height: auto; border-radius: var(--kh-r-sm); }

.kh-buy { position: sticky; top: calc(var(--kh-nav-h) + 24px); }
.kh-buy__price { text-align: center; padding: 24px 20px 20px; display: grid; gap: 6px; }
.kh-buy__price .kh-price { font-size: 30px; }
.kh-buy__price p { font-size: 13px !important; color: var(--kh-muted); }
.kh-buy__price .kh-btn { margin-top: 10px; }
.kh-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--kh-border); font-size: 14px; }
.kh-facts > div:first-child { border-top: 0; padding-top: 0; }
.kh-facts dt { font-weight: 400; color: var(--kh-muted); }
.kh-facts dd { margin: 0; font-weight: 500; color: var(--kh-fg); text-align: right; }
.kh-buybar { display: none; }

/* Modal (Bootstrap markup) */
.kh-modal .modal-content { border: 1px solid var(--kh-border); border-radius: var(--kh-r); background: var(--kh-bg); font-family: var(--kh-body); box-shadow: var(--kh-shadow-lg); }
.kh-modal .modal-header { border-bottom: 1px solid var(--kh-border); padding: 18px 22px; align-items: center; }
.kh-modal .modal-title { font-family: var(--kh-head); font-size: 18px; font-weight: 600; color: var(--kh-fg); margin: 0; }
.kh-modal .close { font-size: 26px; opacity: .6; }
.kh-modal .modal-body { padding: 14px 22px 20px; }
.kh-modal .modal-footer { border-top: 1px solid var(--kh-border); padding: 14px 22px; }
.kh-facts--rows > div:first-child { padding-top: 10px; }
.kh-order { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 12px; background: var(--kh-subtle-bg); border: 1px solid var(--kh-border); border-radius: var(--kh-r-sm); }
.kh-order img { width: 56px; height: 70px; object-fit: cover; border-radius: 6px; }
.kh-order small { display: block; font-size: 12px; color: var(--kh-muted); }
.kh-order__title { font-weight: 600; font-size: 14px; line-height: 1.4 !important; }
.kh-order__total { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 16px; color: var(--kh-muted); font-size: 14px; }
.kh-order__total strong { font-family: var(--kh-head); font-size: 22px; color: var(--kh-primary); text-align: right; }
.kh-order__total strong s { display: block; font-family: var(--kh-body); font-size: 12px; font-weight: 400; color: var(--kh-muted); }

/* ---------- Class list search ---------- */
.kh-search {
  margin: 28px auto 0;
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  background: var(--kh-bg);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r);
  box-shadow: var(--kh-shadow-sm);
}
.kh-search i { color: var(--kh-muted); }
.kh-search input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; font-family: var(--kh-body); font-size: 15px; color: var(--kh-fg); }
.kh-search input:focus { outline: none; }
.kh-search:focus-within { border-color: var(--kh-primary); box-shadow: 0 0 0 3px rgba(238, 151, 51, .2); }
.kh-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.kh-toolbar h2 { font-size: 20px !important; font-weight: 600; }
.kh-toolbar .kh-chip { margin-left: 6px; }

/* ---------- Profile page ---------- */
.kh-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.kh-about h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; line-height: 1.25; margin-top: 12px !important; }
.kh-about p { margin-top: 16px !important; color: var(--kh-muted); font-size: 16px; }
.kh-mosaic { display: grid !important; grid-template-columns: 1fr 1fr; gap: 12px; }
.kh-mosaic li { border-radius: var(--kh-r); overflow: hidden; background: var(--kh-muted-bg); }
.kh-mosaic li:nth-child(2), .kh-mosaic li:nth-child(4) { transform: translateY(24px); }
.kh-mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.kh-feature { padding: 28px 24px; background: var(--kh-bg); border: 1px solid var(--kh-border); border-radius: var(--kh-r); box-shadow: var(--kh-shadow-sm); }
.kh-feature__icon { width: 44px; height: 44px; display: inline-flex !important; align-items: center; justify-content: center; border-radius: 10px; background: var(--kh-primary-soft); color: var(--kh-primary-text); font-size: 20px; margin-bottom: 16px; }
.kh-feature h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px !important; }
.kh-feature p { font-size: 14px; color: var(--kh-muted); }
.kh-quotes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 360px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 16px; }
.kh-quote { margin: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--kh-bg); border: 1px solid var(--kh-border); border-radius: var(--kh-r); box-shadow: var(--kh-shadow-sm); }
.kh-stars { display: flex; gap: 2px; color: var(--kh-border); font-size: 14px; }
.kh-stars .is-on { color: var(--kh-primary); }
.kh-quote blockquote { margin: 0; font-size: 15px; line-height: 1.6; color: var(--kh-fg-2); flex: 1; }
.kh-quote figcaption { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--kh-border); }
.kh-quote figcaption img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.kh-quote figcaption span { display: grid !important; line-height: 1.35; }
.kh-quote figcaption strong { font-size: 14px; }
.kh-quote figcaption small { font-size: 12px; color: var(--kh-muted); }
.kh-team { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.kh-person { text-align: center; }
.kh-person img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--kh-r); background: var(--kh-muted-bg); }
.kh-person h3 { margin-top: 12px !important; font-size: 16px; font-weight: 600; line-height: 1.3; }
.kh-person p { font-size: 13px !important; color: var(--kh-muted); }

/* ---------- Contact ---------- */
.kh-contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: stretch; }
.kh-channels { display: grid; gap: 12px; }
.kh-channel { display: flex !important; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--kh-bg); border: 1px solid var(--kh-border); border-radius: var(--kh-r); box-shadow: var(--kh-shadow-sm); }
.kh-channel i { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--kh-primary-soft); color: var(--kh-primary-text); font-size: 18px; }
.kh-channel span { display: grid !important; gap: 2px; min-width: 0; }
.kh-channel small { font-size: 13px; color: var(--kh-muted); }
.kh-channel strong, .kh-channel a { font-size: 15px; font-weight: 500; color: var(--kh-fg); overflow-wrap: anywhere; }
.kh-channel a:hover { color: var(--kh-primary-text); }
.kh-map { min-height: 420px; border-radius: var(--kh-r); overflow: hidden; border: 1px solid var(--kh-border); background: var(--kh-muted-bg); }
.kh-map iframe { display: block; min-height: 420px; }

/* ---------- Footer ---------- */
.kh-footer { background: var(--kh-subtle-bg); border-top: 1px solid var(--kh-border); color: var(--kh-muted); padding: 56px 0 0; font-size: 14px; line-height: 1.6; }
.kh-footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.kh-footer__logo img { height: 28px; width: auto; display: block; }
.kh-footer__tag { margin: 14px 0 16px !important; max-width: 34ch; }
.kh-footer__contact li { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.kh-footer__contact i { color: var(--kh-muted); }
.kh-footer a { color: var(--kh-muted); text-decoration: none; }
.kh-footer a:hover { color: var(--kh-fg); }
.kh-footer__social { display: flex; gap: 8px; margin-top: 16px !important; }
.kh-footer__social a { width: 36px; height: 36px; display: inline-flex !important; align-items: center; justify-content: center; border: 1px solid var(--kh-border); border-radius: var(--kh-r-sm); background: var(--kh-bg); color: var(--kh-fg-2); }
.kh-footer__social a:hover { border-color: var(--kh-primary); color: var(--kh-primary-text); }
.kh-footer h2 { font-family: var(--kh-head); color: var(--kh-fg); font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.kh-footer__col li { margin-bottom: 8px; }
.kh-footer__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding: 20px 0 28px; border-top: 1px solid var(--kh-border); font-size: 13px; }

/* ---------- Auth (login, register, reset) ---------- */
.kh-auth { min-height: 100vh; background: var(--kh-subtle-bg); }
.kh-auth__wrap { min-height: calc(100vh - var(--kh-nav-h)); display: flex; align-items: center; justify-content: center; padding: 48px 16px; }
.kh-auth__card { width: 100%; max-width: 420px; padding: 32px 28px; background: var(--kh-bg); border: 1px solid var(--kh-border); border-radius: var(--kh-r); box-shadow: var(--kh-shadow); }
.kh-auth__logo { display: flex; justify-content: center; margin-bottom: 20px; }
.kh-auth__logo img { height: 32px; width: auto; }
.kh-auth__card h1 { text-align: center; font-size: 24px; font-weight: 700; }
.kh-auth__lead { margin: 6px 0 24px !important; text-align: center; color: var(--kh-muted); font-size: 14px; }
.kh-auth__switch { margin-top: 20px !important; text-align: center; font-size: 14px; color: var(--kh-muted); }
.kh-auth__switch a { color: var(--kh-primary-text); font-weight: 600; }
.kh-auth__switch a:hover { text-decoration: underline !important; }
.kh-fields { display: grid; gap: 16px; }
.kh-field { display: grid; gap: 6px; }
.kh-field label { margin: 0; font-size: 14px; font-weight: 500; color: var(--kh-fg); }
.kh-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.kh-field__link { font-size: 13px; color: var(--kh-primary-text) !important; }
.kh-field__link:hover { text-decoration: underline !important; }
.kh-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: var(--kh-bg);
  border: 1px solid var(--kh-border);
  border-radius: var(--kh-r-sm);
  box-shadow: var(--kh-shadow-sm);
  font-family: var(--kh-body);
  font-size: 15px;
  color: var(--kh-fg);
  transition: border-color var(--kh-fast), box-shadow var(--kh-fast);
}
.kh-field input:focus { outline: none; border-color: var(--kh-primary); box-shadow: 0 0 0 3px rgba(238, 151, 51, .2) !important; }
.kh-field.is-invalid input { border-color: var(--kh-danger); }
.kh-field__help { font-size: 12px !important; color: var(--kh-muted); }
.kh-field__error { font-size: 13px !important; color: var(--kh-danger); }
.kh-password { position: relative; }
.kh-password input { padding-right: 96px; }
.kh-password__toggle { position: absolute; top: 4px; right: 4px; bottom: 4px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; font-family: var(--kh-body); font-size: 13px; font-weight: 500; color: var(--kh-muted); cursor: pointer; }
.kh-password__toggle:hover { background: var(--kh-muted-bg); color: var(--kh-fg); }
.kh-honeypot { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.kh-alert { margin-bottom: 16px; padding: 10px 12px; border-radius: var(--kh-r-sm); border: 1px solid; font-size: 14px; }
.kh-alert--error { color: var(--kh-danger); background: #fef2f2; border-color: #fecaca; }
.kh-alert--success { color: var(--kh-success); background: #f0fdf4; border-color: #bbf7d0; }

/* ---------- Motion ---------- */
.kh-motion [data-reveal] { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .kh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kh-detail__grid { grid-template-columns: 1fr; }
  .kh-buy { position: static; }
  .kh-about { grid-template-columns: 1fr; gap: 40px; }
  .kh-team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kh-contact__grid { grid-template-columns: 1fr; }
  .kh-footer__top { grid-template-columns: 1fr 1fr; }
  .kh-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .kh-nav__toggle { display: inline-block; }
  .kh-menu { display: none; }
  .kh-nav__links {
    position: fixed;
    top: var(--kh-nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--kh-bg);
    border-bottom: 1px solid var(--kh-border);
    box-shadow: var(--kh-shadow-lg);
    transform: translateY(-6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--kh-base), transform var(--kh-base) var(--kh-ease), visibility var(--kh-base);
  }
  .kh-nav.is-open .kh-nav__links { opacity: 1; transform: none; visibility: visible; }
  .kh-nav__links a { padding: 12px 8px; font-size: 16px; }
  .kh-nav__mobile-only { display: block !important; }
  .kh-nav__actions { margin-left: auto; }
}
@media (max-width: 767px) {
  .kh-wrap { padding: 0 16px; }
  .kh-section { padding: 56px 0; }
  .kh-hero { padding: 64px 0 56px; }
  .kh-hero__lead { font-size: 16px; }
  .kh-hero__actions .kh-btn { flex: 1 1 100%; }
  .kh-stats { margin-top: 40px; }
  .kh-stat strong { font-size: 22px; }
  .kh-pagehero { padding: 48px 0 40px; }
  .kh-grid { grid-template-columns: 1fr; }
  .kh-heading { margin-bottom: 32px; }
  .kh-team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .kh-profile-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 24px 20px; }
  .kh-profile-card .kh-chips, .kh-profile-card .kh-meta { justify-content: center; }
  .kh-profile-card .kh-prose { text-align: left; }
  .kh-footer__top { grid-template-columns: 1fr; gap: 28px; }
  .kh-footer__bottom { flex-direction: column; }
  .kh-detail { padding-bottom: 112px; }
  .kh-buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--kh-bg);
    border-top: 1px solid var(--kh-border);
    box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .25);
  }
  .kh-buybar .kh-price { font-size: 18px; }
  body:has(.kh-buybar) .scroll-top { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .kh-page *, .kh-nav *, .kh-footer * { transition: none !important; animation: none !important; }
  .kh-card:hover, .kh-mentor:hover { transform: none; }
}
