/* Katalog kursus (/browse-courses) dan detail kursus (/browse-courses/course/{type}/{slug}), desain arah-5.
   Menumpang home.css (kit .wrap .sec .h2 .lede .chip .voice .qs .chat .cta .slide-x) + token shell.css (.lp-page).
   Kontras: navy-deep di atas kuning 8,6:1; putih di atas navy-deep 15:1; gold-ink di atas putih 5,0:1;
   ink-2 di atas putih 7,9:1; ink-3 di atas putih 4,6:1; putih .82 di atas navy-deep 11:1. */

/* ===== bersama ===== */
.cr-crumb { margin-bottom: 18px !important; color: rgba(255, 255, 255, .66) !important; }
.cr-crumb a { display: inline-flex; align-items: center; min-height: 32px; color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 4px; }
@media (hover: hover) { .cr-crumb a:hover { text-decoration-color: var(--yellow); } }
.cr-crumb span { margin: 0 6px; }
.cr-voices > * { flex-basis: min(380px, 88%) !important; }
.cr-voices .voice { box-shadow: inset 0 0 0 1px var(--line-2); }
.cr-voices .voice.big { box-shadow: none; }

/* ===== katalog: pembuka navy pendek dengan kolom cari besar ===== */
.cr-hb { padding: 56px 0 64px; }
.cr-hb h1 { max-width: 16ch; }
.cr-hb .hero-sub { margin-bottom: 28px !important; }
.cr-find { position: relative; display: flex; align-items: center; gap: 8px; max-width: 640px; padding: 6px; border-radius: 999px; background: var(--paper); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); }
.cr-find > svg { flex: none; width: 20px; height: 20px; margin-left: 14px; color: var(--ink-3); }
.cr-find input { flex: 1; min-width: 0; min-height: 48px; padding: 0 8px; border: 0; background: none; font: 400 16px/1.2 var(--text); color: var(--ink); -webkit-appearance: none; appearance: none; }
.cr-find input::placeholder { color: var(--ink-3); }
.cr-find input:focus { outline: none; }
.cr-find:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
.cr-find .lp-btn { flex: none; border: 0; cursor: pointer; }

/* filter jenis program: chip bisa dipilih lebih dari satu */
.cr-list { padding-top: 48px; }
.cr-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cr-cats .chip { min-height: 44px; cursor: pointer; }
.cr-cats .chip[aria-pressed="true"] { background: var(--navy-deep); color: #fff; box-shadow: none; }
@media (hover: hover) { .cr-cats .chip[aria-pressed="false"]:hover { background: var(--navy-pale); color: var(--navy-deep); } }
.cr-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.lp-home .cr-count { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }

/* kartu: pola sama dengan daftar program Products (kolom tetap 4/3/2/1, 12 per halaman) */
.cr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; transition: opacity 160ms var(--ease); }
.cr-grid[aria-busy="true"] { pointer-events: none; }
@media (max-width: 1180px) { .cr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cr-grid { grid-template-columns: 1fr; } }
.cr-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); transition: transform 320ms var(--ease), box-shadow 220ms var(--ease); }
.cr-card figure, .cd-buy-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-deep); }
.cr-card figure svg.m, .cd-buy-img svg.m { position: absolute; width: 44%; max-width: none; right: 8%; bottom: 10%; fill: var(--navy-mid); }
.cr-card:nth-child(3n+2) figure { background: var(--navy-mid); } .cr-card:nth-child(3n+2) figure svg.m { fill: var(--yellow); }
.cr-card:nth-child(3n) figure { background: var(--navy-pale); } .cr-card:nth-child(3n) figure svg.m { fill: var(--line-2); }
.cr-card figure img, .cd-buy-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--paper); transition: transform 600ms var(--ease); }
.cr-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.cr-body .mono { color: var(--gold-ink); }
.lp-home .cr-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.24; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-body p { font-size: 14px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; font-size: 13.5px; color: var(--ink-2); }
.cr-price { display: inline-flex; align-items: baseline; gap: 8px; margin-left: auto; }
.cr-price s { font-size: 12.5px; color: var(--ink-3); }
.cr-price b { font: 700 16px/1 var(--display); letter-spacing: -.02em; color: var(--navy-deep); }
.cr-body .go { padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--navy-deep); }
.cr-body .go svg { width: 16px; height: 16px; transition: transform 220ms var(--ease); }
@media (hover: hover) { .cr-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line-2), 0 34px 60px -38px rgba(26, 32, 73, .5); } .cr-card:hover img { transform: scale(1.04); } .cr-card:hover .go svg { transform: translateX(4px); } }

