/* ==========================================================================
   OUR FUTURE — App prototype components
   Course management, course editor, video player, live sessions.
   Reuses the dashboard app shell (dashboard.css) + design tokens. RTL-native.
   ========================================================================== */

.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-2); }
.page-head h1 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.8rem); }
.page-head p { color: var(--color-text-soft); margin-top: 2px; font-size: var(--fs-sm); }
.crumb { display: inline-flex; gap: .4rem; font-size: var(--fs-xs); color: var(--color-text-muted); margin-bottom: var(--s-3); }
.crumb a:hover { color: var(--brand-600); }

/* ----- Cover thumbnails (shared) -------------------------------------- */
.cover { aspect-ratio: 16/9; border-radius: var(--r-md); display: grid; place-items: center; color: #fff; border: 1px solid var(--color-border); }
.cover svg { width: 34%; height: 34%; opacity: .92; }
.thumb--guide { background: var(--grad-brand-deep); }
.thumb--product { background: linear-gradient(150deg, var(--brand-700), var(--teal-400)); }
.thumb--growth { background: var(--grad-warm); }
.thumb--nelc { background: linear-gradient(150deg, #1d4ed8, var(--teal-400)); }
.thumb--story { background: linear-gradient(150deg, var(--violet-400), var(--brand-500)); }

/* ----- Course grid ---------------------------------------------------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s-5); }
.course-card { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs); transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2); display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.course-card .cover { border-radius: 0; border: none; }
.course-card__body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.course-card__title { font-weight: var(--weight-bold); font-size: 1.05rem; color: var(--color-heading); }
.course-card__meta { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-xs); color: var(--color-text-muted); }
.course-card__meta .pill { padding: .15rem .55rem; font-size: .7rem; }
.course-card__actions { display: flex; gap: var(--s-2); margin-top: auto; padding-top: var(--s-2); }
.course-card__actions .btn { flex: 1; }

/* ----- Empty state ---------------------------------------------------- */
.empty { text-align: center; padding: var(--s-9) var(--s-5); border: 1.5px dashed var(--line-strong); border-radius: var(--r-xl); background: var(--surface); }
.empty__icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--s-4); background: var(--brand-50); color: var(--brand-600); }
.empty__icon svg { width: 30px; height: 30px; }
.empty h3 { font-size: 1.2rem; }
.empty p { color: var(--color-text-soft); margin: var(--s-2) auto var(--s-5); max-width: 36ch; }

/* ----- Course editor -------------------------------------------------- */
.editor { display: grid; grid-template-columns: 1fr 320px; gap: var(--s-5); align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.panel-card { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-xs); }
.panel-card h3 { font-size: 1.05rem; margin-bottom: var(--s-4); }

.lesson-list { display: flex; flex-direction: column; }
.lesson-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-2); border-block-end: 1px solid var(--color-border); }
.lesson-row:last-child { border-block-end: none; }
.lesson-row__num { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-weight: var(--weight-bold); font-size: var(--fs-xs); flex: none; }
.lesson-row__main { flex: 1; min-width: 0; }
.lesson-row__title { font-weight: var(--weight-semibold); font-size: var(--fs-sm); color: var(--color-heading); }
.lesson-row__sub { font-size: var(--fs-xs); color: var(--color-text-muted); display: flex; gap: var(--s-2); align-items: center; }
.lesson-row__sub .type { display: inline-flex; align-items: center; gap: .25rem; }
.lesson-row__sub svg { width: 13px; height: 13px; }
.lesson-row__actions { display: flex; gap: var(--s-1); flex: none; }
.icon-mini { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-500); border: 1px solid transparent; transition: background-color var(--dur-2), color var(--dur-2); }
.icon-mini:hover { background: var(--surface-2); color: var(--brand-700); }
.icon-mini.danger:hover { color: var(--state-danger); background: color-mix(in srgb, var(--state-danger) 8%, white); }
.icon-mini svg { width: 17px; height: 17px; }

.field + .field { margin-top: var(--s-4); }

