/* student.css - student area (onboarding, dashboard, course, lesson, exam, payments, certificates, live room).
 * Auto-loaded after app.css. Mobile-first; tokens come from app.css :root. */

/* ---------- shared bits ---------- */
.pbar { height: 8px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #20a79c); transition: width .4s; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; min-height: 32px; }
.back-link:hover { color: var(--navy); }
.nowrap { white-space: nowrap; } .block { display: block; } .end { justify-content: flex-end; } .center-row { justify-content: center; } .center { text-align: center; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; } .sec-head h3 { margin: 0; }
.ct-code { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--gold-d); text-transform: uppercase; }
.badge.pulse { animation: pulse 1.4s ease-in-out infinite; }
.notice.ok { background: var(--green-l); color: var(--green); }
.notice ul { margin: 6px 0 8px; padding-left: 20px; }
.nav-badge.inline { position: static; display: inline-grid; margin-left: auto; }

/* ---------- access banner ---------- */
.banners { display: grid; gap: 12px; }
.access-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid; flex-wrap: wrap; }
.access-banner .ab-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.7); }
.ab-main { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; font-size: .92rem; line-height: 1.35; } .ab-main b { font-size: .98rem; }
.access-banner .btn { flex: none; }
.access-banner.tone-info { background: var(--blue-l); border-color: #C9DAF2; color: #17406F; }
.access-banner.tone-warn { background: var(--amber-l); border-color: #F1D79D; color: #6F4304; }
.access-banner.tone-danger { background: var(--red-l); border-color: #F3C3BE; color: #8B1A10; }
.access-banner.tone-ok { background: var(--green-l); border-color: #BFE4CD; color: #0F5A33; }
@media (max-width: 520px) { .access-banner .btn { width: 100%; } }

/* ---------- onboarding wizard (no app shell) ---------- */
.join-page { min-height: 100dvh; background: var(--ivory); }
.join-top { display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--sat)) max(16px, var(--sar)) 10px max(16px, var(--sal)); background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.join-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; } .join-brand b { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.join-top .btn-ghost { color: #fff; } .join-top .btn-ghost:hover { background: rgba(255,255,255,.12); } .join-user { color: #C5D0E2 !important; display: none; }
@media (min-width: 700px) { .join-user { display: inline; } }
@media (max-width: 380px) { .join-brand b { display: none; } }
.join-main { padding: 20px max(16px, var(--sar)) calc(40px + var(--sab)) max(16px, var(--sal)); outline: none; }
.wiz { max-width: 820px; margin: 0 auto; } .wiz.narrow { max-width: 560px; }
.wiz-head h1 { font-size: clamp(1.4rem, 5vw, 2rem); margin-bottom: 4px; }
.wiz-steps { list-style: none; display: flex; margin: 20px 0; padding: 0; counter-reset: ws; }
.wiz-step { flex: 1; position: relative; text-align: center; }
.wiz-step > * { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; background: none; border: 0; padding: 0; font: inherit; color: var(--muted); }
.wiz-step button { cursor: pointer; }
.wiz-step:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 3px; border-radius: 3px; background: var(--line-2); }
.wiz-step.is-done:not(:last-child)::after { background: var(--teal); }
.wiz-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--paper); border: 2px solid var(--line-2); color: var(--muted); position: relative; z-index: 1; }
.wiz-step.is-on .wiz-dot { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 0 0 0 4px rgba(11,31,58,.12); }
.wiz-step.is-done .wiz-dot { background: var(--teal); border-color: var(--teal); color: #fff; }
.wiz-lbl { font-size: .8rem; font-weight: 600; } .wiz-step.is-on .wiz-lbl { color: var(--navy); }
.wiz-form .form-actions { margin-top: 20px; } .wiz-form .form-actions .btn { width: 100%; min-height: 48px; }
.wiz-form .form-group { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 1rem; } .wiz-form .form-group:first-child { border: 0; padding: 0; margin: 0; }
.guardian-box[hidden] { display: none; }

/* course/plan picker */
.course-pick { display: grid; gap: 12px; }
.pick-card { display: flex; gap: 14px; text-align: left; width: 100%; padding: 16px; border-radius: var(--r); border: 1.5px solid var(--line-2); background: var(--paper); cursor: pointer; align-items: flex-start; min-height: 64px; }
.pick-card:hover { border-color: var(--navy-3); } .pick-card.is-on { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.14); background: #F7FCFB; }
.pick-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; margin-top: 2px; position: relative; } .pick-card.is-on .pick-radio { border-color: var(--teal); } .pick-card.is-on .pick-radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--teal); }
.pick-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .pick-main b { font-size: 1.05rem; color: var(--navy); } .pick-main small { color: var(--muted); } .pick-code { font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: var(--gold-d); } .pick-meta { font-size: .85rem; color: var(--ink); margin-top: 4px; }
.plan-card .card-body { display: grid; gap: 16px; } .plan-card h3 { margin: 0; } .plan-card .plan-list { margin: 0; }
.plan-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; } .plan-facts dt { font-size: .78rem; color: var(--muted); } .plan-facts dd { margin: 0; font-weight: 800; font-size: 1.15rem; color: var(--navy); }
.rule-box { background: var(--gold-l); border-radius: var(--r-sm); padding: 12px 14px; font-size: .9rem; color: #4F3C0E; } .rule-box b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; } .rule-box ul { margin: 0; padding-left: 20px; } .rule-box li { margin: 3px 0; }
.sel-summary .sel-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-l); color: var(--teal-d); }
.hold-head { display: flex; gap: 14px; align-items: flex-start; } .hold-head h2 { margin-bottom: 4px; } .hold-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--amber-l); color: var(--amber); }
.other-pay { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px; } .other-pay summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--navy); } .other-pay[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 16px; } .other-pay > .pay-chooser { padding-bottom: 16px; }
.done-ic { display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--green-l); color: var(--green); margin: 0 auto; } .done-ic.warn { background: var(--amber-l); color: var(--amber); } .done-ic.bad { background: var(--red-l); color: var(--red); }
.result-card, .done-card { margin-top: 12px; } .result-card .card-body { padding: 28px 20px; }
.big-score { font-size: 3.4rem; font-weight: 800; color: var(--navy); line-height: 1; }