/* memuat: kartu kerangka (tanpa kilau bila gerak dikurangi) */
.cr-skel { border-radius: var(--r-lg); overflow: hidden; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.cr-skel i { display: block; aspect-ratio: 16 / 9; background: var(--bg); }
.cr-skel b, .cr-skel u { display: block; height: 14px; margin: 18px 20px 0; border-radius: 6px; background: var(--bg); }
.cr-skel b { width: 40%; } .cr-skel u { width: 80%; height: 20px; margin-bottom: 64px; text-decoration: none; }
@media (prefers-reduced-motion: no-preference) { .cr-skel i, .cr-skel b, .cr-skel u { animation: cr-pulse 1.2s ease-in-out infinite; } }
@keyframes cr-pulse { 50% { opacity: .5; } }

/* kosong / galat: selalu punya jalan keluar */
.cr-state { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 28px; border-radius: var(--r-lg); background: var(--bg); }
.lp-home .cr-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.cr-state p { color: var(--ink-2); }
.cr-state .lp-btn { border: 0; cursor: pointer; }

/* halaman: target sentuh 44px, angka tabular */
.cr-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.cr-pager[hidden] { display: none; }
.cr-pg { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 999px; display: inline-grid; place-items: center; font: 600 15px/1 var(--text); font-variant-numeric: tabular-nums; color: var(--navy-deep); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.cr-pg svg { width: 16px; height: 16px; }
.cr-pg[aria-current="page"] { background: var(--navy-deep); color: #fff; box-shadow: none; }
.cr-gap { min-width: 20px; text-align: center; color: var(--ink-3); }
@media (hover: hover) { .cr-pg:not([aria-current]):hover { background: var(--navy-pale); } }

/* ===== detail: pembuka navy, panel beli menumpang di kanan ===== */
.cd-hb { padding: 56px 0 96px; }
.lp-home .cd-hb h1 { font-size: clamp(32px, 4vw, 54px); }
.cd-hb .hero-sub { margin: 20px 0 24px !important; }
.cd-org { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: #fff; }
.cd-org-logo { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: #fff; }
.cd-org-logo svg { width: 24px; height: 24px; } .cd-org-logo img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 1025px) { .cd-hb .wrap > * { max-width: calc(100% - 440px); } }

.cd-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; padding-bottom: 96px; }
.cd-col { padding-top: 40px; display: grid; gap: 48px; min-width: 0; }
.cd-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cd-facts div { padding: 14px 16px; border-radius: 14px; background: var(--bg); }
.cd-facts dt { margin-bottom: 6px; }
.cd-facts dd { margin: 0; font: 600 16px/1.3 var(--display); letter-spacing: -.015em; color: var(--navy-deep); }
.cd-block { display: grid; gap: 16px; min-width: 0; }
.lp-home .cd-h { font-size: clamp(24px, 2.4vw, 30px); font-weight: 700; }

/* isi deskripsi dari CMS (HTML bebas) */
.cd-prose { font-size: 16.5px; line-height: 1.7; color: var(--ink); overflow-wrap: anywhere; }
.cd-prose > * + * { margin-top: 14px !important; }
.lp-home .cd-prose h2, .lp-home .cd-prose h3, .lp-home .cd-prose h4 { font-size: 19px; font-weight: 600; letter-spacing: -.015em; margin-top: 24px !important; }
.cd-prose ul, .cd-prose ol { padding-left: 22px; margin: 0; display: grid; gap: 6px; }
.cd-prose a { color: var(--navy-deep); text-decoration: underline; text-underline-offset: 3px; }
.cd-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.cd-prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.cd-prose td, .cd-prose th { padding: 8px 10px; border: 1px solid var(--line); }

/* cuplikan materi: <details> asli, bisa dibuka dengan keyboard */
.cd-syl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cd-syl-p { color: var(--ink-2); font-size: 15px; margin-top: -6px !important; }
.cd-syl { border-radius: var(--r-lg); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.cd-mod + .cd-mod { border-top: 1px solid var(--line); }
.cd-mod summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 14px; min-height: 64px; padding: 14px 20px; cursor: pointer; list-style: none; }
.cd-mod summary::-webkit-details-marker { display: none; }
.cd-mod summary .mono { color: var(--gold-ink); }
.cd-mod summary b { font: 600 16px/1.3 var(--display); letter-spacing: -.015em; color: var(--navy-deep); }
.cd-mod-n { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cd-mod summary svg { width: 16px; height: 16px; color: var(--ink-3); transition: transform 220ms var(--ease); }
.cd-mod[open] summary svg { transform: rotate(180deg); }
.cd-mod summary:focus-visible { outline-offset: -3px; }
@media (hover: hover) { .cd-mod summary:hover { background: var(--bg); } }
.cd-mod ul { list-style: none; margin: 0; padding: 0 20px 14px; }
.cd-mod li { display: grid; grid-template-columns: 108px minmax(0, 1fr) 18px; align-items: center; gap: 12px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.cd-kind { font: 500 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.cd-lname { color: var(--ink); line-height: 1.4; }
.cd-lname small { display: block; margin-top: 2px; font-size: 13px; color: var(--ink-3); }
.cd-lock { width: 16px; height: 16px; color: var(--ink-3); }

.cd-cert img { width: 100%; max-width: 520px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-2); }
.cd-cert p { color: var(--ink-2); }

/* panel beli: satu tombol kuning per layar */
.cd-buy { position: sticky; top: 112px; margin-top: -200px; border-radius: var(--r-lg); background: var(--paper); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2), 0 40px 80px -44px rgba(26, 32, 73, .45); }
.cd-buy-in { padding: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.cd-price { display: grid; gap: 6px; }
.cd-price .mono { color: var(--gold-ink); }
.cd-price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cd-price b { font: 700 32px/1 var(--display); letter-spacing: -.03em; color: var(--navy-deep); }
.cd-save { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--yellow); color: var(--navy-deep); font-size: 13px; font-weight: 700; }
.cd-price s { font-size: 14.5px; color: var(--ink-3); }
.cd-acts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cd-acts form { margin: 0; }
.cd-go { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; border: 0; cursor: pointer; white-space: normal; text-align: center; line-height: 1.2; }
.cd-ghost { color: var(--navy-deep) !important; background: none; box-shadow: inset 0 0 0 1.5px var(--navy-deep); }
@media (hover: hover) { .cd-ghost:hover { background: var(--navy-pale); } }
.cd-voucher { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); transition: opacity 220ms var(--ease); }
.cd-voucher label { font-size: 14px; font-weight: 600; color: var(--navy-deep); }
.cd-voucher-row { display: flex; gap: 8px; }
.cd-voucher input[type="text"] { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 15px/1.2 var(--mono); letter-spacing: .04em; color: var(--ink); }
.cd-voucher input[type="text"]::placeholder { font-family: var(--text); letter-spacing: 0; color: var(--ink-3); }
.cd-voucher input:focus-visible { outline: 2px solid var(--navy-deep); outline-offset: 2px; }
.cd-voucher button { flex: none; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--navy-deep); color: #fff; font-weight: 600; font-size: 14.5px; text-align: center; }
.cd-voucher button:disabled, .cd-voucher input:disabled { opacity: .55; cursor: default; }
.cd-vmsg { min-height: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.cd-vmsg:empty { display: none; }
.cd-vmsg.ok { color: #166534; } /* 7,1:1 di atas putih */
.cd-vmsg.bad { color: #B42318; } /* 6,1:1 di atas putih */
.cd-ask { font-size: 14px; color: var(--ink-2); }
.cd-ask .lnk { font-size: 14px; }
.cd-topics { margin-top: 28px; }
.cd-topics + .qs { margin-top: 16px; }

@media (max-width: 1024px) {
  .cd-hb { padding-bottom: 88px; }
  .cd-main { grid-template-columns: 1fr; gap: 0; }
  .cd-buy { position: static; order: -1; margin-top: -56px; max-width: 560px; }
  .cd-buy-img { aspect-ratio: 21 / 9; }
}
@media (max-width: 900px) {
  .cr-hb { padding: 36px 0 48px; }
  .cr-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -24px; padding: 0 24px 4px; }
  .cr-cats::-webkit-scrollbar { display: none; }
  .cr-cats .chip { flex: none; }
  .cd-hb { padding-top: 36px; }
  .cd-main { padding-bottom: 72px; } .cd-col { gap: 40px; }
}
@media (max-width: 560px) {
  .cr-find { flex-wrap: wrap; border-radius: 20px; padding: 6px 6px 8px; }
  .cr-find input { flex-basis: calc(100% - 50px); }
  .cr-find .lp-btn { width: 100%; justify-content: center; }
  .cd-mod li { grid-template-columns: minmax(0, 1fr) 18px; gap: 2px 12px; }
  .cd-kind { grid-column: 1 / -1; }
  .cd-mod summary { grid-template-columns: minmax(0, 1fr) auto auto; padding: 14px 16px; }
  .cd-mod summary .mono { grid-column: 1 / -1; }
  .cd-mod ul { padding: 0 16px 12px; }
}
@media (prefers-reduced-motion: reduce) { .cr-grid, .cr-card, .cd-voucher { transition: none !important; } }
.cd-more { justify-self: start; }
.cd-more svg { width: 16px; height: 16px; }