/* ----- Video player --------------------------------------------------- */
.player { display: grid; grid-template-columns: 1fr 320px; gap: var(--s-5); align-items: start; }
@media (max-width: 900px) { .player { grid-template-columns: 1fr; } }
.player__media { aspect-ratio: 16/9; background: #04211b; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-md); }
.player__frame { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player__empty { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.6); font-size: var(--fs-sm); }
.player__title { font-size: 1.3rem; font-weight: var(--weight-bold); margin-top: var(--s-5); }
.player__notes { color: var(--color-text-soft); margin-top: var(--s-2); }
.player__nav { display: flex; gap: var(--s-3); margin-top: var(--s-5); }

.curriculum { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); overflow: hidden; position: sticky; inset-block-start: calc(var(--header-h) + 1rem); }
.curriculum__head { padding: var(--s-4); border-bottom: 1px solid var(--color-border); background: var(--surface-2); }
.curriculum__head b { font-size: var(--fs-sm); }
.curriculum__head .bar { height: 6px; border-radius: var(--r-pill); background: var(--ink-100); margin-top: var(--s-2); overflow: hidden; }
.curriculum__head .bar i { display: block; height: 100%; background: var(--grad-brand); }
.curr-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); width: 100%; text-align: start; border-block-end: 1px solid var(--color-border); transition: background-color var(--dur-2); }
.curr-item:last-child { border-block-end: none; }
.curr-item:hover { background: var(--surface-2); }
.curr-item.is-active { background: var(--brand-50); }
.curr-item__ic { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ink-100); color: var(--ink-500); }
.curr-item.is-active .curr-item__ic { background: var(--brand-600); color: #fff; }
.curr-item.is-done .curr-item__ic { background: var(--brand-100); color: var(--brand-700); }
.curr-item__ic svg { width: 14px; height: 14px; }
.curr-item__t { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: var(--weight-medium); color: var(--color-heading); }
.curr-item__d { font-size: var(--fs-xs); color: var(--color-text-muted); flex: none; }

/* ----- Live sessions -------------------------------------------------- */
.session-list { display: grid; gap: var(--s-4); }
.session-card { display: flex; align-items: center; gap: var(--s-4); background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); box-shadow: var(--shadow-xs); }
.session-card__ic { width: 48px; height: 48px; border-radius: var(--r-md); flex: none; display: grid; place-items: center; background: var(--grad-brand); color: #fff; }
.session-card__ic svg { width: 24px; height: 24px; }
.session-card__main { flex: 1; min-width: 0; }
.session-card__title { font-weight: var(--weight-semibold); }
.session-card__when { font-size: var(--fs-sm); color: var(--color-text-soft); display: flex; align-items: center; gap: var(--s-2); margin-top: 2px; }
.session-card__actions { display: flex; gap: var(--s-2); flex: none; }

.room { margin-top: var(--s-5); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-lg); background: #04211b; }
.room__bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); background: var(--brand-950); color: #fff; }
.room__bar .dot--live { width: 8px; height: 8px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 0 0 rgba(255,90,90,.6); animation: pulse-dot 2s infinite; }
.room__bar b { font-size: var(--fs-sm); }
.room__bar .btn { margin-inline-start: auto; }
.room__frame { width: 100%; height: 540px; border: 0; display: block; }
@media (max-width: 700px) { .room__frame { height: 420px; } }

