/* =========================================================
   TABISABA Academy — Halaman Detail Program Peserta (/academy/saya/:slug),
   sertifikat (/academy/sertifikat/:code), Kelas Saya, dan editor program.
   Hanya kelas ms-*, cert-*, acm-*, ae-* (tidak mengubah komponen global).
   ========================================================= */

/* ---------- Kerangka ---------- */
.ms { padding-top: 0; }
.ms-head { margin: 0 calc(-1 * var(--space-4)); position: sticky; }
.ms-head__actions { display: inline-flex; gap: 2px; }
.ms-menu { position: absolute; right: var(--space-3); top: calc(100% - 4px); z-index: 25; min-width: 220px; padding: 6px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); }
.ms-menu__item { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--color-text); font-weight: var(--weight-semibold); text-decoration: none; }
.ms-menu__item:hover { background: var(--color-primary-soft); text-decoration: none; }
.ms-menu__item .icon { width: 18px; height: 18px; color: var(--color-primary); }
.ms-body { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-4); }
.ms-body > .notice { margin: 0; }

/* ---------- Banner ---------- */
.ms-banner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-xl); background: var(--ux-band, var(--gradient-header)); color: #fff; box-shadow: var(--ux-card-shadow, var(--shadow-md)); overflow: hidden; }
.ms-banner__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ms-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-full); background: var(--ux-gold-soft, var(--color-gold-soft)); color: #7a5410; font-size: var(--text-xs); font-weight: var(--weight-extrabold); }
.ms-pill .icon { width: 14px; height: 14px; }
.ms-banner__title { margin: 0; font-size: var(--text-xl); font-weight: var(--weight-extrabold); line-height: 1.2; color: #fff; overflow-wrap: anywhere; }
.ms-banner__desc { margin: 0; font-size: var(--text-sm); line-height: 1.45; color: rgba(255, 255, 255, 0.86); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ms-banner__who { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--ux-gold, var(--color-gold)); }
.ms-banner__who .icon { width: 16px; height: 16px; }
/* Poster utuh (rasio asli, tidak dipotong) */
.ms-banner__img { flex: none; display: block; width: 34%; max-width: 170px; height: auto; max-height: 220px; object-fit: contain; border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.08); }