/* ---------- payment chooser ---------- */
.pay-chooser h3 { margin: 0 0 8px; } .pay-chooser h4 { margin: 0 0 10px; font-size: 1rem; }
.pay-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; margin: 0; } .pay-sum dt { font-size: .76rem; color: var(--muted); } .pay-sum dd { margin: 0; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; } .pay-sum.center-sum { text-align: center; margin: 16px 0; }
.amt-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.amt-opt { flex: 1 1 140px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper); cursor: pointer; text-align: left; min-height: 56px; } .amt-opt b { font-size: 1.1rem; color: var(--navy); } .amt-opt small { color: var(--muted); }
.amt-opt.is-on { border-color: var(--teal); background: var(--teal-l); box-shadow: 0 0 0 1px var(--teal) inset; }
.access-calc { margin: 6px 0 0; }
.method-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; } .method-tabs:has(> :only-child) { grid-template-columns: 1fr; }
.method-tab { display: flex; align-items: center; gap: 10px; text-align: left; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--paper); cursor: pointer; min-height: 60px; color: var(--navy); } .method-tab span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; } .method-tab small { color: var(--muted); font-size: .72rem; }
.method-tab[aria-selected=true] { border-color: var(--navy); background: #F2F5FA; box-shadow: 0 0 0 1px var(--navy) inset; }
.bank-card { border: 1.5px dashed var(--gold); background: #FFFBF0; border-radius: 12px; padding: 14px; display: grid; gap: 8px; } .bank-head { display: flex; align-items: center; gap: 8px; color: var(--navy); }
.copy-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); } .copy-row div { display: flex; flex-direction: column; min-width: 0; } .copy-row small { color: var(--muted); font-size: .74rem; } .copy-row b { overflow-wrap: anywhere; font-size: 1rem; }
.transfer-form { background: var(--paper); }
.pending-list { display: grid; gap: 8px; } .pending-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); } .pending-row > div:first-child { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.hold-card { border-color: #F1D79D; background: #FFFDF6; }

/* ---------- dashboard ---------- */
.dash { display: grid; gap: 24px; } .dash-main, .dash-side { min-width: 0; }
@media (min-width: 1000px) { .dash { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.hero-card { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%); color: #fff; border-radius: var(--r-lg); padding: 22px 20px; display: grid; gap: 16px; position: relative; overflow: hidden; }
.hero-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,74,.35), transparent 70%); }
.hero-card h2 { color: #fff; margin: 0 0 4px; } .hero-card p { margin: 0; color: #C5D0E2; } .hero-kick { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold) !important; }
.hero-cta { justify-content: flex-start; text-align: left; padding: 12px 18px; z-index: 1; } .hero-cta span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } .hero-cta small { font-weight: 600; opacity: .8; } .hero-cta b { overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 700px) { .hero-card { grid-template-columns: 1fr auto; align-items: center; padding: 28px; } }
.tile-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.course-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; box-shadow: var(--sh-1); }
.ct-head { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; } .ct-head b { color: var(--navy); font-size: 1.05rem; line-height: 1.25; } .ct-head small { color: var(--muted); }
.ct-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .ct-foot { margin-top: 2px; }
.ann-list { display: grid; gap: 10px; } .ann { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--r-sm); padding: 12px 14px; } .ann p { margin: 6px 0 0; } .ann .ic { color: var(--gold-d); }
.mini-stats { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; } .mini-stats .stat { padding: 14px; gap: 10px; flex-direction: column; align-items: flex-start; } .mini-stats .stat-value { font-size: 1.2rem; }
@media (min-width: 1000px) { .mini-stats .stat { flex-direction: row; align-items: center; } }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; } .quick-link { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 10px; background: var(--ivory); color: var(--navy); text-decoration: none; font-weight: 600; font-size: .9rem; min-height: 48px; } .quick-link:hover { background: var(--sand); }
.cert-mini { list-style: none; margin: 0; padding: 4px 8px 8px; } .cert-mini a { display: flex; gap: 10px; align-items: center; padding: 10px 8px; text-decoration: none; color: var(--navy); border-radius: 8px; } .cert-mini a:hover { background: var(--ivory); } .cert-mini span { display: flex; flex-direction: column; } .cert-mini .ic { color: var(--gold-d); }
.live-list { list-style: none; margin: 0; padding: 0; } .card.live-list { overflow: hidden; }
.live-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; } .live-list > .live-row:first-child { border-top: 0; }
.live-date { width: 44px; height: 48px; border-radius: 10px; background: var(--teal-l); color: var(--teal-d); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; flex: none; } .live-date b { font-size: 1.15rem; } .live-date small { font-size: .68rem; text-transform: uppercase; font-weight: 700; }
.live-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 140px; } .live-main b { color: var(--navy); } .live-main small { overflow-wrap: anywhere; }
.btn.disabled[aria-disabled=true] { pointer-events: none; }