/* ----- Modal ---------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s-5);
  background: rgba(10,26,23,.5); opacity: 0; visibility: hidden; transition: opacity var(--dur-2), visibility var(--dur-2); }
.modal.is-open { opacity: 1; visibility: visible; }
.modal__panel { width: 100%; max-width: 460px; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-xl);
  padding: var(--s-6); transform: translateY(10px) scale(.98); transition: transform var(--dur-3) var(--ease-spring); max-height: 90vh; overflow-y: auto; }
.modal.is-open .modal__panel { transform: none; }
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-5); }
.modal__head h3 { font-size: 1.2rem; }
.modal__close { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-500); }
.modal__close:hover { background: var(--surface-2); }
.modal__close svg { width: 18px; height: 18px; }
.modal__foot { display: flex; gap: var(--s-3); margin-top: var(--s-6); }
.modal__foot .btn { flex: 1; }

/* ----- Toolbar / segmented ------------------------------------------- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--color-border); border-radius: var(--r-pill); padding: 3px; }
.seg button { padding: .4rem .9rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--weight-semibold); color: var(--ink-500); }
.seg button.is-active { background: var(--surface); color: var(--brand-700); box-shadow: var(--shadow-xs); }

/* ----- Tests & assessment (TC-3) -------------------------------------- */
/* Editor: exam panel */
.exam-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-4); }
.exam-meta { display: flex; gap: var(--s-4); flex-wrap: wrap; align-items: flex-end; padding: var(--s-4); background: var(--surface-2); border: 1px solid var(--color-border); border-radius: var(--r-md); margin-bottom: var(--s-4); }
.exam-meta .field { margin: 0; }
.exam-meta .field .input { width: 110px; }
.q-row { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-2); border-block-end: 1px solid var(--color-border); align-items: flex-start; }
.q-row:last-child { border-block-end: none; }
.q-row__num { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-weight: var(--weight-bold); font-size: var(--fs-xs); flex: none; }
.q-row__main { flex: 1; min-width: 0; }
.q-row__q { font-weight: var(--weight-semibold); font-size: var(--fs-sm); color: var(--color-heading); }
.q-row__opts { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: .25rem .8rem; }
.q-row__opts .correct { color: var(--brand-700); font-weight: var(--weight-bold); }
.q-tag { font-size: .68rem; font-weight: var(--weight-bold); padding: .08rem .5rem; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-500); flex: none; }
.opt-edit { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
.opt-edit input[type="radio"] { accent-color: var(--brand-600); width: 18px; height: 18px; flex: none; }
.opt-edit .input { flex: 1; }

/* Learner: take the exam */
.quiz { max-width: 760px; margin-inline: auto; }
.quiz__intro { text-align: center; margin-bottom: var(--s-5); }
.quiz__q { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-xs); margin-bottom: var(--s-4); }
.quiz__qtext { font-weight: var(--weight-bold); margin-bottom: var(--s-4); line-height: 1.5; }
.quiz__qtext .n { color: var(--brand-600); margin-inline-end: .35rem; }
.opt { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1.5px solid var(--color-border); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--dur-2), background-color var(--dur-2); margin-bottom: var(--s-2); }
.opt:last-child { margin-bottom: 0; }
.opt:hover { border-color: var(--brand-300); }
.opt input { accent-color: var(--brand-600); width: 18px; height: 18px; flex: none; }
.opt__t { flex: 1; min-width: 0; }
.opt.is-picked { border-color: var(--brand-500); background: var(--brand-50); }
.opt.is-correct { border-color: var(--brand-500); background: var(--brand-50); }
.opt.is-wrong { border-color: var(--state-danger); background: color-mix(in srgb, var(--state-danger) 7%, white); }
.opt .mark { margin-inline-start: auto; font-size: var(--fs-xs); font-weight: var(--weight-bold); flex: none; }
.opt.is-correct .mark { color: var(--brand-700); }
.opt.is-wrong .mark { color: var(--state-danger); }
.quiz.is-graded .opt { cursor: default; }
.quiz-score { text-align: center; padding: var(--s-6); border-radius: var(--r-lg); border: 1px solid var(--color-border); background: var(--surface); box-shadow: var(--shadow-md); margin-bottom: var(--s-5); }
.quiz-score .ring { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--s-3); font-weight: 800; font-size: 1.5rem; font-family: var(--font-mono); border: 4px solid currentColor; }
.quiz-score.pass { color: var(--brand-700); }
.quiz-score.fail { color: var(--state-danger); }
.quiz-score .ring span { color: var(--ink-900); }
.quiz-score.pass .ring { background: var(--brand-50); }
.quiz-score.fail .ring { background: color-mix(in srgb, var(--state-danger) 10%, white); }
.quiz-score h2 { font-size: 1.35rem; color: var(--color-heading); }
.quiz-score p { color: var(--color-text-soft); margin-top: var(--s-2); }
.quiz-actions { display: flex; gap: var(--s-3); justify-content: center; flex-wrap: wrap; margin-top: var(--s-5); }

