:root {
  --bg: #f5f7fa; --surface: #ffffff; --surface-2: #eef2f7; --text: #1b2430; --muted: #5d6b7c;
  --border: #d9e0e8; --accent: #0a5fc0; --accent-text: #ffffff; --accent-soft: #e3effb;
  --gold: #d99500; --gold-bright: #f0ab00; --gold-soft: #fff4d6;
  --ok: #1e7d3a; --ok-soft: #e4f4e8; --bad: #b42318; --bad-soft: #fde8e7; --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d; --surface: #19202a; --surface-2: #222b37; --text: #e6ebf1; --muted: #9aa8b8;
    --border: #2e3a48; --accent: #4da3ff; --accent-text: #0b1420; --accent-soft: #1c3047;
    --gold: #ffc93c; --gold-bright: #ffc93c; --gold-soft: #3a2f12;
    --ok: #5fcf80; --ok-soft: #183524; --bad: #ff8a80; --bad-soft: #3a1d1c;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 8px 14px; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
button:disabled { opacity: .55; cursor: not-allowed; }
input, select, textarea { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }

/* layout */
header.top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
header.top .brand { font-weight: 700; }
header.top .meta { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
nav.tabs { display: flex; gap: 4px; padding: 8px 16px 0; background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
nav.tabs button { border: none; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 8px 12px; color: var(--muted); white-space: nowrap; }
nav.tabs button.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
main { max-width: 920px; margin: 0 auto; padding: 16px; }
.app-shell { display: flex; flex-direction: column; height: 100%; }
.app-shell main { flex: 1; width: 100%; display: flex; flex-direction: column; min-height: 0; }
.panel { display: none; flex: 1; flex-direction: column; min-height: 0; }
.panel.active { display: flex; }
#panel-quiz, #panel-progress { overflow-y: auto; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 160px; }
.row > button { flex: 0 0 auto; }

/* chat */
.chat-log { flex: 1; overflow-y: auto; padding: 4px 2px 12px; min-height: 200px; }
.msg { margin: 10px 0; padding: 10px 14px; border-radius: var(--radius); max-width: 100%; overflow-wrap: anywhere; }
.msg.user { background: var(--accent-soft); margin-left: 12%; }
.msg.assistant { background: var(--surface); border: 1px solid var(--border); }
.msg.error { background: var(--bad-soft); color: var(--bad); }
.msg table { border-collapse: collapse; display: block; overflow-x: auto; margin: 8px 0; }
.msg th, .msg td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; }
.msg th { background: var(--surface-2); }
.msg pre { background: var(--surface-2); padding: 10px; border-radius: 6px; overflow-x: auto; }
.msg code { background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }
.msg p:first-child { margin-top: 0; } .msg p:last-child { margin-bottom: 0; }
.tool-note { font-size: 12px; color: var(--muted); margin: 4px 0; }
.composer { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.composer textarea { resize: none; height: 54px; }
.chat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.chat-head .muted { flex: 1; }
.suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.suggestions button { font-size: 13px; padding: 6px 10px; border-radius: 999px; }

/* quiz */
.question { margin: 14px 0; }
.question .q { font-weight: 600; margin-bottom: 8px; }
.option { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin: 6px 0; cursor: pointer; background: var(--surface); }
.option input { width: auto; margin-top: 4px; }
.option.correct { border-color: var(--ok); background: var(--ok-soft); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.explain { font-size: 14px; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.score { font-size: 20px; font-weight: 700; }

/* tables (admin/progress) */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th, table.data td { border-bottom: 1px solid var(--border); padding: 8px; text-align: left; white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 600; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.pill.on { background: var(--ok-soft); color: var(--ok); } .pill.off { background: var(--bad-soft); color: var(--bad); }
.notice { padding: 10px 12px; border-radius: 8px; background: var(--accent-soft); margin: 10px 0; }
.disclaimer { font-size: 12px; color: var(--muted); text-align: center; padding: 6px 16px 10px; }

/* login */
.login-wrap { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login-wrap .card { width: 100%; max-width: 380px; }
.login-wrap h1 { font-size: 22px; margin: 0 0 4px; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 8px; }

@media (max-width: 600px) {
  .msg.user { margin-left: 0; }
  header.top { flex-wrap: wrap; }
  header.top .meta { margin-left: 0; justify-content: flex-start; }
}

/* course */
.course-picker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.course-picker label { margin: 0; white-space: nowrap; }
.course-picker select { max-width: 480px; }
.course-grid { display: grid; grid-template-columns: 290px 1fr; gap: 16px; flex: 1; min-height: 0; }
.chapter-list { overflow-y: auto; padding: 12px; }
.chapter-list ol { list-style: none; padding: 0; margin: 10px 0 0; }
.chapter-list li button { width: 100%; text-align: left; border: none; background: none; padding: 7px 8px; border-radius: 6px; display: flex; gap: 8px; font-size: 14px; }
.chapter-list li button:hover { background: var(--surface-2); }
.chapter-list li button.current { background: var(--accent-soft); font-weight: 600; }
.chapter-list .mark { width: 18px; flex: none; color: var(--muted); }
.chapter-list .mark.done { color: var(--ok); }
.course-title { font-weight: 700; font-size: 14px; }
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 99px; margin: 8px 0 4px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--ok); width: 0; }
.lesson { display: flex; flex-direction: column; min-height: 0; }
.chapter-head h2 { font-size: 19px; margin: 0 0 4px; }
.chapter-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
#chapterSelect { display: none; margin-bottom: 10px; }
@media (max-width: 760px) {
  .course-grid { grid-template-columns: 1fr; }
  .chapter-list { display: none; }
  #chapterSelect { display: block; }
  #panel-course { overflow-y: auto; }
  .lesson { min-height: auto; }
  .lesson .chat-log { flex: none; overflow: visible; min-height: 0; }
  .lesson .composer { position: sticky; bottom: 0; background: var(--bg); padding-bottom: 4px; }
  #chTopics { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

.course-checks { border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px 8px; margin: 0; flex: 1 1 200px; }
.course-checks legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.course-checks label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 0 0; color: var(--text); font-size: 14px; }
.course-checks input { width: auto; }
dialog { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.4); }

/* AI trainer avatar + voice */
.trainer-bar { display: flex; align-items: center; gap: 12px; max-width: 920px; width: 100%; margin: 0 auto; padding: 10px 16px 0; }
.avatar { position: relative; width: 64px; height: 64px; flex: none; border-radius: 50%; }
.avatar svg, .avatar .avatar-photo { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; }
.avatar-ring { position: absolute; inset: -4px; border-radius: 50%; border: 3px solid transparent; pointer-events: none; }
.avatar[data-state="speaking"] .avatar-ring { border-color: var(--accent); animation: av-pulse 1.1s ease-in-out infinite; }
.avatar[data-state="listening"] .avatar-ring { border-color: var(--ok); animation: av-pulse .8s ease-in-out infinite; }
.avatar[data-state="thinking"] .avatar-ring { border-color: var(--accent) transparent var(--accent) transparent; animation: av-spin 1.2s linear infinite; }
.av-mouth-open { display: none; }
.avatar.mouth-open .av-mouth-open { display: inline; }
.avatar.mouth-open .av-mouth-closed { display: none; }
.av-eyes { transform-origin: 100px 91px; animation: av-blink 4.5s infinite; }
.avatar .avatar-photo + .avatar-ring { inset: -4px; }
.avatar.mouth-open .avatar-photo { transform: scale(1.015); }
@keyframes av-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .55; } }
@keyframes av-spin { to { transform: rotate(360deg); } }
@keyframes av-blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .avatar-ring, .av-eyes { animation: none !important; } }
.trainer-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.trainer-info .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voice-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.voice-controls .toggle { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 14px; white-space: nowrap; }
.voice-controls .toggle input { width: auto; }
.msg-actions { margin-top: 6px; }
.msg-actions button { font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.composer .mic { flex: none; font-size: 18px; padding: 8px 12px; }
.composer .mic.on { background: var(--ok-soft); border-color: var(--ok); }
@media (max-width: 600px) {
  .avatar { width: 52px; height: 52px; }
  .trainer-bar { flex-wrap: wrap; }
  .voice-controls { width: 100%; justify-content: flex-start; }
}

/* Brand wordmark */
header.top { border-bottom: 3px solid var(--gold-bright); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { border-radius: 9px; flex: none; }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wm { font-weight: 800; font-size: 22px; letter-spacing: -.4px; }
.wm-skill { color: var(--accent); }
.wm-via { color: var(--gold); }
.tagline { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.slogan { font-size: 12.5px; font-weight: 700; color: var(--gold); letter-spacing: .2px; }
.login-brand .slogan { font-size: 16px; margin: 2px 0 4px; }
nav.tabs button.active { border-bottom-color: var(--gold-bright); }
.ai-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); margin-left: 4px; vertical-align: 2px; }
.login-brand { text-align: center; margin-bottom: 10px; }
.login-brand img { border-radius: 14px; }
.login-brand .wm { font-size: 30px; margin-top: 6px; }
.login-intro { text-align: center; margin: 6px 0 2px; }
.login-wrap .card p.muted { text-align: center; }
#installBtn { border-color: var(--gold-bright); }
@media (max-width: 600px) { .brand .tagline { display: none; } .brand .wm { font-size: 20px; } }

/* Config Lab */
#panel-lab .lab-main { overflow-y: auto; min-height: 0; padding-right: 4px; }
#panel-lab .chat-log { flex: none; overflow: visible; min-height: 0; }
.lab-picker { display: none; gap: 8px; margin-bottom: 10px; }
.lab-head h2 { font-size: 19px; margin: 0 0 6px; }
.lab-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pill.level-beginner { background: var(--ok-soft); color: var(--ok); }
.pill.level-intermediate { background: var(--accent-soft); color: var(--accent); }
.pill.level-advanced { background: var(--gold-soft); color: var(--gold); }
.requirement { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold-bright); border-radius: var(--radius); padding: 12px 14px; }
.requirement p:first-child { margin-top: 0; } .requirement p:last-child { margin-bottom: 0; }
.lab-form textarea { min-height: 86px; resize: vertical; }
.lab-form .field { margin-top: 12px; }
.lab-form .field label { color: var(--text); font-weight: 600; font-size: 14px; }
.lab-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.review { margin-top: 6px; }
.review .card { margin-bottom: 12px; }
.score-badge { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 800; font-size: 28px; }
.score-badge small { font-size: 15px; color: var(--muted); font-weight: 600; }
.score-good { color: var(--ok); } .score-mid { color: var(--gold); } .score-low { color: var(--bad); }
.fb-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.fb-item:first-child { border-top: none; }
.fb-icon { flex: none; width: 22px; text-align: center; }
.fb-item .fb-field { font-weight: 600; }
.fb-item p { margin: 4px 0 0; }
.review ul, .review ol { padding-left: 20px; margin: 6px 0; }
.review details summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.review table { border-collapse: collapse; display: block; overflow-x: auto; margin: 8px 0; }
.review th, .review td { border: 1px solid var(--border); padding: 5px 9px; text-align: left; }
.steps li { margin: 6px 0; }
.steps label { display: inline; color: var(--text); font-size: 15px; margin: 0; }
.steps input { width: auto; margin-right: 6px; }
.lab-discuss h3 { margin: 18px 0 4px; font-size: 16px; }
#labList li button .lab-score { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) {
  #panel-lab { overflow-y: auto; }
  #panel-lab .lab-main { overflow: visible; }
  .lab-picker { display: flex; flex-direction: column; }
}