/* ---------- course page ---------- */
.course-head { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 16px; } .course-head h2 { margin: 2px 0 4px; } .course-head p { color: var(--muted); margin: 0 0 8px; }
.course-prog { display: grid; gap: 6px; align-content: start; } .course-prog .big { font-size: 2rem; color: var(--navy); line-height: 1; }
@media (min-width: 700px) { .course-head { grid-template-columns: 1fr 240px; align-items: center; } }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ls-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 60px; } a.ls-link:hover { border-color: var(--teal); box-shadow: var(--sh-1); }
.ls-n { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; background: var(--teal-l); color: var(--teal-d); }
.ls-item.done .ls-n { background: var(--green); color: #fff; } .ls-item.locked .ls-link { opacity: .6; background: var(--ivory); } .ls-item.locked .ls-n { background: var(--sand); color: var(--muted); }
.ls-main { display: flex; flex-direction: column; flex: 1; min-width: 0; } .ls-main b { color: var(--navy); line-height: 1.3; } .ls-main small { overflow-wrap: anywhere; }
.mat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .mat-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; } .mat-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--blue-l); color: var(--blue); display: grid; place-items: center; flex: none; } .lock-note { display: inline-flex; align-items: center; gap: 4px; }
.exam-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; } .exam-facts > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: flex; flex-direction: column; } .exam-facts small { color: var(--muted); } .exam-facts b { color: var(--navy); font-size: 1.1rem; }