/* ----- People & operations (TC-7) ------------------------------------ */
.stat-row { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.stat-mini { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-md); padding: var(--s-3) var(--s-5); box-shadow: var(--shadow-xs); display: flex; flex-direction: column; min-width: 108px; }
.stat-mini b { font-size: 1.5rem; font-weight: 800; color: var(--brand-700); line-height: 1.1; }
.stat-mini span { font-size: var(--fs-xs); color: var(--color-text-muted); }
.person { display: flex; align-items: center; gap: var(--s-3); }
.person b { display: block; font-size: var(--fs-sm); color: var(--color-heading); }
.person small { color: var(--color-text-muted); font-size: var(--fs-xs); }
.ava { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--grad-brand); font-size: var(--fs-sm); }
.ava--sm { width: 30px; height: 30px; font-size: var(--fs-xs); }

.cohort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: var(--s-5); }
.cohort-card { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.cohort-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.cohort-card__title { font-weight: 700; color: var(--color-heading); }
.cohort-card__course { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; }
.cohort-meta { display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-sm); color: var(--color-text-soft); }
.cohort-meta .row { display: flex; align-items: center; gap: var(--s-2); }
.cohort-meta svg { width: 15px; height: 15px; color: var(--ink-500); flex: none; }
.cap-bar { height: 6px; border-radius: var(--r-pill); background: var(--ink-100); overflow: hidden; margin-top: 2px; }
.cap-bar i { display: block; height: 100%; background: var(--grad-brand); }
.mode-badge { font-size: .7rem; font-weight: 700; padding: .15rem .6rem; border-radius: var(--r-pill); white-space: nowrap; }
.mode-badge.online { background: var(--brand-50); color: var(--brand-700); }
.mode-badge.inperson { background: var(--accent-100, #fdeccd); color: var(--accent-700, #92400e); }
.mode-badge.hybrid { background: var(--violet-100, #ede9fe); color: var(--violet-700, #6d28d9); }
.cohort-card__actions { display: flex; gap: var(--s-2); margin-top: auto; padding-top: var(--s-2); }
.cohort-card__actions .btn { flex: 1; }
.roster__item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-block-end: 1px solid var(--color-border); }
.roster__item:last-child { border-block-end: none; }
.roster__item .person { flex: 1; min-width: 0; }
.enroll-pick { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-2); }

/* ----- Marketing (TC-6) ----------------------------------------------- */
.campaign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-5); }
.campaign-card { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); padding: var(--s-5); }
.campaign-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.campaign-card__name { font-weight: 700; color: var(--color-heading); }
.campaign-card__aud { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; }
.chan { font-size: .7rem; font-weight: 700; padding: .15rem .6rem; border-radius: var(--r-pill); white-space: nowrap; }
.chan.email { background: var(--brand-50); color: var(--brand-700); }
.chan.social { background: var(--violet-100, #ede9fe); color: var(--violet-700, #6d28d9); }
.chan.landing { background: var(--accent-100, #fdeccd); color: var(--accent-700, #92400e); }
.chan.sms { background: #e0f2fe; color: #0369a1; }
.status-dot { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-xs); font-weight: 600; color: var(--color-text-soft); }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; }
.status-dot.active::before { background: #16a34a; }
.status-dot.draft::before { background: #94a3b8; }
.funnel { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-4) 0; }
.funnel__row { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-xs); }
.funnel__label { width: 56px; color: var(--color-text-muted); flex: none; }
.funnel__track { flex: 1; height: 8px; border-radius: var(--r-pill); background: var(--ink-100); overflow: hidden; }
.funnel__track i { display: block; height: 100%; background: var(--grad-brand); }
.funnel__val { width: 96px; text-align: end; flex: none; font-variant-numeric: tabular-nums; color: var(--color-heading); font-weight: 600; }
.campaign-card__actions { display: flex; gap: var(--s-2); }
.coupon-code { font-family: var(--font-mono); font-weight: 700; letter-spacing: .04em; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: .2rem .6rem; display: inline-block; }
.coupon-off { font-weight: 700; color: var(--brand-700); }
.cmp-rev { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--color-border); font-size: var(--fs-xs); color: var(--color-text-muted); }
.cmp-rev b { color: var(--brand-700); font-size: var(--fs-sm); }

/* ----- Public academy site + builder (TC-1) --------------------------- */
.ac-topbar { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--color-border); position: sticky; inset-block-start: 0; background: var(--surface); z-index: 10; }
.ac-topbar__name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink-900); }
.ac-topbar__sp { flex: 1; }
@media (max-width: 640px) { .ac-topbar { flex-wrap: wrap; gap: var(--s-2); } .ac-topbar__sp { flex-basis: 100%; height: 0; } .ac-topbar .btn { padding-inline: var(--s-3); } }
.ac-hero { background: linear-gradient(150deg, var(--ac, var(--brand-600)), color-mix(in srgb, var(--ac, var(--brand-700)) 55%, #04211b)); color: #fff; padding: clamp(3rem, 2rem + 6vw, 6rem) var(--s-5); text-align: center; }
.ac-hero__in { max-width: 760px; margin-inline: auto; }
.ac-eyebrow { display: inline-block; font-size: var(--fs-sm); font-weight: 700; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; opacity: .88; margin-bottom: var(--s-3); }
.ac-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 1.2rem + 3vw, 3rem); line-height: 1.15; color: #fff; }
.ac-hero p { font-size: clamp(1rem, .95rem + .4vw, 1.2rem); opacity: .92; margin-top: var(--s-4); }
.ac-cta { display: inline-block; margin-top: var(--s-6); background: #fff; color: var(--ac, var(--brand-700)); font-weight: 700; padding: .8rem 1.7rem; border-radius: var(--r-pill); box-shadow: var(--shadow-md); transition: transform var(--dur-2); }
.ac-cta:hover { transform: translateY(-2px); }
.ac-section { max-width: 1100px; margin-inline: auto; padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) var(--s-5); }
.ac-section h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem); text-align: center; margin-bottom: var(--s-6); }
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: var(--s-5); }
.ac-course { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; transition: transform var(--dur-2), box-shadow var(--dur-2); }
.ac-course:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ac-course .cover { border-radius: 0; border: none; }
.ac-course__b { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.ac-course__b b { font-size: 1.05rem; color: var(--color-heading); }
.ac-course__b p { font-size: var(--fs-sm); color: var(--color-text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-course__meta { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: auto; padding-top: var(--s-1); }
/* Default value-props band + coming-soon empty state (brand-new academy) */
.ac-feats { max-width: 1000px; margin-inline: auto; padding: clamp(2rem, 1.4rem + 2vw, 3.25rem) var(--s-5) 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-5); }
.ac-feat { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.ac-feat__i { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; background: color-mix(in srgb, var(--brand-600) 12%, var(--surface)); color: var(--brand-700); margin-bottom: var(--s-1); }
.ac-feat__i svg { width: 26px; height: 26px; }
.ac-feat b { font-family: var(--font-display); font-size: 1.05rem; color: var(--color-heading); }
.ac-feat__d { font-size: var(--fs-sm); color: var(--color-text-soft); max-width: 32ch; line-height: 1.75; }
.ac-empty { text-align: center; padding: clamp(2.25rem, 1.5rem + 3vw, 3.75rem) var(--s-5); border: 1px dashed var(--color-border); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.ac-empty svg { width: 42px; height: 42px; color: var(--brand-600); opacity: .85; margin-bottom: var(--s-2); }
.ac-empty h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--color-heading); }
.ac-empty p { font-size: var(--fs-sm); color: var(--color-text-soft); max-width: 46ch; line-height: 1.8; }
.ac-about { text-align: center; max-width: 760px; }
.ac-about p { color: var(--color-text-soft); font-size: 1.05rem; line-height: 1.85; }
.ac-foot { text-align: center; padding: var(--s-6); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: var(--fs-sm); }

/* builder */
.sb-grid { display: grid; grid-template-columns: 390px 1fr; gap: var(--s-5); align-items: start; }
@media (max-width: 1000px) { .sb-grid { grid-template-columns: 1fr; } }
.sb-preview { border: 1px solid var(--color-border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); position: sticky; inset-block-start: calc(var(--header-h) + 1rem); background: var(--surface); }
.sb-preview__bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-4); background: var(--surface-2); border-bottom: 1px solid var(--color-border); font-size: var(--fs-xs); color: var(--color-text-muted); }
.sb-preview__bar .dots { display: flex; gap: 5px; }
.sb-preview__bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: #e2e8f0; display: block; }
.sb-frame { height: 620px; overflow-y: auto; }
.sb-frame .ac-hero { padding: 2.5rem var(--s-5); }
.sb-frame .ac-section { padding: 2rem var(--s-5); }
.sb-frame .ac-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.swatches { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px var(--color-border); }
.swatch.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--ink-900); }
.feat-pick { display: flex; flex-direction: column; gap: var(--s-2); }