/* Welcome pop-up (first login) */
dialog.welcome { width: min(440px, calc(100% - 32px)); padding: 0; overflow: hidden; border: none; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.welcome::backdrop { background: rgba(10, 40, 80, .55); }
.welcome-top { background: linear-gradient(135deg, #1a7fe0, #0a4fa8); display: flex; align-items: center; justify-content: center; gap: 18px; padding: 26px 16px 22px; border-bottom: 4px solid var(--gold-bright); }
.welcome-top img { border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.welcome-avatar .avatar { width: 84px; height: 84px; border: 3px solid #fff; border-radius: 50%; }
.welcome-body { text-align: center; padding: 20px 24px 26px; }
.welcome-hi { margin: 0; color: var(--muted); font-size: 15px; }
.welcome-body h2 { font-size: 26px; margin: 4px 0 6px; font-weight: 800; letter-spacing: -.3px; }
.welcome-sub { margin: 0 0 20px; font-size: 17px; font-weight: 600; color: var(--gold); }
.welcome-cta { font-size: 17px; padding: 12px 26px; border-radius: 999px; }
@keyframes welcome-in { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
dialog.welcome[open] { animation: welcome-in .35s ease-out; }
@keyframes cta-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(240,171,0,.0); } 50% { box-shadow: 0 0 0 6px rgba(240,171,0,.45); } }
.pulse-cta { animation: cta-glow 1.2s ease-in-out 4; }
@media (prefers-reduced-motion: reduce) { dialog.welcome[open], .pulse-cta { animation: none; } }

/* =====================================================================
   Skillglobal Academy theme: premium look (overrides the base styles above)
   ===================================================================== */
:root {
  --brand-1: #1a7fe0; --brand-2: #0a4fa8; --brand-3: #083b80;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 10px rgba(16, 24, 40, .06), 0 12px 28px rgba(16, 24, 40, .08);
  --grad-brand: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 60%, var(--brand-3) 100%);
}
@media (prefers-color-scheme: dark) {
  :root { --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px rgba(0,0,0,.45); }
}
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(26, 127, 224, .13), transparent 70%),
    radial-gradient(700px 380px at 102% 4%, rgba(240, 171, 0, .12), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- header ---- */
header.top {
  background: var(--grad-brand); color: #fff; border-bottom: 3px solid var(--gold-bright);
  padding: 12px 22px; box-shadow: 0 6px 20px rgba(8, 59, 128, .25); position: relative; z-index: 2;
}
header.top::after {   /* subtle light sweep */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 120px at 20% 0%, rgba(255,255,255,.16), transparent 70%);
}
header.top .brand { gap: 12px; position: relative; z-index: 1; }
header.top .brand img { border-radius: 12px; box-shadow: 0 0 0 2px rgba(255,255,255,.65), 0 6px 18px rgba(0,0,0,.28); }
header.top .wm { font-size: 27px; letter-spacing: -.6px; }
header.top .wm-skill { color: #fff; }
header.top .wm-via { color: #ffc93c; }
header.top .slogan { color: #ffe08a; font-size: 13px; letter-spacing: .3px; }
header.top .meta { color: rgba(255,255,255,.9); position: relative; z-index: 1; gap: 10px; }
header.top .meta a { color: #fff; font-weight: 600; }
header.top .meta button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 7px 16px; }
header.top .meta button:hover { background: rgba(255,255,255,.22); }
header.top #installBtn { background: #ffc93c; color: #1b2430; border-color: #ffc93c; font-weight: 700; }
header.top .pill { background: rgba(255,255,255,.18); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 600; white-space: nowrap; }
.chip#quota { padding: 6px 12px; font-weight: 500; }
.chip#quota:empty { display: none; }
.chip .initial { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #ffc93c; color: #0a4fa8; font-weight: 800; font-size: 14px; }

/* ---- tabs ---- */
nav.tabs { background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px 16px; gap: 6px; justify-content: center; box-shadow: var(--shadow-sm); position: relative; z-index: 1; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs button {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 9px 18px; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: background .15s, color .15s, box-shadow .15s, transform .15s;
}
nav.tabs button:hover { background: var(--surface-2); color: var(--text); }
nav.tabs button.active {
  background: var(--grad-brand); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(10, 79, 168, .35), inset 0 -2px 0 var(--gold-bright);
}
nav.tabs button.active .ti { stroke: #ffc93c; }
.ti { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- layout ---- */
main { max-width: 1120px; padding: 18px 20px; }
.trainer-bar {
  max-width: 1080px; margin: 16px auto 0; padding: 12px 18px; width: calc(100% - 40px);
  background: linear-gradient(120deg, var(--surface) 40%, var(--accent-soft));
  border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-md);
}
.trainer-bar .avatar { width: 72px; height: 72px; }
.trainer-bar .avatar svg, .trainer-bar .avatar .avatar-photo { box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(10, 79, 168, .25); }
#trainerName { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.ai-badge { background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(240,171,0,.35); }
#trainerStatus { display: inline-flex; align-items: center; gap: 6px; }
#trainerStatus::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.voice-controls .toggle { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; }

/* ---- cards & controls ---- */
.card { border-radius: var(--radius); box-shadow: var(--shadow-sm); border-color: var(--border); }
button { border-radius: 10px; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; }
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: var(--grad-brand); border: none; box-shadow: 0 4px 12px rgba(10, 79, 168, .3); padding: 9px 18px; }
button.primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(10, 79, 168, .38); }
input, select, textarea { border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pill { border-radius: 999px; padding: 3px 10px; font-weight: 600; }

/* ---- course & lab side lists ---- */
.chapter-list { border-radius: 18px; padding: 14px; box-shadow: var(--shadow-md); }
.course-title { font-size: 15px; letter-spacing: -.1px; }
.progress-bar { height: 8px; }
.progress-bar span { background: linear-gradient(90deg, var(--gold-bright), var(--ok)); border-radius: 99px; }
.chapter-list li button { border-radius: 10px; padding: 8px 10px; border: 1px solid transparent; align-items: flex-start; }
.chapter-list li button.current { background: var(--accent-soft); border-color: rgba(10, 95, 192, .25); box-shadow: inset 3px 0 0 var(--gold-bright); }
.chapter-list .mark {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--muted); flex: none;
}
.chapter-list li button.current .mark { background: var(--accent); color: #fff; }
.chapter-list .mark.done { background: var(--ok); color: #fff; }
.chapter-head h2, .lab-head h2 { font-size: 22px; letter-spacing: -.3px; }
.course-picker select, #labCourse { font-weight: 600; }

/* ---- chat ---- */
.msg { border-radius: 16px; padding: 12px 16px; }
.msg.user {
  background: var(--grad-brand); color: #fff; border-bottom-right-radius: 4px;
  box-shadow: 0 6px 16px rgba(10, 79, 168, .25); margin-left: 18%;
}
.msg.user a { color: #ffe08a; }
.msg.assistant { border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); border-color: var(--border); }
.msg.assistant h2, .msg.assistant h3 { color: var(--accent); letter-spacing: -.2px; }
.msg.assistant h2 { font-size: 19px; border-bottom: 2px solid var(--gold-soft); padding-bottom: 4px; }
.msg th { background: var(--accent-soft); }
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: var(--shadow-md); margin-top: 6px; }
.composer textarea { border: none; box-shadow: none !important; background: transparent; }
.suggestions button { background: var(--surface); box-shadow: var(--shadow-sm); }
.suggestions button:hover { background: var(--accent-soft); }
.msg-actions button { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }

/* ---- lab & quiz ---- */
.requirement { border-radius: 14px; box-shadow: var(--shadow-sm); }
.score-badge { font-size: 34px; }
.option { border-radius: 12px; transition: border-color .15s, background .15s; }
.option:hover { border-color: var(--accent); }

/* ---- footer ---- */
.disclaimer { padding: 8px 16px 12px; }

/* ---- login: split hero ---- */
.login-split { min-height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero {
  background: var(--grad-brand); color: #fff; padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-hero::before, .login-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.login-hero::before { width: 420px; height: 420px; right: -140px; top: -120px; background: radial-gradient(circle, rgba(255,201,60,.35), transparent 65%); }
.login-hero::after { width: 520px; height: 520px; left: -200px; bottom: -260px; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 65%); }
.hero-brand { display: flex; align-items: center; gap: 14px; position: relative; }
.hero-brand img { border-radius: 16px; box-shadow: 0 0 0 3px rgba(255,255,255,.7), 0 10px 24px rgba(0,0,0,.3); }
.hero-brand .wm { font-size: 36px; } .hero-brand .wm-skill { color: #fff; } .hero-brand .wm-via { color: #ffc93c; }
.hero-brand .slogan { color: #ffe08a; font-size: 15px; }
.login-hero h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.8px; margin: 34px 0 12px; max-width: 520px; position: relative; }
.hero-lead { font-size: 17px; color: rgba(255,255,255,.9); max-width: 520px; margin: 0 0 22px; position: relative; }
.hero-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; position: relative; }
.hero-features li { display: flex; align-items: center; gap: 12px; font-weight: 600; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 14px; max-width: 480px; backdrop-filter: blur(4px); }
.hero-features li span { font-size: 18px; }
.hero-foot { margin-top: 30px; font-size: 13px; color: rgba(255,255,255,.75); position: relative; }
.login-panel { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: 100%; max-width: 400px; padding: 28px; border-radius: 20px; box-shadow: var(--shadow-md); }
.login-card .login-brand { display: none; }
.login-title { font-size: 26px; margin: 0 0 2px; letter-spacing: -.4px; }
.login-card p.muted { text-align: left; margin-top: 0; }
@media (max-width: 860px) {
  .login-split { grid-template-columns: 1fr; }
  .login-hero { padding: 28px 22px 26px; }
  .login-hero h1 { font-size: 26px; margin-top: 18px; }
  .hero-lead { font-size: 15px; }
  .hero-features { display: none; }
  .hero-foot { margin-top: 12px; }
  .login-panel { place-items: start center; padding-top: 22px; }
}

/* ---- phones ---- */
@media (max-width: 600px) {
  header.top { padding: 10px 14px; }
  header.top .brand img { width: 40px; height: 40px; }
  header.top .wm { font-size: 23px; }
  header.top .meta { margin-left: auto; width: auto; flex-wrap: nowrap; gap: 6px; }
  header.top .chip-user { padding: 3px; }
  header.top .chip-user #who { display: none; }
  header.top .chip#quota { font-size: 12px; padding: 5px 10px; }
  header.top .meta button { padding: 6px 12px; font-size: 13px; }
  header.top .slogan { font-size: 11.5px; }
  nav.tabs { justify-content: flex-start; padding: 8px 10px; }
  nav.tabs button { padding: 8px 13px; font-size: 13.5px; }
  .trainer-bar { width: calc(100% - 24px); margin-top: 10px; padding: 10px 12px; border-radius: 16px; }
  .trainer-bar .avatar { width: 56px; height: 56px; }
  #trainerName { font-size: 16px; }
  main { padding: 12px; }
  .msg.user { margin-left: 8%; }
}
.lesson .chat-log { min-height: 80px; }
table.data td button { padding: 5px 11px; font-size: 13px; margin: 2px 0; }
table.data td:last-child { white-space: normal; min-width: 190px; }
.admin-page main { max-width: 1300px; }

/* Sliding rectangular tab indicator */
nav.tabs { position: relative; }
nav.tabs button { border-radius: 8px; position: relative; z-index: 1; }
nav.tabs button.active { background: transparent; box-shadow: none; }
.tab-indicator {
  position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; z-index: 0; pointer-events: none;
  border-radius: 8px; background: var(--grad-brand);
  box-shadow: 0 6px 16px rgba(10, 79, 168, .35), inset 0 -3px 0 var(--gold-bright);
  transition: transform .32s cubic-bezier(.3, .7, .2, 1), width .32s cubic-bezier(.3, .7, .2, 1), height .2s;
}
.tab-indicator.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .tab-indicator { transition: none; } }
nav.tabs button.active:hover { background: transparent; }

/* Swipe between tabs: slide the new panel in */
@keyframes swipe-in-left { from { transform: translateX(36px); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes swipe-in-right { from { transform: translateX(-36px); opacity: .3; } to { transform: none; opacity: 1; } }
.panel.swipe-in-left { animation: swipe-in-left .28s ease-out; }
.panel.swipe-in-right { animation: swipe-in-right .28s ease-out; }
@media (prefers-reduced-motion: reduce) { .panel.swipe-in-left, .panel.swipe-in-right { animation: none; } }

/* ---- running announcement stripe ---- */
.ticker {
  position: relative; z-index: 1; overflow: hidden; white-space: nowrap;
  background: linear-gradient(90deg, #ffe08a, #ffc93c 40%, #ffe08a);
  color: #3a2a00; font-weight: 700; font-size: 14px; border-bottom: 1px solid rgba(0,0,0,.06);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ticker[hidden] { display: none; }
.ticker-track { display: inline-flex; animation: ticker-run 40s linear infinite; padding: 7px 0; }
.ticker:hover .ticker-track, .ticker:active .ticker-track { animation-play-state: paused; }
.ticker-group { display: inline-flex; flex: none; }
.ticker-item { display: inline-flex; align-items: center; padding: 0 28px; }
.ticker-item::after { content: "◆"; margin-left: 56px; font-size: 9px; color: #0a4fa8; opacity: .55; }
.phone-only { display: none !important; }
@keyframes ticker-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}
@media (prefers-color-scheme: dark) {
  .ticker { background: linear-gradient(90deg, #3a2f12, #574310 40%, #3a2f12); color: #ffe08a; }
  .ticker-item::after { color: #ffc93c; }
}

/* ---- phones: logo, Trainer admin and Sign out on one row ---- */
@media (max-width: 600px) {
  header.top { flex-wrap: nowrap; gap: 8px; padding: 9px 12px; }
  header.top .brand { gap: 8px; min-width: 0; }
  header.top .brand img { width: 38px; height: 38px; }
  header.top .wm { font-size: 21px; }
  header.top .slogan { font-size: 10.5px; }
  header.top .meta { margin-left: auto; flex-wrap: nowrap; gap: 6px; }
  header.top .chip-user, header.top .chip#quota, header.top > .pill { display: none !important; }
  header.top .meta a { font-size: 12.5px; white-space: nowrap; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 6px 10px; text-decoration: none; }
  header.top .meta button { padding: 6px 11px; font-size: 12.5px; white-space: nowrap; }
  header.top #installBtn { display: none; }
  .phone-only { display: inline-flex !important; }
  .ticker { font-size: 13px; }
  .ticker-item { padding: 0 18px; }
  .ticker-item::after { margin-left: 36px; }
}
@media (max-width: 600px) { .hide-phone { display: none; } }
.app-shell > header.top, .app-shell > .ticker, .app-shell > nav.tabs, .app-shell > .trainer-bar, .app-shell > .disclaimer { flex: none; }

/* ---- stripe: black with big, bold brand-coloured text ---- */
.ticker, :root .ticker {
  background: #0b0b0d; color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .2px;
  border-top: 2px solid var(--gold-bright); border-bottom: 2px solid var(--gold-bright);
  box-shadow: inset 0 0 24px rgba(26, 127, 224, .18);
}
.ticker-track { padding: 10px 0; }
.ticker-item { padding: 0 30px; }
.ticker-item::after { content: "◆"; color: #ffc93c; opacity: 1; font-size: 11px; margin-left: 60px; }
/* rotate brand colours: white, gold, brand blue */
.ticker-group .ticker-item:nth-child(3n+1) { color: #ffffff; }
.ticker-group .ticker-item:nth-child(3n+2) { color: #ffc93c; }
.ticker-group .ticker-item:nth-child(3n)   { color: #4fa8ff; }
.ticker-quota { color: #ffc93c !important; }
@media (prefers-color-scheme: dark) {
  .ticker { background: #000; color: #fff; }
  .ticker-item::after { color: #ffc93c; }
}
@media (max-width: 600px) {
  .ticker { font-size: 15.5px; }
  .ticker-track { padding: 8px 0; }
  .ticker-item { padding: 0 20px; }
  .ticker-item::after { margin-left: 40px; }
}
.ticker { -webkit-mask-image: none; mask-image: none; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 1; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, #0b0b0d, transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, #0b0b0d, transparent); }

/* =====================================================================
   Trainer hero: Santosh AI card + YouTube Video Board
   ===================================================================== */
.trainer-hero {
  max-width: 1080px; width: calc(100% - 40px); margin: 16px auto 0; display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.6fr; gap: 16px; align-items: stretch;
}
.trainer-hero.collapsed, .trainer-hero.no-videos { grid-template-columns: 1fr; }
.hero-card {
  position: relative; overflow: hidden; border-radius: 20px; padding: 18px; color: #fff;
  background:
    radial-gradient(320px 160px at 110% -10%, rgba(255, 201, 60, .35), transparent 70%),
    radial-gradient(260px 200px at -10% 120%, rgba(255, 255, 255, .14), transparent 70%),
    var(--grad-brand);
  box-shadow: 0 12px 30px rgba(10, 79, 168, .28); display: flex; flex-direction: column; gap: 14px;
}
.hero-trainer { display: flex; align-items: center; gap: 14px; }
.hero-card .avatar { width: 84px; height: 84px; }
.hero-card .avatar svg, .hero-card .avatar .avatar-photo { box-shadow: 0 0 0 3px #ffc93c, 0 8px 22px rgba(0, 0, 0, .3); }
.hero-card #trainerName { font-size: 22px; color: #fff; }
.hero-card .ai-badge { background: #ffc93c; color: #3a2a00; border: none; }
.hero-card #trainerStatus { color: rgba(255, 255, 255, .88); font-size: 13.5px; }
.hero-card #trainerStatus::before { background: #5fe08a; box-shadow: 0 0 0 3px rgba(95, 224, 138, .25); }
.hero-tag { font-size: 13px; font-weight: 700; color: #ffe08a; margin-top: 2px; }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-actions button {
  background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px;
  padding: 10px 8px; font-weight: 700; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  backdrop-filter: blur(4px);
}
.quick-actions button:hover:not(:disabled) { background: rgba(255, 255, 255, .26); border-color: #ffc93c; transform: translateY(-1px); }
.hero-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.hero-card .voice-controls { justify-content: flex-start; }
.hero-card .voice-controls .toggle { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; }
.hero-card .voice-controls button { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; border-radius: 999px; }
.hero-toggle { background: #ffc93c !important; color: #2b1f00 !important; border: none !important; border-radius: 999px !important; font-weight: 800; padding: 7px 14px; }
.vb-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: #0a4fa8; color: #fff; font-size: 12px; }

/* video board */
.video-board {
  border-radius: 20px; padding: 14px; background: #0b0b0d; color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28); border: 1px solid #1f2430; display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.video-board[hidden] { display: none; }
.vb-head { display: flex; align-items: center; gap: 10px; }
.vb-title { font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.vb-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 4px rgba(255, 59, 48, .25); }
.vb-sub { color: #9aa8b8; font-size: 13px; }
.vb-nav { margin-left: auto; display: flex; gap: 6px; }
.vb-nav button { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: #1b1f27; color: #fff; border: 1px solid #2e3440; font-size: 20px; line-height: 1; }
.vb-nav button:hover:not(:disabled) { border-color: #ffc93c; color: #ffc93c; }
.vb-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; min-height: 0; }
.vb-player { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #0a4fa8, #1b1f27); }
.vb-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vb-poster { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; color: #fff; text-align: left; cursor: pointer; }
.vb-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.vb-poster:hover img { transform: scale(1.04); }
.vb-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 35%, rgba(0,0,0,.8)); }
.vb-play {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; background: #ffc93c; box-shadow: 0 0 0 8px rgba(255, 201, 60, .28), 0 10px 24px rgba(0,0,0,.4);
  transition: transform .2s;
}
.vb-play svg { width: 30px; height: 30px; fill: #1b1f27; margin-left: 4px; }
.vb-poster:hover .vb-play { transform: translate(-50%, -50%) scale(1.08); }
.vb-caption { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; flex-direction: column; gap: 2px; }
.vb-caption strong { font-size: 17px; line-height: 1.25; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.vb-caption > span:last-child { font-size: 12.5px; color: #ffe08a; font-weight: 700; }
.vb-badge { align-self: flex-start; background: #ffc93c; color: #2b1f00; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; margin-bottom: 4px; }
.vb-list { list-style: none; margin: 0; padding: 0 2px 0 0; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 0; min-height: 100%; }
.vb-list button { width: 100%; display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; background: transparent; border: 1px solid transparent; color: #e6ebf1; text-align: left; }
.vb-list button:hover:not(:disabled) { background: #1b1f27; border-color: #2e3440; }
.vb-list button.current { background: #1b2a44; border-color: #4fa8ff; }
.vb-thumb { position: relative; flex: none; width: 92px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: linear-gradient(135deg, #0a4fa8, #1b1f27); }
.vb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vb-mini-play { position: absolute; inset: 0; display: grid; place-items: center; color: #ffc93c; font-size: 14px; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.vb-meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.vb-name { font-size: 13px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vb-tag { font-size: 11.5px; color: #9aa8b8; font-weight: 600; }
.vb-tag.hot { color: #ffc93c; }

/* collapsed: one slim branded bar */
.trainer-hero.collapsed .hero-card, .trainer-hero.no-videos .hero-card { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
.trainer-hero.collapsed .hero-card .avatar, .trainer-hero.no-videos .hero-card .avatar { width: 64px; height: 64px; }
.trainer-hero.collapsed .quick-actions, .trainer-hero.no-videos .quick-actions { grid-template-columns: repeat(3, auto); margin-left: auto; }
.trainer-hero.collapsed .quick-actions button, .trainer-hero.no-videos .quick-actions button { flex-direction: row; padding: 8px 12px; }
.trainer-hero.collapsed .hero-foot-row, .trainer-hero.no-videos .hero-foot-row { margin-top: 0; }
.app-shell > .trainer-hero { flex: none; }

@media (max-width: 900px) {
  .trainer-hero { grid-template-columns: 1fr; }
  .vb-body { grid-template-columns: 1fr; }
  .vb-list { flex-direction: row; overflow-x: auto; max-height: none; min-height: 0; padding-bottom: 4px; }
  .vb-list li { flex: none; width: 210px; }
}
@media (max-width: 600px) {
  .trainer-hero { width: calc(100% - 24px); margin-top: 10px; gap: 10px; }
  .hero-card { padding: 12px; border-radius: 16px; gap: 10px; }
  .hero-card .avatar, .trainer-hero.collapsed .hero-card .avatar { width: 54px; height: 54px; }
  .hero-card #trainerName { font-size: 17px; }
  .hero-tag { display: none; }
  .quick-actions, .trainer-hero.collapsed .quick-actions, .trainer-hero.no-videos .quick-actions { grid-template-columns: repeat(3, 1fr); width: 100%; margin-left: 0; }
  .quick-actions button { font-size: 12px; padding: 7px 4px; flex-direction: column !important; }
  .video-board { padding: 10px; border-radius: 16px; }
}
.video-table input, .video-table select { min-width: 90px; } .video-table td button { padding: 5px 9px; }
/* Let the page scroll when the hero takes space, so lessons always get room */
.app-shell { height: auto; min-height: 100%; }
.app-shell main { min-height: 620px; }
@media (max-width: 760px) { .app-shell main { min-height: 0; } }
@media (min-width: 761px) {
  .app-shell main { flex: none; height: calc(100vh - 16px); min-height: 520px; }
}
/* "Academy" sits after "Skillglobal" as a lighter second word */
.wm-academy { margin-left: .28em; font-weight: 700; color: var(--text); }
header.top .wm-academy, .hero-brand .wm-academy { color: #fff; opacity: .95; }
.login-card .wm-academy { color: var(--accent); }
.welcome-body .wm-academy { color: var(--text); }
@media (max-width: 600px) {
  header.top .wm { font-size: 18px; letter-spacing: -.4px; }
  header.top .wm-academy { margin-left: .22em; }
}
@media (max-width: 370px) { header.top .wm-academy { display: none; } }

/* "ACADEMY" in small spaced capitals under "Skillglobal" */
.wm { display: block; }
.wm-academy, header.top .wm-academy {
  display: block; margin: 1px 0 0 1px; font-size: .36em; font-weight: 800; letter-spacing: .42em;
  text-transform: uppercase; line-height: 1.1;
}
header.top .wm-academy { color: #ffe08a; opacity: 1; }
header.top .slogan { margin-top: 2px; }
.hero-brand .wm-academy { color: #ffe08a; font-size: .34em; }
.welcome-body .wm-academy { color: var(--gold); font-size: .42em; margin-top: 4px; }
.login-card .wm-academy { color: var(--gold); }
@media (max-width: 600px) {
  header.top .wm-academy { font-size: .4em; letter-spacing: .34em; }
}
@media (max-width: 370px) { header.top .wm-academy { display: block; } }
header.top .wm-academy { font-size: 11.5px; letter-spacing: .38em; margin-top: 2px; }
header.top .slogan { font-size: 12px; }
@media (max-width: 600px) {
  header.top .wm-academy { font-size: 9.5px; letter-spacing: .32em; }
  header.top .slogan { font-size: 10.5px; }
}
.welcome-body h2 .wm-skill { margin-left: 0; }

/* ---- compact Santosh AI box with designation ---- */
.trainer-hero { grid-template-columns: minmax(300px, 1fr) 1.15fr; gap: 14px; }
.hero-card { padding: 14px 16px; gap: 10px; border-radius: 18px; }
.hero-trainer { gap: 12px; }
.hero-card .avatar { width: 64px; height: 64px; }
.hero-card #trainerName { font-size: 19px; line-height: 1.2; }
.hero-title {
  display: inline-block; align-self: flex-start; margin: 3px 0 2px; padding: 2px 9px; border-radius: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .2px; color: #2b1f00;
  background: linear-gradient(90deg, #ffd45c, #ffc93c);
}
.hero-card #trainerStatus { font-size: 12.5px; }
.quick-actions button { flex-direction: row; justify-content: center; padding: 7px 8px; font-size: 13px; gap: 6px; border-radius: 10px; }
.hero-foot-row { gap: 6px; }
.hero-card .voice-controls .toggle { padding: 5px 11px; font-size: 13px; }
.hero-card .voice-controls button, .hero-toggle { padding: 5px 12px; font-size: 13px; }
/* shorter video board */
.video-board { padding: 10px 12px; gap: 8px; border-radius: 18px; }
.vb-head { min-height: 28px; }
.vb-title { font-size: 15px; }
.vb-nav button { width: 28px; height: 28px; font-size: 18px; }
.vb-body { grid-template-columns: 1.2fr 1fr; gap: 10px; }
.vb-play { width: 50px; height: 50px; }
.vb-play svg { width: 24px; height: 24px; }
.vb-caption strong { font-size: 14.5px; }
.vb-thumb { width: 78px; }
.vb-list { gap: 4px; }
.vb-list button { padding: 4px; }
/* collapsed / no-video bar: one slim line */
.trainer-hero.collapsed .hero-card, .trainer-hero.no-videos .hero-card { padding: 10px 14px; gap: 10px 14px; }
.trainer-hero.collapsed .hero-card .avatar, .trainer-hero.no-videos .hero-card .avatar { width: 54px; height: 54px; }
@media (max-width: 600px) {
  .hero-card { padding: 10px 12px; gap: 8px; }
  .hero-card .avatar, .trainer-hero.collapsed .hero-card .avatar { width: 50px; height: 50px; }
  .hero-card #trainerName { font-size: 16px; }
  .hero-title { font-size: 10.5px; padding: 1px 7px; }
  .quick-actions button { font-size: 11.5px; padding: 6px 4px; flex-direction: row !important; }
}
/* collapsed bar: trainer on the left, actions stacked on the right */
.trainer-hero.collapsed .hero-card, .trainer-hero.no-videos .hero-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 16px; row-gap: 6px;
}
.trainer-hero.collapsed .hero-trainer, .trainer-hero.no-videos .hero-trainer { grid-row: 1 / span 2; }
.trainer-hero.collapsed .quick-actions, .trainer-hero.no-videos .quick-actions { justify-self: end; margin: 0; }
.trainer-hero.collapsed .hero-foot-row, .trainer-hero.no-videos .hero-foot-row { justify-self: end; flex-wrap: nowrap; }
.quick-actions button { white-space: nowrap; }
/* restore the stacked layout on tablets and phones (after the compact sizes above) */
@media (max-width: 900px) {
  .trainer-hero { grid-template-columns: 1fr; }
  .vb-body { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .trainer-hero.collapsed .hero-card, .trainer-hero.no-videos .hero-card { display: flex; flex-direction: column; align-items: stretch; }
  .trainer-hero.collapsed .quick-actions, .trainer-hero.no-videos .quick-actions,
  .trainer-hero.collapsed .hero-foot-row, .trainer-hero.no-videos .hero-foot-row { justify-self: auto; width: 100%; }
  .trainer-hero.collapsed .hero-foot-row, .trainer-hero.no-videos .hero-foot-row { justify-content: space-between; }
  .quick-actions button { font-size: 11px; padding: 6px 3px; gap: 4px; }
}
.hero-toggle { white-space: nowrap; }
@media (max-width: 600px) {
  .hero-card .voice-controls .toggle { padding: 5px 9px; font-size: 12px; }
  .hero-toggle { font-size: 12px; padding: 5px 10px; }
}

/* =====================================================================
   Fresh, bold selectors and chapter heading
   ===================================================================== */
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 600;
  padding-right: 38px; border: 1.5px solid var(--border); background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a7fe0' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
select:hover:not(:disabled) { border-color: var(--accent); }
select:disabled { cursor: default; opacity: 1; background-image: none; padding-right: 12px; }

/* course switcher */
.course-picker {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 8px 10px 8px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm);
  max-width: 620px;
}
.module-chip {
  flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 16px; letter-spacing: .5px; color: #fff; background: var(--grad-brand);
  box-shadow: 0 4px 12px rgba(10, 79, 168, .3), inset 0 -3px 0 var(--gold-bright);
}
.module-chip[data-module="mm"] { background: linear-gradient(135deg, #12a26b, #0b6b47); box-shadow: 0 4px 12px rgba(11, 107, 71, .3), inset 0 -3px 0 var(--gold-bright); }
.module-chip[data-module="fi"] { background: linear-gradient(135deg, #8a4fe0, #5a2aa8); box-shadow: 0 4px 12px rgba(90, 42, 168, .3), inset 0 -3px 0 var(--gold-bright); }
.picker-field { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.picker-field label, .course-picker label {
  margin: 0 0 2px 2px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.select-bold {
  font-size: 17px; font-weight: 800; letter-spacing: -.2px; color: var(--text); height: 44px; padding: 0 40px 0 12px;
  border: 1.5px solid transparent; border-radius: 10px; background-color: var(--surface-2); background-size: 18px;
}
.select-bold:hover:not(:disabled) { border-color: var(--accent); background-color: var(--surface); }
.select-bold:focus { border-color: var(--accent); background-color: var(--surface); }
#chapterSelect.select-bold { font-size: 15px; height: 46px; border: 1.5px solid var(--border); background-color: var(--surface); box-shadow: var(--shadow-sm); }

/* chapter heading */
.chapter-head { padding: 2px 0 4px; }
.ch-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.ch-mod { padding: 2px 8px; border-radius: 6px; color: #fff; background: var(--grad-brand); letter-spacing: .08em; }
.ch-mod[data-module="mm"] { background: linear-gradient(135deg, #12a26b, #0b6b47); }
.ch-mod[data-module="fi"] { background: linear-gradient(135deg, #8a4fe0, #5a2aa8); }
.ch-done { color: var(--ok); }
.chapter-head h2#chTitle { font-size: 27px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; margin: 0 0 10px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-chip {
  font-size: 12.5px; font-weight: 600; line-height: 1.3; padding: 5px 10px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(10, 95, 192, .18);
}
@media (prefers-color-scheme: dark) { .topic-chip { color: #9fcbff; border-color: rgba(77, 163, 255, .25); } }

/* lab and quiz pickers use the same bold look */
#labCourse, #labCourseM, #labSelect, #qModule, #qLevel, #qCount { font-weight: 700; height: 42px; }
.lab-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; }

@media (max-width: 760px) {
  .course-picker { max-width: none; padding: 6px 8px 6px 6px; gap: 10px; }
  .module-chip { width: 42px; height: 42px; font-size: 14px; }
  .select-bold { font-size: 15px; height: 40px; }
  .chapter-head h2#chTitle { font-size: 22px; }
  .topic-chips { max-height: 64px; overflow: hidden; position: relative; }
  .topic-chip { font-size: 11.5px; padding: 4px 8px; }
}
.course-picker { max-width: 840px; }
.topic-more { display: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(240,171,0,.35); }
@media (max-width: 760px) {
  .topic-chips { max-height: none; overflow: visible; }
  .topic-chips:not(.expanded) .topic-chip:nth-child(n+4) { display: none; }
  .topic-chips:not(.expanded) .topic-more { display: inline-flex; }
}
.course-picker select { max-width: none; }
#chTopics.topic-chips { display: flex; flex-wrap: wrap; -webkit-line-clamp: unset; -webkit-box-orient: initial; overflow: visible; }
.topic-chip { display: inline-flex; }

/* ---- one bar: [module] Choose course [▾] | Choose chapter [▾] ---- */
.course-picker { max-width: none; display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; }
.pick { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pick-course { flex: 1 1 42%; }
.pick-chapter { flex: 1 1 58%; }
.pick label {
  flex: none; margin: 0; white-space: nowrap; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold);
}
.pick select { flex: 1; min-width: 0; width: auto; }
.pick-divider { flex: none; width: 1px; align-self: stretch; margin: 6px 2px; background: var(--border); }
.course-picker #chapterSelect, .course-picker #chapterSelect.select-bold {
  display: block; margin: 0; height: 44px; font-size: 16px; border: 1.5px solid transparent; box-shadow: none; background-color: var(--surface-2);
}
.course-picker #chapterSelect:hover, .course-picker #chapterSelect:focus { border-color: var(--accent); background-color: var(--surface); }
@media (max-width: 900px) {
  .course-picker { flex-wrap: wrap; row-gap: 8px; }
  .pick-divider { display: none; }
  .pick-course, .pick-chapter { flex: 1 1 100%; }
  .module-chip { align-self: flex-start; }
  .pick-course { flex-basis: calc(100% - 60px); }
}
@media (max-width: 600px) {
  .course-picker { padding: 8px; gap: 8px 10px; }
  .pick { gap: 8px; }
  .pick label { width: 62px; white-space: normal; font-size: 10.5px; line-height: 1.15; letter-spacing: .06em; }
  .pick-chapter { padding-left: 0; }
  .course-picker #chapterSelect, .select-bold { height: 40px; font-size: 14.5px; }
}
@media (max-width: 900px) {
  .course-picker { display: grid; grid-template-columns: auto 1fr; align-items: center; }
  .course-picker .module-chip { grid-row: 1 / span 2; align-self: center; }
  .pick-course, .pick-chapter { grid-column: 2; }
}
@media (max-width: 600px) { .pick label { width: 58px; } }
@media (min-width: 901px) {
  .pick-course { flex: 1 1 52%; }
  .pick-chapter { flex: 1 1 48%; }
}
@media (max-width: 900px) { .pick label { width: 126px; } }
@media (max-width: 600px) { .pick label { width: 58px; } }

/* divider lines between menu tabs */
nav.tabs { gap: 12px; }
nav.tabs button + button::before {
  content: ""; position: absolute; left: -7px; top: 22%; bottom: 22%; width: 1.5px; border-radius: 2px;
  background: var(--border); pointer-events: none;
}
@media (max-width: 600px) { nav.tabs { gap: 10px; } nav.tabs button + button::before { left: -6px; } }

/* =====================================================================
   Guided Config
   ===================================================================== */
#panel-guide { overflow-y: auto; }
#panel-guide .chat-log { flex: none; overflow: visible; min-height: 0; }
.guide-intro h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; }
.guide-intro p { margin: 0 0 12px; }
.guide-custom { display: flex; gap: 8px; }
.guide-custom select { flex: none; width: 92px; height: 42px; }
.guide-custom input { flex: 1; height: 42px; }
.guide-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin: 20px 0 10px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.guide-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); min-height: 96px;
}
.guide-card:hover:not(:disabled) { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.guide-card strong { font-size: 15px; line-height: 1.3; }
.gc-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: auto; }
.gc-mod { font-size: 11px; font-weight: 800; color: #fff; padding: 2px 8px; border-radius: 6px; background: var(--grad-brand); letter-spacing: .06em; }
.gc-mod[data-module="mm"] { background: linear-gradient(135deg, #12a26b, #0b6b47); }
.gc-mod[data-module="fi"] { background: linear-gradient(135deg, #8a4fe0, #5a2aa8); }
.guide-card.resume { border-left: 4px solid var(--gold-bright); }
.gc-bar { width: 100%; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.gc-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-bright), var(--ok)); }
.guide-wait { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 600; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: av-spin .9s linear infinite; flex: none; }

/* running a guide */
.guide-top { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.guide-top #guideBack { flex: none; }
.guide-title h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.guide-progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-bottom: 14px; }
.guide-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-1), var(--gold-bright)); transition: width .35s ease; }
.step-card { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-md); }
.step-card.done { border-left-color: var(--ok); }
.step-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-num { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.step-card.done .step-num { font-size: 16px; letter-spacing: 0; text-transform: none; color: var(--ok); margin-bottom: 8px; }
.tcode { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; font-size: 15px; color: #fff; background: #0b0b0d; border: 2px solid var(--gold-bright); padding: 3px 10px; border-radius: 8px; letter-spacing: .04em; }
.step-title { font-size: 21px; font-weight: 800; margin: 8px 0 8px; letter-spacing: -.3px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; margin-bottom: 8px; }
.crumbs span { background: var(--surface-2); padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.crumbs i { font-style: normal; color: var(--gold); font-weight: 800; }
.screen-name { font-size: 13.5px; margin-bottom: 10px; color: var(--muted); }
.field-table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 4px 0 12px; }
.field-table th { text-align: left; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; border-bottom: 2px solid var(--border); }
.field-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.field-table td:first-child { font-weight: 700; white-space: nowrap; }
.field-table .val { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; }
.field-table td:last-child { color: var(--muted); font-size: 13px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.act { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; background: var(--gold-soft); border: 1px solid rgba(240,171,0,.35); padding: 4px 10px 4px 4px; border-radius: 999px; }
.act b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-bright); color: #2b1f00; font-size: 11px; }
.step-note { font-size: 14px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.step-note p { display: inline; margin: 0; }
.step-outline { padding-left: 22px; } .step-outline li { margin: 4px 0; }
.step-outline code { font-size: 12px; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.guide-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.guide-nav .primary { margin-left: auto; }
@media (max-width: 760px) {
  .guide-custom { flex-wrap: wrap; } .guide-custom input { flex-basis: calc(100% - 100px); } .guide-custom button { width: 100%; }
  .guide-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .step-card { padding: 14px; }
  .field-table thead { display: none; }
  .field-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .field-table td { border: none; padding: 0; }
  .field-table td:last-child { grid-column: 1 / -1; }
  .guide-nav button { flex: 1 1 calc(50% - 8px); }
  .guide-nav .primary { flex-basis: 100%; order: -1; margin: 0; }
}

/* ---- phones: Santosh AI box edge-to-edge, rectangular ---- */
@media (max-width: 600px) {
  .trainer-hero { width: 100%; margin: 0; gap: 0; }
  .hero-card, .video-board { border-radius: 0; box-shadow: none; }
  .hero-card { padding: 12px 14px; border-bottom: 3px solid var(--gold-bright); }
  .video-board { border-left: none; border-right: none; border-top: none; }
  .hero-card .avatar svg, .hero-card .avatar .avatar-photo { border-radius: 10px; }
  .hero-card .avatar .avatar-ring { border-radius: 12px; }
  .quick-actions button, .hero-card .voice-controls .toggle, .hero-card .voice-controls button, .hero-toggle { border-radius: 6px !important; }
  .vb-player { border-radius: 4px; }
}

/* ---- diagrams ---- */
.diagram { margin: 12px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.diagram-svg { padding: 14px; overflow-x: auto; text-align: center; background:
  radial-gradient(circle at 1px 1px, var(--surface-2) 1px, transparent 0) 0 0 / 16px 16px; }
.diagram-svg svg { max-width: 100%; height: auto; }
.diagram figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface); }
.diagram-tools { display: flex; gap: 6px; }
.diagram-tools button { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 700; }
.diagram-wait { display: flex; align-items: center; gap: 10px; padding: 18px; font-weight: 600; color: var(--muted); }
.diagram.zoomed { position: fixed; inset: 16px; z-index: 50; margin: 0; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.diagram.zoomed .diagram-svg { flex: 1; overflow: auto; display: grid; place-items: center; }
.diagram.zoomed .diagram-svg svg { max-width: none; width: min(1400px, 100%); }
pre.diagram-failed::before { content: "Diagram could not be drawn - showing its outline"; display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-family: inherit; }
.msg.user .diagram { color: var(--text); }
.diagram-svg { text-align: left; }
.diagram-svg svg { display: block; margin: 0 auto; max-width: none; }
.diagram-svg .node rect, .diagram-svg .node polygon { rx: 8px; ry: 8px; stroke-width: 1.6px; }
.diagram-svg .edgePath .path, .diagram-svg .flowchart-link { stroke-width: 2px; }
.diagram.zoomed .diagram-svg svg { width: auto !important; max-width: 100% !important; max-height: 100%; }
.diagram-svg .nodeLabel { white-space: nowrap; }
.diagram-svg foreignObject { overflow: visible; }

/* =====================================================================
   Fixed header: black / blue / gold
   ===================================================================== */
.sticky-top { position: sticky; top: 0; z-index: 30; flex: none; box-shadow: 0 8px 24px rgba(5, 10, 25, .28); }
header.top {
  background:
    radial-gradient(420px 140px at 88% -30%, rgba(255, 201, 60, .42), transparent 70%),
    radial-gradient(360px 120px at 30% 140%, rgba(26, 127, 224, .45), transparent 70%),
    linear-gradient(112deg, #050608 0%, #0b1424 22%, #0a2f6b 45%, #0a5fc0 68%, #0b2a5a 86%, #050608 100%);
  border-bottom: none; box-shadow: none; transition: padding .25s ease;
}
header.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, #ffc93c, #fff1b8, #ffc93c, #0a5fc0, #050608, #ffc93c, #fff1b8, #ffc93c);
  background-size: 300% 100%; animation: header-shine 9s linear infinite; inset: auto 0 0 0;
}
header.top::before {   /* soft gold diagonal glint */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(115deg, transparent 58%, rgba(255, 201, 60, .14) 62%, transparent 66%);
}
@keyframes header-shine { from { background-position: 0 0; } to { background-position: 300% 0; } }
@media (prefers-reduced-motion: reduce) { header.top::after { animation: none; } }
header.top .brand img { box-shadow: 0 0 0 2px #ffc93c, 0 0 18px rgba(255, 201, 60, .45), 0 6px 18px rgba(0,0,0,.4); }
header.top .meta button { background: rgba(0,0,0,.28); border-color: rgba(255, 201, 60, .45); }
header.top .meta button:hover { background: rgba(255, 201, 60, .18); }
header.top .chip { background: rgba(0,0,0,.3); border-color: rgba(255, 201, 60, .35); }
.ticker { border-top: none; }

/* compact header after scrolling */
.sticky-top.scrolled header.top { padding-top: 6px; padding-bottom: 6px; }
.sticky-top.scrolled header.top .brand img { width: 36px; height: 36px; }
.sticky-top.scrolled header.top .slogan { display: none; }
.sticky-top.scrolled .ticker-track { padding: 6px 0; }
header.top .brand img, header.top .wm { transition: width .25s, height .25s, font-size .25s; }
@media (max-width: 600px) {
  .sticky-top.scrolled header.top .brand img { width: 32px; height: 32px; }
  .sticky-top.scrolled nav.tabs { padding-top: 5px; padding-bottom: 5px; }
}
body.admin-page { height: auto; min-height: 100%; }
/* BTP module colour: teal */
.module-chip[data-module="btp"] { background: linear-gradient(135deg, #0fa3b1, #08707a); box-shadow: 0 4px 12px rgba(8, 112, 122, .3), inset 0 -3px 0 var(--gold-bright); }
.ch-mod[data-module="btp"], .gc-mod[data-module="btp"] { background: linear-gradient(135deg, #0fa3b1, #08707a); }
/* AI module colour: magenta-violet */
.module-chip[data-module="ai"] { background: linear-gradient(135deg, #e0459b, #8a2be2); box-shadow: 0 4px 12px rgba(138, 43, 226, .3), inset 0 -3px 0 var(--gold-bright); }
.ch-mod[data-module="ai"], .gc-mod[data-module="ai"] { background: linear-gradient(135deg, #e0459b, #8a2be2); }

/* ---- rich course dropdown ---- */
.cdrop { position: relative; flex: 1; min-width: 0; }
.cdrop-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.cdrop-btn:disabled { cursor: default; background-image: none; }
.cdrop-cur { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cdrop-meta { flex: none; font-size: 12px; font-weight: 800; color: var(--gold); background: var(--gold-soft); padding: 2px 8px; border-radius: 999px; }
.cdrop-open .cdrop-btn { border-color: var(--accent); background-color: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.cdrop-panel {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: max(100%, 460px); max-height: 70vh; overflow-y: auto;
  padding: 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(5, 10, 25, .28), 0 0 0 1px rgba(255, 201, 60, .25);
  animation: cdrop-in .18s ease-out;
}
.cdrop-panel[hidden] { display: none; }
@keyframes cdrop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.cdrop-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.cdrop-head span { background: #0b0b0d; color: #ffc93c; padding: 1px 8px; border-radius: 999px; letter-spacing: 0; }
.cdrop-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px; margin: 2px 0; border-radius: 12px; border: 1px solid transparent; background: transparent; }
.cdrop-item:hover, .cdrop-item:focus-visible { background: var(--surface-2); border-color: var(--border); outline: none; transform: translateX(2px); }
.cdrop-item.current { background: linear-gradient(90deg, var(--accent-soft), transparent); border-color: rgba(10, 95, 192, .3); box-shadow: inset 4px 0 0 var(--gold-bright); }
.cdrop-badge { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--grad-brand); box-shadow: inset 0 -3px 0 var(--gold-bright), 0 4px 10px rgba(0,0,0,.15); }
.cdrop-badge[data-module="mm"] { background: linear-gradient(135deg, #12a26b, #0b6b47); }
.cdrop-badge[data-module="fi"] { background: linear-gradient(135deg, #8a4fe0, #5a2aa8); }
.cdrop-badge[data-module="btp"] { background: linear-gradient(135deg, #0fa3b1, #08707a); }
.cdrop-badge[data-module="ai"] { background: linear-gradient(135deg, #e0459b, #8a2be2); }
.cdrop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cdrop-title { font-weight: 800; font-size: 14.5px; line-height: 1.25; color: var(--text); }
.cdrop-sub { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.cdrop-bar { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.cdrop-bar span { display: block; height: 100%; min-width: 4px; background: linear-gradient(90deg, var(--gold-bright), var(--ok)); border-radius: 99px; }
.cdrop-check { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.cdrop-item.current .cdrop-check { background: var(--accent); color: #fff; }
@media (max-width: 600px) {
  .cdrop-panel { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 75vh; border-radius: 20px; animation: cdrop-up .22s ease-out; }
  @keyframes cdrop-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
  .cdrop-meta { display: none; }
}
@media (max-width: 600px) {
  body.sheet-open::before { content: ""; position: fixed; inset: 0; background: rgba(5, 10, 25, .5); z-index: 35; }
  body.sheet-open .course-picker { position: relative; z-index: 36; }
}

/* =====================================================================
   Skillzia brand
   ===================================================================== */
:root { --navy: #061a3a; --zia-blue: #0a66e8; }
.wm-zia {
  display: inline-block; font-weight: 800; letter-spacing: -.035em; text-transform: lowercase; line-height: 1;
  color: var(--navy); white-space: nowrap;
}
@media (prefers-color-scheme: dark) { .wm-zia { color: #fff; } }
.spk { position: relative; display: inline-block; }
.spk::before {
  content: ""; position: absolute; left: 50%; top: -.02em; width: .36em; height: .36em; transform: translate(-50%, -38%);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C13 7 17 11 24 12C17 13 13 17 12 24C11 17 7 13 0 12C7 11 11 7 12 0Z' fill='%23f5b301'/%3E%3C/svg%3E");
  animation: spk-twinkle 3.6s ease-in-out infinite;
}
.spk-b::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0C13 7 17 11 24 12C17 13 13 17 12 24C11 17 7 13 0 12C7 11 11 7 12 0Z' fill='%237cb6ff'/%3E%3C/svg%3E");
  animation-delay: 1.8s;
}
@keyframes spk-twinkle { 0%, 100% { transform: translate(-50%, -38%) scale(1) rotate(0); } 50% { transform: translate(-50%, -38%) scale(1.18) rotate(20deg); } }
@media (prefers-reduced-motion: reduce) { .spk::before { animation: none; } }
.slogan { color: inherit; font-weight: 700; letter-spacing: 0; }
.slogan b { color: #f5b301; font-weight: 800; }

/* header */
header.top .wm-zia { color: #fff; font-size: 30px; }
header.top .slogan { color: rgba(255,255,255,.92); font-size: 12.5px; margin-top: 3px; }
header.top {
  background:
    radial-gradient(420px 140px at 88% -30%, rgba(245, 179, 1, .38), transparent 70%),
    radial-gradient(380px 130px at 26% 150%, rgba(10, 102, 232, .55), transparent 70%),
    linear-gradient(112deg, #030a18 0%, var(--navy) 24%, #0a3a8c 50%, var(--zia-blue) 70%, #082a66 86%, #030a18 100%);
}
header.top .brand img { border-radius: 12px; box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 20px rgba(10, 102, 232, .55), 0 6px 18px rgba(0,0,0,.4); }
@media (max-width: 600px) { header.top .wm-zia { font-size: 25px; } header.top .slogan { font-size: 10.5px; } }

/* login */
.hero-brand .wm-zia { color: #fff; font-size: 46px; }
.hero-brand .slogan { color: #fff; font-size: 17px; margin-top: 6px; }
.login-hero { background:
  radial-gradient(520px 300px at 95% -5%, rgba(245, 179, 1, .25), transparent 70%),
  radial-gradient(600px 400px at -10% 110%, rgba(10, 102, 232, .45), transparent 70%),
  linear-gradient(150deg, var(--navy) 0%, #08285c 55%, #0a4fb8 100%); }
.hero-foot { letter-spacing: .14em; font-weight: 700; font-size: 12px; color: #9fb4d6; }
.login-card .login-brand .wm-zia { font-size: 34px; }
.login-card .login-brand .slogan { color: var(--text); margin-top: 6px; }
.login-brand .wm-wrap { margin-top: 8px; }

/* welcome pop-up */
.welcome-top { background: linear-gradient(135deg, var(--navy), #0a4fb8); }
.welcome-body h2 .wm-zia { font-size: 40px; margin-top: 6px; }
.welcome-by { margin: 2px 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* =====================================================================
   Whiteboard
   ===================================================================== */
body.wb-open { overflow: hidden; }
.wb { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #0b1424; }
.wb[hidden] { display: none; }
.wb-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #fff;
  background: linear-gradient(112deg, #030a18, #061a3a 40%, #0a3a8c); border-bottom: 3px solid #f5b301; }
.wb-badge { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: #f5b301; color: #2b1f00; padding: 3px 10px; border-radius: 6px; white-space: nowrap; }
.wb-title { font-size: 16px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-count { font-size: 12.5px; color: #9fb4d6; white-space: nowrap; }
.wb-spacer { flex: 1; }
.wb-top button { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(245,179,1,.5); border-radius: 8px; padding: 6px 12px; font-weight: 700; white-space: nowrap; }
.wb-top .wb-play { background: #f5b301; color: #2b1f00; border-color: #f5b301; }
.wb-top .wb-close { padding: 6px 10px; }
.wb-stage { flex: 1; overflow: auto; padding: 18px; background:
  radial-gradient(circle at 20% 0%, rgba(10,102,232,.25), transparent 50%), #0b1424; }
.wb-board {
  position: relative; max-width: 1100px; min-height: 100%; margin: 0 auto; border-radius: 10px;
  background: #fdfdfb; border: 12px solid #c9ced6; outline: 2px solid #8b939f;
  box-shadow: inset 0 0 40px rgba(0,0,0,.05), 0 20px 50px rgba(0,0,0,.45);
}
.wb-board::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: -12px; height: 8px; border-radius: 0 0 6px 6px; background: #8b939f; } /* marker tray */
.wb-slide { padding: 26px 34px 40px; font-family: Kalam, "Plus Jakarta Sans", cursive; font-size: 22px; line-height: 1.5; color: #0b2a5a; }
.wb-slide.blank { min-height: 70vh; }
.wb-h { font-family: Kalam, cursive; font-weight: 700; font-size: 34px; line-height: 1.2; margin: 0 0 14px; color: #0a66e8;
  border-bottom: 3px solid #f5b301; display: inline-block; padding-bottom: 2px; }
.wb-slide h3 { font-weight: 700; color: #d99500; font-size: 25px; margin: 14px 0 6px; }
.wb-slide ul, .wb-slide ol { padding-left: 30px; margin: 6px 0; }
.wb-slide li { margin: 6px 0; }
.wb-slide ul li::marker { color: #d92d20; }
.wb-slide strong { color: #d92d20; }
.wb-slide code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8em; background: #eef4ff; color: #0a4fb8; padding: 1px 6px; border-radius: 4px; }
.wb-slide table { border-collapse: collapse; font-family: "Plus Jakarta Sans", sans-serif; font-size: 15px; margin: 10px 0; display: block; overflow-x: auto; }
.wb-slide th, .wb-slide td { border: 2px solid #0b2a5a; padding: 6px 10px; text-align: left; }
.wb-slide th { background: #fff4d6; }
.wb-slide .diagram { box-shadow: none; border: 2px dashed #0a66e8; background: transparent; }
.wb-slide .diagram-svg { background: transparent; }
.wb-hide { visibility: hidden; }
.wb-write { animation: wb-write .7s ease-out both; }
@keyframes wb-write { from { clip-path: inset(0 100% 0 0); opacity: .4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wb-write { animation: none; } }
.wb-ink { position: absolute; left: 0; top: 0; pointer-events: none; touch-action: auto; }
.wb.wb-drawing .wb-ink { pointer-events: auto; touch-action: none; cursor: crosshair; }
.wb-textin { position: absolute; z-index: 2; font: 700 20px Kalam, sans-serif; background: rgba(255,255,255,.9); border: 2px dashed currentColor; border-radius: 6px; padding: 2px 6px; width: 260px; }
.wb-bottom { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #061a3a; border-top: 1px solid #1d3360; }
.wb-tools { display: flex; align-items: center; gap: 6px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.wb-tools::-webkit-scrollbar { display: none; }
.wb-tools button { flex: none; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 8px; background: #0f2650; color: #fff; border: 1px solid #23407a; font-size: 16px; font-weight: 700; }
.wb-tools button.on { background: #0a66e8; border-color: #f5b301; box-shadow: 0 0 0 2px rgba(245,179,1,.35); }
.wb-color { width: 30px !important; min-width: 30px !important; height: 30px !important; border-radius: 50% !important; background: var(--c) !important; border: 3px solid #fff !important; padding: 0 !important; }
.wb-color.on { box-shadow: 0 0 0 3px #f5b301 !important; }
.wb-size i { display: inline-block; border-radius: 50%; background: #fff; }
.wb-sep { flex: none; width: 1px; height: 26px; background: #23407a; margin: 0 2px; }
.wb-addpage { font-size: 13px !important; }
.wb-nav { display: flex; gap: 8px; flex: none; }
.wb-nav button { height: 40px; white-space: nowrap; }
.wb-nav .wb-prev { background: #0f2650; color: #fff; border-color: #23407a; }
.msg-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.msg-actions .wb-launch { background: #fff4d6; color: #8a5a00; }
.hero-card .voice-controls #wbOpen { background: rgba(245,179,1,.22); border-color: #f5b301; }
@media (max-width: 700px) {
  .wb-top { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
  .wb-title { order: 10; flex-basis: 100%; font-size: 14px; }
  .wb-stage { padding: 8px; }
  .wb-board { border-width: 6px; }
  .wb-slide { padding: 16px 16px 28px; font-size: 18px; }
  .wb-h { font-size: 26px; }
  .wb-bottom { flex-direction: column; align-items: stretch; gap: 6px; }
  .wb-nav button { flex: 1; }
}