/* ---------- lesson page ---------- */
.lesson { max-width: 880px; margin: 0 auto; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); } .lesson > * { min-width: 0; } .lesson-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .lesson-head h1 { margin: 2px 0 0; font-size: clamp(1.5rem, 5vw, 2.1rem); }
.objectives { padding: 0; } .objectives summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 6px; } .objectives ul { margin: 0; padding: 0 16px 14px 36px; } .objectives li { margin: 4px 0; }
.summary-card ul { margin: 0; padding-left: 20px; } .summary-card li { margin: 4px 0; }
.lesson-sec .card-head h3 { display: flex; align-items: center; gap: 6px; }
.prose { font-size: 1.04rem; line-height: 1.75; color: var(--ink); overflow-wrap: break-word; word-wrap: break-word; min-width: 0; }
.prose h2 { font-size: 1.4rem; margin: 1.8em 0 .5em; padding-top: .2em; } .prose h3 { font-size: 1.15rem; margin: 1.5em 0 .4em; } .prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; } .prose ul, .prose ol { padding-left: 1.4em; } .prose li { margin: .3em 0; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; } .prose a { color: var(--teal-d); }
.prose code { background: var(--sand); padding: 1px 6px; border-radius: 6px; font-size: .88em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.prose blockquote { margin: 1em 0; padding: 8px 16px; border-left: 4px solid var(--gold); background: var(--gold-l); border-radius: 0 8px 8px 0; }
.tbl-scroll { overflow-x: auto; margin: 0 0 1em; -webkit-overflow-scrolling: touch; } .prose table { border-collapse: collapse; min-width: 100%; font-size: .94rem; } .prose th, .prose td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; } .prose th { background: var(--sand); }
.codeblock { margin: 1.1em 0; border-radius: 12px; overflow: hidden; background: #0F1B2D; box-shadow: var(--sh-1); }
.codebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 14px; background: #16253D; color: #9FB3D1; font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.codebtns { display: flex; gap: 6px; } .codebar button { font: inherit; font-size: .74rem; font-weight: 700; letter-spacing: 0; border: 0; border-radius: 8px; padding: 6px 12px; min-height: 32px; cursor: pointer; background: rgba(255,255,255,.12); color: #fff; } .codebar button:hover { background: rgba(255,255,255,.22); } .codebar .try-btn { background: var(--gold); color: var(--navy); } .codebar .try-btn:hover { background: #D6B15C; } .codebar .copy-btn.is-ok { background: var(--teal); }
.codeblock pre { margin: 0; padding: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; color: #E6EEF9; font-size: .86rem; line-height: 1.6; tab-size: 2; } .codeblock pre code { background: none; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; white-space: pre; }
.callout { margin: 1.1em 0; padding: 12px 14px; border-radius: 10px; border-left: 4px solid var(--blue); background: var(--blue-l); color: #17406F; font-size: .96rem; line-height: 1.55; } .callout > strong { display: block; margin-bottom: 2px; } .callout > div > p:last-child { margin-bottom: 0; }
.callout.tip { border-color: var(--green); background: var(--green-l); color: #0F5A33; } .callout.warn { border-color: var(--red); background: var(--red-l); color: #8B1A10; } .callout.note { border-color: var(--muted); background: var(--sand); color: var(--ink); } .callout.key { border-color: var(--gold); background: var(--gold-l); color: #4F3C0E; } .callout.task { border-color: var(--teal); background: var(--teal-l); color: #0A4A45; }
.sol-code { margin: 0; padding: 14px; background: #0F1B2D; color: #E6EEF9; border-radius: 10px; overflow: auto; max-height: 55vh; font-size: .85rem; white-space: pre-wrap; word-break: break-word; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 4px; }

/* editor */
.editor { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: var(--paper); }
.ed-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; background: var(--ivory); border-bottom: 1px solid var(--line); }
.ed-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: var(--paper); } .ed-seg-btn { border: 0; background: none; padding: 8px 14px; font-weight: 600; font-size: .85rem; color: var(--muted); cursor: pointer; min-height: 36px; } .ed-seg-btn[aria-pressed=true] { background: var(--navy); color: #fff; }
.ed-status { margin-left: auto; }
.ed-split { display: grid; grid-template-columns: 1fr; }
.ed-tabs { display: flex; background: #16253D; } .ed-tab { border: 0; background: none; color: #9FB3D1; padding: 10px 18px; font-weight: 700; font-size: .8rem; letter-spacing: .06em; cursor: pointer; border-bottom: 3px solid transparent; min-height: 40px; } .ed-tab[aria-selected=true] { color: #fff; border-bottom-color: var(--gold); background: #0F1B2D; }
.ed-areas { background: #0F1B2D; } .code-area { display: block; width: 100%; height: 300px; min-height: 200px; resize: vertical; border: 0; outline: none; padding: 12px 14px; background: #0F1B2D; color: #E6EEF9; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; tab-size: 2; white-space: pre; overflow: auto; } .code-area[hidden] { display: none; } .code-area:focus { box-shadow: inset 0 0 0 2px rgba(201,162,74,.5); }
.ed-prevbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--sand); font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ed-frame { display: block; width: 100%; height: 300px; border: 0; background: #fff; } .ed-err { padding: 8px 12px; background: var(--red-l); color: var(--red); font-size: .85rem; } .ed-err[hidden] { display: none; }
@media (max-width: 899px) { .editor[data-view=code] .ed-prevpane { display: none; } .editor[data-view=preview] .ed-codepane { display: none; } .editor[data-view=preview] .ed-frame { height: 360px; } }
@media (min-width: 900px) { .ed-seg { display: none; } .ed-split { grid-template-columns: 1fr 1fr; } .ed-codepane { border-right: 1px solid var(--line); } .code-area, .ed-frame { height: 380px; } .ed-prevpane { display: flex; flex-direction: column; } .ed-frame { flex: 1; } }

/* quiz */
.q-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 0 0 14px; min-width: 0; background: var(--paper); } .q-card legend { padding: 0; float: left; margin-right: 10px; } .q-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; font-size: .85rem; }
.q-text { margin: 0 0 12px; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; line-height: 1.45; } .q-card .opts, .q-card .fill-input, .q-card .q-feedback, .q-card small { clear: both; }
.opts { display: grid; gap: 8px; }
.opt-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--paper); min-height: 48px; position: relative; }
.opt-row input { position: absolute; opacity: 0; pointer-events: none; }
.opt-mark { width: 22px; height: 22px; border: 2px solid var(--line-2); border-radius: 50%; flex: none; margin-top: 1px; display: grid; place-items: center; } input[type=checkbox] ~ .opt-mark { border-radius: 6px; }
.opt-row:has(input:checked) { border-color: var(--teal); background: var(--teal-l); } .opt-row:has(input:checked) .opt-mark { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 4px var(--teal-l); } input[type=checkbox]:checked ~ .opt-mark { box-shadow: none; }
.opt-row:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.opt-text { min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.opt-row.is-right, .opt-row.is-right:has(input:checked) { border-color: var(--green); background: var(--green-l); } .opt-row.is-wrong, .opt-row.is-wrong:has(input:checked) { border-color: var(--red); background: var(--red-l); } .opt-row.is-right .opt-mark { background: var(--green); border-color: var(--green); } .opt-row.is-wrong .opt-mark { background: var(--red); border-color: var(--red); }
.fill-input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; font: inherit; font-size: 1rem; background: var(--paper); } .fill-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,118,110,.15); }
.q-feedback { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: .92rem; display: grid; gap: 2px; } .q-feedback.ok { background: var(--green-l); color: var(--green); } .q-feedback.bad { background: var(--red-l); color: #8B1A10; } .q-feedback b { display: flex; align-items: center; gap: 4px; }
.quiz-result { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--r); flex-wrap: wrap; } .quiz-result.pass { background: var(--green-l); } .quiz-result.fail { background: var(--amber-l); }
.qr-score { display: flex; flex-direction: column; align-items: center; min-width: 90px; } .qr-score b { font-size: 2.4rem; line-height: 1; color: var(--navy); } .qr-main { flex: 1 1 220px; } .qr-main h3 { margin-bottom: 4px; } .qr-main p { margin: 0 0 10px; }