/* ----- Public catalog + course detail (TC-2) -------------------------- */
.cat-head { background: linear-gradient(150deg, var(--brand-700), var(--brand-950)); color: #fff; padding: clamp(2.5rem, 1.5rem + 4vw, 4rem) var(--s-5) calc(var(--s-7) + var(--s-6)); text-align: center; }
.cat-head h1 { color: #fff; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }
.cat-head p { opacity: .9; margin-top: var(--s-2); }
.cat-bar { max-width: 1100px; margin: calc(-1 * var(--s-7)) auto 0; padding: var(--s-4); background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; position: relative; z-index: 2; }
.cat-bar .select { min-width: 132px; }
.cat-bar .search { flex: 1; min-width: 200px; }
.cat-wrap { max-width: 1100px; margin-inline: auto; padding: var(--s-6) var(--s-5) var(--s-9); }
.cat-count { color: var(--color-text-muted); font-size: var(--fs-sm); margin-bottom: var(--s-4); }
.badge-row { display: flex; gap: var(--s-2); flex-wrap: wrap; align-items: center; }
.lvl-badge { font-size: .7rem; font-weight: 700; padding: .12rem .55rem; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-500); }
.price-tag { font-weight: 800; color: var(--brand-700); }
.price-free { color: var(--brand-700); font-weight: 800; }

.cd-wrap { max-width: 1000px; margin-inline: auto; padding: var(--s-6) var(--s-5) var(--s-9); }
.cd-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--s-6); align-items: start; }
@media (max-width: 860px) { .cd-grid { grid-template-columns: 1fr; } }
.cd-cover { aspect-ratio: 16/9; border-radius: var(--r-lg); }
.cd-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.2rem); margin: var(--s-4) 0 var(--s-3); }
.cd-desc { color: var(--color-text-soft); font-size: 1.05rem; line-height: 1.85; }
.cd-card { background: var(--surface); border: 1px solid var(--color-border); border-radius: var(--r-lg); box-shadow: var(--shadow-md); padding: var(--s-5); position: sticky; inset-block-start: var(--s-5); }
.cd-price { font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--ink-900); }
.cd-meta-list { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-4) 0; font-size: var(--fs-sm); color: var(--color-text-soft); }
.cd-meta-list .row { display: flex; align-items: center; gap: var(--s-2); }
.cd-meta-list svg { width: 16px; height: 16px; color: var(--ink-500); flex: none; }
.cd-curric { margin-top: var(--s-7); }
.cd-curric h2 { font-size: 1.25rem; margin-bottom: var(--s-3); }
.cd-lesson { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-block-end: 1px solid var(--color-border); }
.cd-lesson:last-child { border-block-end: none; }
.cd-lesson__n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; flex: none; }
.cd-lesson__t { flex: 1; font-size: var(--fs-sm); }
.cd-lesson__d { font-size: var(--fs-xs); color: var(--color-text-muted); }