/* ---------- Status ---------- */
.ms-status { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid #cfe3da; border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--ux-card-shadow, var(--shadow-sm)); }
.ms-status__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-button); color: #fff; }
.ms-status__icon .icon { width: 22px; height: 22px; }
.ms-status__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-status__text strong { font-size: var(--text-base); }
.ms-status__text > span:not(.ms-chip) { font-size: var(--text-sm); color: var(--color-text-muted); }
.ms-status__act { flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 76px; min-height: 60px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-cream); color: var(--color-primary); font: inherit; font-size: var(--text-xs); font-weight: var(--weight-bold); text-align: center; text-decoration: none; cursor: pointer; }
.ms-status__act:hover { border-color: var(--color-primary); text-decoration: none; }
.ms-status__act .icon { width: 22px; height: 22px; }
.ms-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 9px; border-radius: var(--radius-full); background: var(--color-primary-soft); color: var(--color-primary); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.ms-chip--gray { background: #eef0ec; color: #55625c; }
.ms-chip--red { background: var(--color-danger-soft); color: var(--color-danger); }
.ms-chip--live { background: #fde8e7; color: #b42318; }

/* ---------- Info program ---------- */
.ms-info { margin: 0; padding: var(--space-2) var(--space-3); list-style: none; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.ms-row { display: grid; grid-template-columns: 24px minmax(88px, 34%) 1fr; align-items: start; gap: var(--space-2); padding: 9px 0; font-size: var(--text-sm); }
.ms-row + .ms-row { border-top: 1px dashed var(--color-border); }
.ms-row__icon { display: inline-flex; color: var(--color-primary); }
.ms-row__icon .icon { width: 18px; height: 18px; }
.ms-row__label { font-weight: var(--weight-bold); color: var(--color-text); }
.ms-row__value { color: var(--color-text); overflow-wrap: anywhere; }
.ms-maplink { display: inline-flex; margin-left: 4px; font-weight: var(--weight-bold); white-space: nowrap; }

/* ---------- Aksi utama ---------- */
.ms-continue { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 64px; padding: var(--space-3) var(--space-4); border: 0; border-radius: var(--radius-lg); background: var(--gradient-primary); color: #fff; font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow-button); }
.ms-continue:hover { filter: brightness(1.05); }
.ms-continue__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.ms-continue__icon .icon { width: 20px; height: 20px; }
.ms-continue__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-continue__text strong { font-size: var(--text-base); }
.ms-continue__text small { font-size: var(--text-xs); color: rgba(255, 255, 255, 0.88); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-continue > .icon { flex: none; width: 20px; height: 20px; }
.ms-note { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-gold-soft); color: #6d4c12; font-size: var(--text-sm); line-height: 1.45; }
.ms-note .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.ms-note > span { flex: 1; min-width: 0; }
.ms-join { min-height: 52px; font-size: var(--text-base); }

.ms-progress { display: flex; flex-direction: column; gap: 8px; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.ms-progress__head { display: flex; align-items: center; justify-content: space-between; font-weight: var(--weight-bold); }
.ms-progress__head span { display: inline-flex; align-items: center; gap: 8px; }
.ms-progress__head .icon { width: 18px; height: 18px; color: var(--color-primary); }
.ms-progress__head strong { color: var(--color-primary); font-size: var(--text-lg); }
.ms-progress small { color: var(--color-text-muted); font-size: var(--text-xs); }
.ms-bar { appearance: none; -webkit-appearance: none; width: 100%; height: 10px; border: 0; border-radius: var(--radius-full); background: #e7ece8; overflow: hidden; }
.ms-bar::-webkit-progress-bar { background: #e7ece8; border-radius: var(--radius-full); }
.ms-bar::-webkit-progress-value { background: var(--gradient-primary); border-radius: var(--radius-full); }
.ms-bar::-moz-progress-bar { background: var(--color-button); border-radius: var(--radius-full); }

.ms-cd { padding: var(--space-3); border: 1px solid #cfe3da; border-radius: var(--radius-lg); background: #f1faf6; text-align: center; }
.ms-cd__title { margin: 0 0 var(--space-2); font-weight: var(--weight-bold); color: var(--color-primary); }
.ms-cd__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.ms-cd__box { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-sm); }
.ms-cd__box strong { font-size: var(--text-2xl); font-weight: var(--weight-extrabold); color: var(--color-primary-dark); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ms-cd__box small { font-size: var(--text-xs); color: var(--color-text-muted); }
.ms-phase { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-primary-soft); }
.ms-phase > .icon { flex: none; width: 26px; height: 26px; color: var(--color-primary); }
.ms-phase div { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); }
.ms-phase strong { font-size: var(--text-base); }
.ms-phase--live { background: #fff1f0; }
.ms-phase--live > .icon { color: #b42318; }

/* Tiket */
.ms-ticket { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3); border: 1px solid #f0dfb5; border-radius: var(--radius-lg); background: #fffaf0; color: var(--color-text); font: inherit; text-align: left; cursor: pointer; }
.ms-ticket:hover { border-color: var(--color-gold); }
.ms-ticket__qr { flex: none; width: 76px; height: 76px; border-radius: 6px; }
.ms-ticket__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-ticket__body small { color: var(--color-text-muted); font-size: var(--text-xs); }
.ms-ticket__code { font-size: var(--text-sm); font-weight: var(--weight-bold); letter-spacing: 0.04em; color: var(--color-primary-dark); }
.ms-ticket > .icon { flex: none; width: 20px; height: 20px; color: var(--color-text-muted); }
.ms-tk { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-3); }
.ms-tk__qr { align-self: center; width: min(260px, 72vw); height: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.ms-tk__code { margin: 0; text-align: center; font-size: var(--text-xl); font-weight: var(--weight-extrabold); letter-spacing: 0.08em; color: var(--color-primary-dark); }

/* Sesi coaching berikutnya */
.ms-next { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid #f0dfb5; border-radius: var(--radius-lg); background: #fffaf0; }
.ms-next__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--color-gold-soft); color: var(--color-gold-strong); }
.ms-next__icon .icon { width: 22px; height: 22px; }
.ms-next__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--text-sm); }
.ms-next__text strong { font-size: var(--text-base); }
.ms-next__text small { color: var(--color-text-muted); font-size: var(--text-xs); }
.ms-next__go { flex: none; }

/* ---------- Daftar bagian (accordion) ---------- */
.ms-list { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); overflow: hidden; }
.ms-list:empty { display: none; }
.ms-acc + .ms-acc { border-top: 1px solid var(--color-border); }
.ms-acc__head { display: flex; align-items: center; gap: var(--space-3); min-height: 54px; padding: 0 var(--space-3); cursor: pointer; list-style: none; font-weight: var(--weight-bold); }
.ms-acc__head::-webkit-details-marker { display: none; }
.ms-acc__head:hover { background: #fafbf8; }
.ms-acc__icon { flex: none; display: inline-flex; color: var(--color-primary); }
.ms-acc__icon .icon { width: 20px; height: 20px; }
.ms-acc__title { flex: 1; min-width: 0; }
.ms-acc__head > .icon { flex: none; width: 18px; height: 18px; color: var(--color-text-muted); transition: transform var(--duration-fast); }
.ms-acc[open] > .ms-acc__head > .icon { transform: rotate(180deg); }
.ms-count { display: inline-flex; min-width: 22px; padding: 0 6px; border-radius: var(--radius-full); background: var(--color-primary-soft); color: var(--color-primary); font-size: var(--text-xs); justify-content: center; }
.ms-acc__body { padding: 0 var(--space-3) var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--text-sm); }
.ms-prose { font-size: var(--text-sm); }
.ms-prose p { margin: 0 0 var(--space-2); }
.ms-sub { margin: var(--space-2) 0 0; font-size: var(--text-xs); font-weight: var(--weight-extrabold); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.ms-lessons, .ms-topics, .ms-sessions, .ms-anns, .ms-links, .ms-checks, .ms-kvs { margin: 0; padding: 0; list-style: none; }
.ms-lesson + .ms-lesson { border-top: 1px dashed var(--color-border); }
.ms-lesson button { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 56px; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ms-lesson button:disabled { cursor: not-allowed; opacity: 0.62; }
.ms-lesson__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary); font-size: var(--text-xs); font-weight: var(--weight-extrabold); }
.ms-lesson.is-done .ms-lesson__n { background: var(--color-button); color: #fff; }
.ms-lesson__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ms-lesson__body strong { font-size: var(--text-sm); overflow-wrap: anywhere; }
.ms-lesson__body small { font-size: var(--text-xs); color: var(--color-text-muted); }
.ms-lesson__state { flex: none; display: inline-flex; color: var(--color-text-muted); }
.ms-lesson.is-done .ms-lesson__state { color: var(--color-button); }
.ms-lesson__state .icon { width: 20px; height: 20px; }
.ms-topics { counter-reset: t; display: flex; flex-direction: column; gap: 6px; }
.ms-topics li { counter-increment: t; display: flex; gap: var(--space-2); }
.ms-topics li::before { content: counter(t) "."; font-weight: var(--weight-bold); color: var(--color-primary); }
.ms-kv { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding: 8px 0; }
.ms-kv + .ms-kv { border-top: 1px dashed var(--color-border); }
.ms-kv > span { min-width: 110px; color: var(--color-text-muted); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.ms-kv > strong, .ms-kv > a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ms-kv .icon-btn { width: 36px; height: 36px; min-height: 36px; }
.ms-links li + li { border-top: 1px dashed var(--color-border); }
.ms-links a { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: var(--weight-semibold); text-decoration: none; }
.ms-links a span { flex: 1; }
.ms-links .icon { width: 18px; height: 18px; }
.ms-checks li { display: flex; gap: var(--space-2); padding: 3px 0; }
.ms-checks .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--color-button); }
.ms-session { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; }
.ms-session + .ms-session { border-top: 1px dashed var(--color-border); }
.ms-session__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ms-session__head .ms-chip { margin: 0; }
.ms-session > span { color: var(--color-text-muted); font-size: var(--text-xs); }
.ms-ann { padding: 10px 0; }
.ms-ann + .ms-ann { border-top: 1px dashed var(--color-border); }
.ms-ann__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.ms-ann__head small { color: var(--color-text-muted); font-size: var(--text-xs); }
.ms-cert-ok { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: var(--weight-bold); color: var(--color-primary); }
.ms-cert-ok .icon { width: 20px; height: 20px; }

.ms-wa { min-height: 52px; border: 1.5px solid #1f9e5c; background: #fff; color: #137a45; font-weight: var(--weight-bold); }
.ms-wa:hover { background: #effaf3; text-decoration: none; }
.ms-wa .icon { width: 22px; height: 22px; color: #1f9e5c; }

/* ---------- Lembar materi ---------- */
.ms-lv { display: flex; flex-direction: column; gap: var(--space-3); }
.ms-lv__meta { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--color-text-muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.ms-lv__meta .icon { width: 18px; height: 18px; color: var(--color-primary); }
.ms-lv__meta .ms-chip { margin: 0; }
.ms-lv__text { font-size: var(--text-base); }
.ms-lv__actions { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.ms-lv__nav { display: flex; justify-content: space-between; gap: var(--space-2); }
.ms-video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-md); overflow: hidden; background: #000; }
.ms-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Sertifikat ---------- */
.cert-wrap { display: flex; flex-direction: column; gap: var(--space-4); }
.cert-sheet { padding: 10px; border-radius: var(--radius-lg); background: var(--color-primary); box-shadow: var(--shadow-md); }
.cert-sheet.is-revoked { filter: grayscale(1); opacity: 0.7; }
.cert-sheet__frame { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--space-6) var(--space-4); border: 2px solid var(--color-gold); border-radius: 10px; background: var(--color-cream); text-align: center; }
.cert-brand { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-extrabold); letter-spacing: 0.18em; color: var(--color-primary); }
.cert-brand span { color: var(--color-gold-strong); }
.cert-kind { margin: var(--space-2) 0 0; font-size: 2rem; font-weight: var(--weight-extrabold); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-primary-dark); line-height: 1.1; }
.cert-sub { margin: 0; font-size: var(--text-sm); font-weight: var(--weight-bold); letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-gold-strong); }
.cert-given { margin: var(--space-4) 0 0; color: var(--color-text-muted); font-size: var(--text-sm); }
.cert-name { margin: 0; padding: 0 var(--space-2) 6px; border-bottom: 2px solid var(--color-gold); font-size: var(--text-2xl); font-weight: var(--weight-extrabold); color: var(--color-text); overflow-wrap: anywhere; }
.cert-text { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--color-text); }
.cert-title { margin: 0; font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--color-primary); overflow-wrap: anywhere; }
.cert-date { margin: 0; font-size: var(--text-sm); color: var(--color-text-muted); }
.cert-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-5); margin-top: var(--space-4); }
.cert-foot div { display: flex; flex-direction: column; gap: 2px; min-width: 120px; padding-top: 6px; border-top: 1px solid #c9b98f; }
.cert-foot span { font-size: var(--text-xs); color: var(--color-text-muted); }
.cert-foot strong { font-size: var(--text-sm); }
.cert-code { margin: var(--space-4) 0 0; font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.cert-actions { display: flex; flex-direction: column; gap: var(--space-2); }
@media print {
  body:has(.cert-sheet) * { visibility: hidden !important; }
  body:has(.cert-sheet) .cert-sheet, body:has(.cert-sheet) .cert-sheet * { visibility: visible !important; }
  body:has(.cert-sheet) .cert-sheet { position: fixed; inset: 0; margin: 0; border-radius: 0; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body:has(.cert-sheet) .cert-sheet__frame { height: 100%; justify-content: center; }
}

/* ---------- Kelas Saya ---------- */
.acm-list { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.acm-item { display: flex; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); text-decoration: none; box-shadow: var(--ux-card-shadow, var(--shadow-sm)); }
.acm-item:hover { border-color: #cfe3da; text-decoration: none; }
.acm-item__thumb { flex: none; display: block; width: 72px; height: auto; align-self: flex-start; border-radius: var(--radius-md); }
.acm-item__thumb--empty { display: inline-flex; align-items: center; justify-content: center; height: 72px; background: var(--color-primary-soft); color: var(--color-primary); }
.acm-item__thumb--empty .icon { width: 28px; height: 28px; }
.acm-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.acm-item__title { font-weight: var(--weight-bold); line-height: 1.3; overflow-wrap: anywhere; }
.acm-item__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--text-xs); color: var(--color-text-muted); }
.acm-item__meta span { display: inline-flex; align-items: center; gap: 4px; }
.acm-item__meta .icon { width: 14px; height: 14px; }
.acm-item .ms-bar { height: 6px; }
.acm-item__cta { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: var(--text-sm); font-weight: var(--weight-bold); color: var(--color-primary); }
.acm-item__cta .icon { width: 16px; height: 16px; }
.acm-teach { margin-top: var(--space-6); }

/* ---------- Editor program (admin & mentor) ---------- */
.ae-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-4); }
.ae-stat { display: flex; flex-direction: column; gap: 2px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.ae-stat strong { font-size: var(--text-xl); font-weight: var(--weight-extrabold); color: var(--color-primary-dark); line-height: 1.1; }
.ae-stat span { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: var(--weight-semibold); }
.ae-stat--wide { grid-column: span 3; flex-direction: row; align-items: center; justify-content: space-between; background: var(--color-primary-soft); border-color: #cfe3da; }
.ae-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.ae-type { display: flex; flex-direction: column; gap: 4px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); text-decoration: none; }
.ae-type:hover { border-color: var(--color-primary); text-decoration: none; }
.ae-type .icon { width: 26px; height: 26px; color: var(--color-primary); }
.ae-type strong { font-size: var(--text-base); }
.ae-type small { color: var(--color-text-muted); font-size: var(--text-xs); line-height: 1.4; }
.ae-tabs { display: flex; gap: 6px; margin: 0 calc(-1 * var(--space-4)) var(--space-4); padding: 2px var(--space-4) 6px; overflow-x: auto; scrollbar-width: none; }
.ae-tabs::-webkit-scrollbar { display: none; }
.ae-tab { flex: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-bold); cursor: pointer; }
.ae-tab[aria-selected="true"] { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.ae-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.ae-head h2 { flex: 1; min-width: 0; margin: 0; font-size: var(--text-lg); font-weight: var(--weight-extrabold); overflow-wrap: anywhere; }
.ae-sub { margin: 0 0 var(--space-3); color: var(--color-text-muted); font-size: var(--text-sm); }
.ae-items { display: flex; flex-direction: column; gap: var(--space-2); margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.ae-item { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.ae-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ae-item__body strong { font-size: var(--text-sm); overflow-wrap: anywhere; }
.ae-item__body small { font-size: var(--text-xs); color: var(--color-text-muted); overflow-wrap: anywhere; }
.ae-item__acts { flex: none; display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.ae-item__acts .icon-btn { width: 36px; height: 36px; min-height: 36px; }
.ae-item--off { opacity: 0.7; background: #f6f7f4; }
.ae-links { display: flex; flex-direction: column; gap: var(--space-2); }
.ae-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: var(--space-2); align-items: end; }
.ae-link .field { margin: 0; }
.ae-check { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border: 1px dashed var(--color-primary); border-radius: var(--radius-lg); background: #f6fbf9; margin-bottom: var(--space-3); }
.ae-check__row { display: flex; gap: var(--space-2); }
.ae-check__row input { flex: 1; min-width: 0; min-height: var(--control-height); padding: 0 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font: inherit; text-transform: uppercase; letter-spacing: 0.06em; }
.ae-check__video { width: 100%; max-height: 280px; border-radius: var(--radius-md); background: #000; object-fit: cover; }
.ae-check__result { margin: 0; padding: var(--space-3); border-radius: var(--radius-md); font-weight: var(--weight-bold); }
.ae-check__result--ok { background: var(--color-success-soft); color: var(--color-success); }
.ae-check__result--warn { background: var(--color-warning-soft); color: var(--color-warning); }
.ae-check__result--bad { background: var(--color-danger-soft); color: var(--color-danger); }
.ae-person { display: flex; flex-direction: column; gap: 6px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.ae-person + .ae-person { margin-top: var(--space-2); }
.ae-person__head { display: flex; align-items: flex-start; gap: var(--space-2); }
.ae-person__head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ae-person__head strong { overflow-wrap: anywhere; }
.ae-person__head small { color: var(--color-text-muted); font-size: var(--text-xs); overflow-wrap: anywhere; }
.ae-person__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ae-person__tags .ms-chip { margin: 0; }
.ae-person__acts { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.ae-ro { padding: var(--space-3); border-radius: var(--radius-md); background: #f6f7f4; font-size: var(--text-sm); }
.ae-ro p { margin: 0 0 4px; }

@media (max-width: 380px) {
  .ms-banner { flex-direction: column-reverse; align-items: stretch; }
  .ms-banner__img { align-self: center; width: 60%; max-width: 200px; }
  .ms-row { grid-template-columns: 22px 1fr; }
  .ms-row__value { grid-column: 2; }
  .ae-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ae-stat--wide { grid-column: span 2; }
  .ae-link { grid-template-columns: 1fr; }
}