/* ---------- exam ---------- */
.rules { display: grid; gap: 10px; margin: 0; } .rules > div { display: grid; gap: 2px; padding: 10px 12px; background: var(--ivory); border-radius: var(--r-sm); } .rules dt { font-weight: 700; color: var(--navy); } .rules dd { margin: 0; color: var(--ink); }
@media (min-width: 700px) { .rules > div { grid-template-columns: 140px 1fr; gap: 12px; } }
body.exam-mode .tabbar, body.exam-mode .fab-stack { display: none !important; }
@media (max-width: 699px) { body.exam-mode .view { padding-bottom: 24px; } }
.exam-run { display: grid; gap: 14px; max-width: 1000px; margin: 0 auto; }
.ex-bar { position: sticky; top: calc(56px + var(--sat)); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: var(--r); box-shadow: var(--sh-2); } .ex-bar .small { color: #C5D0E2; }
@media (min-width: 700px) { .ex-bar { top: calc(var(--top-h) + 8px); } }
.ex-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.35rem; padding: 6px 14px; border-radius: 10px; background: rgba(255,255,255,.12); letter-spacing: .03em; } .ex-timer.warn { background: var(--amber); color: #fff; } .ex-timer.danger { background: var(--red); color: #fff; animation: pulse 1s ease-in-out infinite; }
.ex-body { display: grid; gap: 14px; } @media (min-width: 900px) { .ex-body { grid-template-columns: minmax(0, 1fr) 240px; align-items: start; } .ex-side { position: sticky; top: 150px; } }
.ex-qhead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ex-pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; } .ex-pager .btn { flex: 1; }
.ex-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-bottom: 12px; }
.ex-dot { height: 40px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--paper); font-weight: 700; color: var(--muted); cursor: pointer; position: relative; } .ex-dot.is-ans { background: var(--teal-l); border-color: var(--teal); color: var(--teal-d); } .ex-dot.is-flag::after { content: ""; position: absolute; top: 3px; right: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); } .ex-dot.is-cur { background: var(--navy); border-color: var(--navy); color: #fff; }
.ex-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; color: var(--muted); } .ex-legend .d { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--line-2); margin-right: 6px; vertical-align: -1px; } .ex-legend .d.ans { background: var(--teal-l); border-color: var(--teal); } .ex-legend .d.flag { background: var(--gold); border-color: var(--gold); }
.exam-result.pass { border-top: 4px solid var(--green); } .exam-result.fail { border-top: 4px solid var(--red); }