/* material library rows (TC-2.4) */
.res-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border: 1px solid var(--color-border); border-radius: var(--r-md); margin-bottom: var(--s-2); transition: border-color var(--dur-2), background-color var(--dur-2); }
.res-row:last-child { margin-bottom: 0; }
.res-row:hover { border-color: var(--brand-300); background: var(--surface-2); }
.res-row__ic { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; flex: none; }
.res-row__ic svg { width: 17px; height: 17px; }
.res-row__t { flex: 1; min-width: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--color-heading); }
.res-row__dl { color: var(--ink-500); flex: none; }
.res-row__dl svg { width: 18px; height: 18px; }

/* ----- Roles & permissions (RBAC) ------------------------------------- */
.role-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); width: 100%; text-align: start; padding: var(--s-3) var(--s-4); border: 1px solid var(--color-border); border-radius: var(--r-md); margin-bottom: var(--s-2); transition: border-color var(--dur-2), background-color var(--dur-2); }
.role-item:hover { border-color: var(--brand-300); }
.role-item.is-active { border-color: var(--brand-500); background: var(--brand-50); }
.role-item__name { font-weight: var(--weight-semibold); color: var(--color-heading); font-size: var(--fs-sm); }
.role-item__meta { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: 2px; }
.lvl-chip { font-size: .66rem; font-weight: 700; padding: .1rem .5rem; border-radius: var(--r-pill); white-space: nowrap; }
.lvl-chip.platform { background: var(--violet-100, #ede9fe); color: var(--violet-700, #6d28d9); }
.lvl-chip.center { background: var(--brand-50); color: var(--brand-700); }
.lvl-chip.learner { background: var(--accent-100, #fdeccd); color: var(--accent-700, #92400e); }
.perm-groups { display: flex; flex-direction: column; gap: var(--s-5); }
.perm-group__h { font-weight: var(--weight-bold); font-size: var(--fs-sm); color: var(--brand-700); margin-bottom: var(--s-3); padding-bottom: var(--s-1); border-bottom: 1px solid var(--color-border); }
.perm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s-2) var(--s-4); }
.perm-list .checkbox { font-size: var(--fs-sm); }
.no-access { text-align: center; padding: var(--s-9) var(--s-5); border: 1.5px dashed var(--line-strong); border-radius: var(--r-xl); background: var(--surface); max-width: 520px; margin: var(--s-7) auto; }
.no-access__icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--s-4); background: color-mix(in srgb, var(--state-danger) 10%, white); color: var(--state-danger); }
.no-access__icon svg { width: 28px; height: 28px; }
.role-badge { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-xs); color: var(--color-text-soft); background: var(--surface-2); border: 1px solid var(--color-border); border-radius: var(--r-pill); padding: .2rem .6rem; }
.role-badge b { color: var(--brand-700); }
.act-as { display: inline-flex; align-items: center; gap: var(--s-2); }
.act-as select { font-size: var(--fs-xs); padding: .3rem 1.6rem .3rem .6rem; border-radius: var(--r-md); border: 1px solid var(--color-border); background: var(--surface); color: var(--color-heading); }