/* ---------- payments / receipts ---------- */
.pay-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.pay-nums { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; } .pay-nums > div { display: flex; flex-direction: column; } .pay-nums small { color: var(--muted); font-size: .76rem; } .pay-nums b { color: var(--navy); font-size: 1.05rem; overflow-wrap: anywhere; }
.pay-card .access-banner { padding: 10px 12px; }
#make-payment .card-body { padding: 16px; }
.receipt { border: 2px solid var(--navy); border-radius: 12px; padding: 20px; background: #fff; color: #1B2433; max-width: 560px; margin: 0 auto; font-family: var(--font); }
.rc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--gold); } .rc-head > div { display: flex; flex-direction: column; flex: 1; line-height: 1.3; } .rc-head small { color: var(--muted); } .rc-tag { font-weight: 800; letter-spacing: .14em; color: var(--gold-d); }
.rc-meta { display: flex; justify-content: space-between; margin: 12px 0; } .rc-meta > div { display: flex; flex-direction: column; } .rc-meta small { color: var(--muted); }
.rc-table { width: 100%; border-collapse: collapse; } .rc-table th, .rc-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: top; } .rc-table th { color: var(--muted); font-weight: 600; width: 42%; }
.rc-amount { margin: 16px 0 8px; padding: 12px 16px; background: var(--navy); color: #fff; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; } .rc-amount b { font-size: 1.5rem; } .rc-foot { color: var(--muted); font-size: .8rem; margin: 8px 0 0; text-align: center; }

/* ---------- certificates ---------- */
.cert-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cert-tile { display: grid; gap: 6px; padding: 18px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--navy); box-shadow: var(--sh-1); } .cert-tile:hover { border-color: var(--gold); box-shadow: var(--sh-2); } .cert-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-l); color: var(--gold-d); } .cert-tile code { justify-self: start; }
.cert-wrap { overflow: hidden; }
.cert { width: 1123px; height: 794px; background: #fff; color: #1B2433; font-family: Georgia, "Times New Roman", serif; flex: none; margin: 0 auto; }
.cert-frame { width: 100%; height: 100%; padding: 22px; background: #fff; border: 10px solid #0B1F3A; outline: 3px solid #C9A24A; outline-offset: -20px; position: relative; }
.cert-inner { height: 100%; border: 2px solid #C9A24A; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 56px 22px; position: relative; }
.cert-logo { margin-bottom: 6px; } .cert-school { font-size: 26px; font-weight: 800; color: #0B1F3A; letter-spacing: .01em; } .cert-org { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: #9C7A28; font-family: var(--font); font-weight: 700; margin: 2px 0 8px; }
.cert-title { font-size: 46px; color: #0B1F3A; margin: 6px 0 10px; letter-spacing: .02em; font-family: Georgia, serif; } .cert-lead { font-size: 18px; font-style: italic; color: #5B6577; margin: 4px 0; }
.cert-name { font-size: 44px; color: #0F766E; border-bottom: 2px solid #C9A24A; padding: 2px 40px 6px; margin: 6px 0 10px; font-style: italic; } .cert-course { font-size: 30px; font-weight: 700; color: #0B1F3A; margin: 4px 0 8px; } .cert-detail { font-size: 16px; color: #1B2433; margin: 6px 0; font-family: var(--font); }
.cert-foot { margin-top: auto; width: 100%; display: grid; grid-template-columns: 1fr 120px 1fr; align-items: end; gap: 16px; font-family: var(--font); }
.cert-sign { display: flex; flex-direction: column; align-items: center; } .sig-line { width: 220px; border-bottom: 1.5px solid #1B2433; margin-bottom: 6px; height: 34px; } .cert-sign small { color: #5B6577; }
.cert-seal { width: 92px; height: 92px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; color: #C9A24A; border: 3px double #C9A24A; background: #FFFBF0; }
.cert-verify { display: flex; flex-direction: column; align-items: center; font-size: 13px; } .cert-verify b { font-size: 17px; letter-spacing: .06em; color: #0B1F3A; } .cert-verify small { color: #5B6577; } .vurl { font-size: 11px; color: #0F766E; word-break: break-all; max-width: 280px; }
.cert-reg { position: absolute; left: 18px; bottom: 8px; font-size: 11px; color: #5B6577; font-family: var(--font); }
@page { size: A4 landscape; margin: 0; }
@media print { #print-area .cert { width: 297mm; height: 210mm; zoom: 1; margin: 0; page-break-inside: avoid; } #print-area .cert-frame { border-width: 8px; } #print-area { zoom: 1; } #print-area .receipt { border-width: 1px; max-width: none; margin: 10mm; } .cert-wrap { zoom: 1 !important; } }

/* ---------- profile / chat page ---------- */
.prof-head .card-body { gap: 16px; } .prof-avatar .avatar { width: 80px; height: 80px; font-size: 2rem; } .prof-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.chat-page { display: flex; flex-direction: column; gap: 12px; }

/* ---------- live room ---------- */
.live-room { display: grid; gap: 14px; }
.live-stage { min-height: 420px; background: #0F1B2D; border-radius: var(--r); overflow: hidden; display: grid; }
.live-stage .live-lobby { margin: 16px; align-self: center; justify-self: center; width: min(560px, calc(100% - 32px)); } .live-loading { display: grid; place-items: center; color: #fff; }
.jitsi-holder { width: 100%; height: 100%; min-height: 420px; } .jitsi-holder iframe { width: 100%; height: 100%; border: 0; }
.live-side { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; align-content: start; } .live-side h3 { margin: 0; }
.live-info { margin: 0; display: grid; gap: 8px; } .live-info > div { display: flex; justify-content: space-between; gap: 12px; } .live-info dt { color: var(--muted); font-size: .85rem; } .live-info dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; } .live-ctl { display: grid; gap: 8px; }
@media (min-width: 1000px) { .live-room { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .live-stage, .jitsi-holder { min-height: 560px; } }
@media (max-width: 999px) { body.live-mode .live-stage { height: 62dvh; } body.live-mode .jitsi-holder { height: 62dvh; } }

/* ---------- misc ---------- */
@media (max-width: 380px) { .wiz-lbl { font-size: .7rem; } .quick { grid-template-columns: 1fr; } .pay-nums { grid-template-columns: 1fr 1fr; } .mini-stats { grid-template-columns: 1fr; } }
.live-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--navy); color: #fff; border-radius: var(--r) var(--r) 0 0; } .live-bar[hidden] { display: none; } .live-bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .live-main-col { min-width: 0; } .live-bar:not([hidden]) + .live-stage { border-radius: 0 0 var(--r) var(--r); }
@media (max-width: 480px) { .hold-head { flex-direction: column; } }
.hero-card > * { min-width: 0; } .hero-cta { max-width: 100%; white-space: normal; height: auto; } .hero-cta b { white-space: normal; overflow: visible; }

.cert-slogan { margin-top: 10px; font-style: italic; color: #9C7A28; font-size: 15px; letter-spacing: .08em; font-family: Georgia, serif; }
.auth-slogan { display: block; color: #C9A24A; font-size: .95rem; margin: 18px 0 6px; }