/* super-admin permission matrix grid */
.pmx-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--color-border); border-radius: var(--r-md); }
.pmx { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-xs); }
.pmx th, .pmx td { padding: .45rem .6rem; border-bottom: 1px solid var(--color-border); }
.pmx thead th { position: sticky; inset-block-start: 0; background: var(--surface-2); z-index: 2; text-align: center; vertical-align: bottom; font-weight: var(--weight-bold); }
.pmx tbody th.pmx-feat { position: sticky; inset-inline-start: 0; background: var(--surface); text-align: start; font-weight: var(--weight-semibold); color: var(--color-heading); z-index: 1; min-width: 190px; }
.pmx thead th.pmx-feat { inset-inline-start: 0; z-index: 3; text-align: start; }
.pmx tr.grp th { position: sticky; inset-inline-start: 0; background: var(--brand-50); color: var(--brand-700); font-weight: var(--weight-bold); text-align: start; }
.pmx td { text-align: center; }
.pmx tbody tr:hover td, .pmx tbody tr:hover th.pmx-feat { background: var(--surface-2); }
.pmx input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand-600); cursor: pointer; }
.pmx input:disabled { cursor: not-allowed; opacity: .45; }
.pmx .role-item__name { font-size: var(--fs-xs); }

/* ----- Certificate (TC-4) --------------------------------------------- */
.cert-actions { display: flex; gap: var(--s-3); justify-content: center; margin-block: var(--s-6); flex-wrap: wrap; }
.cert-frame { max-width: 880px; margin-inline: auto; aspect-ratio: 1.414 / 1; background: #fff; border: 1px solid var(--color-border); border-radius: var(--r-lg); box-shadow: var(--shadow-xl); position: relative; overflow: hidden; padding: clamp(1.25rem, .8rem + 3vw, 3.25rem); }
.cert-frame::before { content: ""; position: absolute; inset: 13px; border: 2px solid var(--brand-200); border-radius: 14px; pointer-events: none; }
.cert-frame::after { content: ""; position: absolute; inset: 19px; border: 1px solid var(--accent-300); border-radius: 10px; pointer-events: none; }
.cert-orn { position: absolute; width: 220px; height: 220px; border-radius: 50%; pointer-events: none; }
.cert-orn.tl { inset-block-start: -90px; inset-inline-start: -90px; background: radial-gradient(circle, color-mix(in srgb, var(--brand-400) 20%, transparent), transparent 70%); }
.cert-orn.br { inset-block-end: -90px; inset-inline-end: -90px; background: radial-gradient(circle, color-mix(in srgb, var(--accent-400) 22%, transparent), transparent 70%); }
.cert-inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s-2); }
.cert-logo { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-2); }
.cert-logo .logo__mark { width: 38px; height: 38px; }
.cert-logo b { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.cert-kicker { font-size: var(--fs-sm); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--brand-600); font-weight: 700; }
.cert-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem); color: var(--ink-900); letter-spacing: var(--tracking-tight); }
.cert-sub { color: var(--color-text-soft); font-size: var(--fs-sm); }
.cert-name { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.8rem); color: var(--brand-700); margin-block: var(--s-1); }
.cert-course { font-weight: 700; font-size: 1.15rem; color: var(--ink-800); max-width: 80%; }
.cert-meta { display: flex; gap: clamp(1rem, .5rem + 3vw, 3rem); margin-top: var(--s-5); flex-wrap: wrap; justify-content: center; align-items: flex-end; }
.cert-meta .col { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.cert-meta .lbl { font-size: var(--fs-xs); color: var(--color-text-muted); }
.cert-meta .val { font-weight: 700; color: var(--ink-800); border-top: 1px solid var(--line-strong); padding-top: 6px; min-width: 130px; font-family: var(--font-mono); font-size: var(--fs-sm); }
.cert-verify { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--color-text-muted); }
.cert-verify img { width: 62px; height: 62px; border-radius: 6px; border: 1px solid var(--line); }
.cert-accred { margin-top: var(--s-4); padding: var(--s-2) var(--s-4); border: 1px solid var(--line); border-radius: var(--radius-pill, 999px); background: var(--brand-50, #F0F7F4); color: var(--brand-700, #0B5C4B); font-size: var(--fs-xs); font-weight: 600; display: inline-block; }
.cert-accred b { font-family: var(--font-mono); font-weight: 700; }
.verify-result { max-width: 540px; margin: var(--s-7) auto; text-align: center; }
.verify-badge { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--s-4); }
.verify-badge svg { width: 38px; height: 38px; }
.verify-badge.ok { background: var(--brand-50); color: var(--brand-600); }
.verify-badge.bad { background: color-mix(in srgb, var(--state-danger) 12%, white); color: var(--state-danger); }
@media print { body * { visibility: hidden; } .cert-frame, .cert-frame * { visibility: visible; } .cert-frame { position: absolute; inset: 0; margin: 0; max-width: none; border: none; box-shadow: none; aspect-ratio: auto; height: 100vh; } .no-print { display: none !important; } }
