/* ============================================================
   NERDC LEARN — Design System
   Mobile-first responsive teaching & learning app
   ============================================================ */

:root {
  --green: #15803d;
  --green-light: #22c55e;
  --green-dark: #14532d;
  --blue: #2563eb;
  --purple: #7c3aed;
  --amber: #f59e0b;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 80px; /* space for mobile bottom nav */
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ---------- Layout ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 18px; }
.section { padding: 28px 0; }
.hidden { display: none !important; }

/* ---------- Top Bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  display: grid; place-items: center; color: #fff; font-size: 1.2rem;
}
.brand small { display:block; font-weight:600; font-size:.62rem; color:var(--muted); letter-spacing:.5px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.btn-ghost {
  background: var(--bg); color: var(--ink); padding: 9px 14px;
  border-radius: 10px; font-weight: 600; font-size: .85rem;
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: #eef2f7; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff; border-radius: var(--radius);
  padding: 38px 28px; margin: 22px 0;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero h1 { font-size: 1.9rem; line-height: 1.2; margin-bottom: 10px; }
.hero p { opacity: .92; max-width: 560px; font-size: 1rem; }
.hero .pill {
  display:inline-block; background: rgba(255,255,255,.18);
  padding: 5px 12px; border-radius: 999px; font-size: .78rem;
  font-weight: 600; margin-bottom: 14px;
}
.hero-stats { display:flex; gap: 26px; margin-top: 22px; flex-wrap: wrap; }
.hero-stats .stat strong { font-size: 1.5rem; display:block; }
.hero-stats .stat span { font-size: .8rem; opacity: .85; }

/* ---------- Section headings ---------- */
.sec-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 16px; }
.sec-head h2 { font-size: 1.3rem; }
.sec-head .sub { color: var(--muted); font-size: .85rem; }

/* ---------- Level cards ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.level-card {
  background: var(--card); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  border: 1px solid var(--line); cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  position: relative; overflow: hidden;
}
.level-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.level-card .ic { font-size: 2.2rem; margin-bottom: 10px; }
.level-card h3 { font-size: 1.15rem; }
.level-card p { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.level-card .classes { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.level-card .tag {
  font-size: .72rem; background: var(--bg); padding: 4px 9px;
  border-radius: 999px; color: var(--muted); font-weight: 600;
  border: 1px solid var(--line);
}
.level-card .bar { position:absolute; left:0; top:0; bottom:0; width:6px; }

/* ---------- Subject cards ---------- */
.subject-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  cursor: pointer; transition: transform .18s, box-shadow .18s;
  overflow: hidden;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.subject-head { padding: 20px; display:flex; gap: 14px; align-items:flex-start; }
.subject-ic {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.6rem; color: #fff;
}
.subject-card h3 { font-size: 1.05rem; }
.subject-card p { color: var(--muted); font-size: .83rem; margin-top: 4px; }
.subject-foot {
  padding: 12px 20px; border-top: 1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
  font-size: .8rem; color: var(--muted);
}
.progress-track { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; width: 110px; }
.progress-fill { height: 100%; background: var(--green-light); border-radius: 999px; transition: width .4s; }

/* ---------- Breadcrumb ---------- */
.crumb { display:flex; align-items:center; gap: 8px; color: var(--muted); font-size: .85rem; margin: 18px 0; flex-wrap: wrap; }
.crumb a:hover { color: var(--green); }
.crumb .back-btn {
  background: var(--card); border:1px solid var(--line); border-radius: 9px;
  padding: 7px 13px; font-weight: 600; color: var(--ink); font-size:.82rem;
}
.crumb .back-btn:hover { background: var(--bg); }

/* ---------- Lesson list ---------- */
.lesson-row {
  background: var(--card); border:1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; display:flex; align-items:center; gap: 14px;
  cursor: pointer; transition: border-color .15s, transform .15s;
  margin-bottom: 12px;
}
.lesson-row:hover { border-color: var(--green-light); transform: translateX(3px); }
.lesson-num {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink:0;
  background: var(--bg); display:grid; place-items:center; font-weight:700; color: var(--green);
}
.lesson-row.done .lesson-num { background: var(--green-light); color:#fff; }
.lesson-row .meta { flex: 1; }
.lesson-row .meta h4 { font-size: .98rem; }
.lesson-row .meta span { font-size: .78rem; color: var(--muted); }
.lesson-row .chev { color: var(--muted); }

.quiz-row { border: 2px dashed var(--amber); background: #fffbeb; }
.quiz-row .lesson-num { background: var(--amber); color:#fff; }

/* ---------- Lesson detail ---------- */
.lesson-detail { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border:1px solid var(--line); overflow:hidden; }
.video-wrap { position: relative; padding-top: 56.25%; background:#000; }
.video-wrap iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.lesson-body { padding: 26px; }
.lesson-body h2 { font-size: 1.4rem; margin-bottom: 6px; }
.lesson-body .dur { color: var(--muted); font-size:.85rem; margin-bottom: 18px; }
.lesson-body h3 { margin: 18px 0 8px; font-size: 1.1rem; color: var(--green-dark); }
.lesson-body p { margin-bottom: 10px; }
.lesson-body ul, .lesson-body ol { margin: 0 0 12px 22px; }
.lesson-body li { margin-bottom: 5px; }
.callout {
  background: #ecfdf5; border-left: 4px solid var(--green-light);
  padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-size: .92rem;
}
.lesson-actions { padding: 0 26px 26px; display:flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  background: var(--green); color:#fff; padding: 12px 22px;
  border-radius: 11px; font-weight: 700; font-size: .92rem;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--green-dark); }
.btn:active { transform: scale(.98); }
.btn.alt { background: var(--amber); }
.btn.alt:hover { background: #d97706; }
.btn.outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn.outline:hover { background: #ecfdf5; }

/* ---------- Quiz ---------- */
.quiz-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border:1px solid var(--line); padding: 26px; }
.quiz-box .qnum { color: var(--amber); font-weight:700; font-size:.82rem; letter-spacing:.5px; }
.quiz-box h3 { font-size: 1.2rem; margin: 6px 0 18px; }
.opt {
  display:flex; align-items:center; gap: 12px; padding: 14px 16px;
  border: 2px solid var(--line); border-radius: 12px; margin-bottom: 10px;
  cursor: pointer; transition: all .12s; font-weight: 500;
}
.opt:hover { border-color: var(--green-light); background: #f0fdf4; }
.opt.selected { border-color: var(--green); background: #ecfdf5; }
.opt.correct { border-color: var(--green-light); background: #dcfce7; }
.opt.wrong { border-color: #ef4444; background: #fee2e2; }
.opt .letter {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink:0;
  background: var(--bg); display:grid; place-items:center; font-weight:700; font-size:.85rem;
}
.quiz-progress { height: 8px; background: var(--line); border-radius:999px; overflow:hidden; margin-bottom: 20px; }
.quiz-progress > div { height:100%; background: var(--amber); transition: width .3s; }

.result-card { text-align:center; padding: 40px 26px; }
.result-card .score-circle {
  width: 130px; height: 130px; border-radius:50%; margin: 0 auto 18px;
  display:grid; place-items:center; font-size: 2rem; font-weight:800; color:#fff;
}
.result-card h2 { font-size: 1.5rem; margin-bottom: 6px; }
.result-card p { color: var(--muted); margin-bottom: 22px; }

/* ---------- Dashboard ---------- */
.dash-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 24px; }
.dash-stat { background: var(--card); border:1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; box-shadow: var(--shadow); }
.dash-stat .ic { font-size: 1.6rem; }
.dash-stat strong { font-size: 1.7rem; display:block; margin-top: 6px; }
.dash-stat span { color: var(--muted); font-size: .82rem; }

/* ---------- Bottom Nav (mobile) ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line);
  display: none; justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav button {
  background: none; display:flex; flex-direction:column; align-items:center; gap:2px;
  color: var(--muted); font-size: .68rem; font-weight: 600; flex:1;
}
.bottom-nav button .ic { font-size: 1.25rem; }
.bottom-nav button.active { color: var(--green); }

/* ---------- Footer ---------- */
.footer { text-align:center; color: var(--muted); font-size:.82rem; padding: 30px 0 16px; }

/* ---------- Empty state ---------- */
.empty { text-align:center; padding: 50px 20px; color: var(--muted); }
.empty .ic { font-size: 3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: repeat(2,1fr); }
  .hero h1 { font-size: 1.5rem; }
}
@media (max-width: 560px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .bottom-nav { display: flex; }
  .topbar-actions .btn-ghost.hide-sm { display: none; }
  .hero { padding: 28px 20px; }
  .hero-stats { gap: 18px; }
  .lesson-body { padding: 20px; }
  .brand { font-size: 1rem; }
}

/* fade-in */
@keyframes fadeUp { from { opacity:0; transform: translateY(10px);} to {opacity:1; transform:none;} }
.view { animation: fadeUp .3s ease; }

/* ============================================================
   PAYMENT / AUTH — Modals, Paywall, Lock states
   ============================================================ */

/* Account button in topbar */
.account-chip {
  display:flex; align-items:center; gap:8px; background:var(--bg);
  border:1px solid var(--line); border-radius:999px; padding:5px 6px 5px 12px;
  font-size:.82rem; font-weight:600; cursor:pointer;
}
.account-chip .avatar {
  width:28px; height:28px; border-radius:50%; background:linear-gradient(135deg,var(--green),var(--green-light));
  color:#fff; display:grid; place-items:center; font-size:.8rem; font-weight:700;
}
.account-chip .pro {
  font-size:.62rem; background:var(--amber); color:#fff; padding:2px 7px; border-radius:999px; letter-spacing:.3px;
}
.account-chip:hover { background:#eef2f7; }

/* Modal overlay */
.modal-overlay {
  position:fixed; inset:0; z-index:200; background:rgba(15,23,42,.55);
  backdrop-filter: blur(3px); display:grid; place-items:center; padding:18px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal {
  background:#fff; width:100%; max-width:420px; border-radius:20px;
  position:relative; overflow:hidden; box-shadow:var(--shadow-lg);
  animation: pop .22s ease;
}
@keyframes pop { from{transform:scale(.94);opacity:0} to{transform:none;opacity:1} }
.modal-close {
  position:absolute; top:14px; right:14px; background:rgba(255,255,255,.25);
  color:#fff; width:30px; height:30px; border-radius:50%; font-size:.9rem; z-index:2;
}
.modal-head {
  background:linear-gradient(135deg,var(--green-dark),var(--green));
  color:#fff; padding:26px 24px 22px; text-align:center;
}
.modal-head.pay { background:linear-gradient(135deg,#7c3aed,#5b21b6); }
.modal-logo { font-size:2rem; }
.modal-head h2 { font-size:1.3rem; margin-top:6px; }
.modal-sub { opacity:.92; font-size:.88rem; margin-top:4px; }
.modal-body { padding:22px 24px 24px; }

.field { display:block; margin-bottom:14px; }
.field span { display:block; font-size:.8rem; font-weight:600; color:var(--muted); margin-bottom:6px; }
.field input {
  width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:11px;
  font-size:.95rem; font-family:inherit; outline:none; transition:border-color .15s;
}
.field input:focus { border-color:var(--green-light); }
.form-err { color:#ef4444; font-size:.82rem; min-height:18px; margin-bottom:6px; }
.modal-btn { width:100%; padding:14px; font-size:.98rem; }
.modal-btn.pay-btn { background:#7c3aed; }
.modal-btn.pay-btn:hover { background:#6d28d9; }
.modal-foot { text-align:center; color:var(--muted); font-size:.78rem; margin-top:12px; }
.demo-tag { background:#fef3c7; color:#b45309; padding:1px 7px; border-radius:6px; font-size:.68rem; font-weight:700; letter-spacing:.3px; }

/* Price card */
.price-card { border:1.5px solid var(--line); border-radius:14px; padding:18px; margin-bottom:18px; }
.price-row { display:flex; justify-content:space-between; align-items:center; padding-bottom:12px; border-bottom:1px solid var(--line); }
.price-row strong { font-size:1.5rem; color:var(--green-dark); }
.price-list { list-style:none; margin:14px 0 0; padding:0; }
.price-list li { font-size:.88rem; padding:5px 0; color:var(--ink); }

/* Paystack-style modal */
.paystack-modal { }
.ps-head { background:#0ba4db; color:#fff; padding:22px 24px; }
.ps-brand { font-weight:800; font-size:.95rem; display:flex; align-items:center; gap:8px; opacity:.95; }
.ps-dot { width:14px; height:14px; border-radius:50%; background:#fff; display:inline-block; box-shadow:0 0 0 3px rgba(255,255,255,.35); }
.ps-amount { font-size:1.6rem; font-weight:800; margin-top:10px; }
.ps-email { font-size:.82rem; opacity:.9; }
.ps-body { padding:20px 24px 24px; }
.ps-tabs { display:flex; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
.ps-tab { background:var(--bg); border:1px solid var(--line); border-radius:9px; padding:7px 13px; font-size:.8rem; font-weight:600; color:var(--muted); }
.ps-tab.active { background:#e0f2fe; color:#0369a1; border-color:#7dd3fc; }
.ps-row { display:flex; gap:12px; }
.ps-row .field { flex:1; }

/* spinner */
.spinner { width:15px; height:15px; border:2.5px solid rgba(255,255,255,.4); border-top-color:#fff; border-radius:50%; display:inline-block; vertical-align:middle; animation:spin .7s linear infinite; margin-right:6px; }
@keyframes spin { to{transform:rotate(360deg)} }

/* success */
.pay-success { text-align:center; padding:34px 26px 28px; }
.success-tick { width:74px; height:74px; border-radius:50%; background:#22c55e; color:#fff; font-size:2.2rem; display:grid; place-items:center; margin:0 auto 16px; animation:pop .35s ease; }
.pay-success h2 { font-size:1.4rem; }
.receipt { background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin:18px 0; text-align:left; }
.receipt > div { display:flex; justify-content:space-between; font-size:.85rem; padding:5px 0; }
.receipt span { color:var(--muted); }

/* Lock states on lessons / quiz */
.lesson-row.locked { opacity:.92; }
.lesson-row.locked .lesson-num { background:#f1f5f9; color:#94a3b8; }
.lock-badge {
  font-size:.68rem; font-weight:700; background:#fef3c7; color:#b45309;
  padding:3px 9px; border-radius:999px; display:inline-flex; align-items:center; gap:4px; margin-left:auto;
}
.free-badge {
  font-size:.68rem; font-weight:700; background:#dcfce7; color:#15803d;
  padding:3px 9px; border-radius:999px; display:inline-flex; align-items:center; gap:4px; margin-left:auto;
}

/* Inline locked banner on subject hero */
.locked-cta {
  background:#fffbeb; border:1.5px solid #fde68a; border-radius:14px;
  padding:16px 18px; margin:18px 0; display:flex; align-items:center; gap:14px; flex-wrap:wrap;
}
.locked-cta .ic { font-size:1.8rem; }
.locked-cta .txt { flex:1; min-width:180px; }
.locked-cta .txt strong { display:block; font-size:1rem; }
.locked-cta .txt span { font-size:.84rem; color:var(--muted); }

/* Locked lesson interstitial */
.lock-screen { text-align:center; padding:46px 26px; }
.lock-screen .big { font-size:3.4rem; }
.lock-screen h2 { font-size:1.4rem; margin:10px 0 6px; }
.lock-screen p { color:var(--muted); max-width:420px; margin:0 auto 22px; }

@media (max-width:560px){
  .account-chip span.name { display:none; }
}

/* ============================================================
   TEACHER PANEL + WHITEBOARD
   ============================================================ */

.teacher-btn { background:#dbeafe !important; color:#1e3a8a !important; border-color:#bfdbfe !important; }
.teacher-btn:hover { background:#bfdbfe !important; }

.modal-wide { max-width: 860px; }

textarea {
  width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:11px;
  font-size:.95rem; font-family:inherit; outline:none; resize:vertical; transition:border-color .15s;
}
textarea:focus { border-color:var(--green-light); }
.tc-select {
  width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:11px;
  font-size:.95rem; font-family:inherit; background:#fff; outline:none;
}
.tc-select:focus { border-color:#2563eb; }

.teacher-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:6px; }
.teacher-actions .modal-btn { width:100%; padding:13px; font-size:.9rem; }

.manage-row {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  border:1px solid var(--line); border-radius:10px; padding:10px 14px; margin-bottom:8px; font-size:.88rem;
}
.manage-row span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.del-btn { background:#fee2e2; color:#b91c1c; padding:6px 12px; border-radius:8px; font-weight:600; font-size:.78rem; flex-shrink:0; }
.del-btn:hover { background:#fecaca; }

/* board attach preview in add-lesson */
.board-attach { margin:6px 0 14px; }
.board-preview {
  border:1.5px dashed var(--line); border-radius:11px; min-height:90px;
  display:grid; place-items:center; color:var(--muted); font-size:.85rem; overflow:hidden; background:var(--bg-soft);
}
.board-preview.empty { padding:24px; }
.board-preview img { width:100%; display:block; }

/* board image shown to students in lesson */
.board-img { width:100%; border:1px solid var(--line); border-radius:12px; margin-top:8px; box-shadow:var(--shadow); }

/* ---------- Whiteboard ---------- */
.wb-head {
  background:#1e293b; color:#fff; padding:12px 16px;
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
}
.wb-title { font-weight:800; font-size:1.05rem; }
.wb-tools { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.wb-color {
  width:26px; height:26px; border-radius:50%; border:2px solid rgba(255,255,255,.3); cursor:pointer; padding:0;
}
.wb-color.sel { border-color:#fff; box-shadow:0 0 0 2px #1e293b, 0 0 0 4px #fff; }
.wb-div { width:1px; height:24px; background:rgba(255,255,255,.25); margin:0 4px; }
.wb-size {
  background:rgba(255,255,255,.12); color:#fff; width:34px; height:30px; border-radius:8px; font-size:.9rem;
}
.wb-size.active { background:#2563eb; }
.wb-tool {
  background:rgba(255,255,255,.12); color:#fff; padding:7px 12px; border-radius:8px; font-size:.82rem; font-weight:600;
}
.wb-tool.active { background:#2563eb; }
.wb-tool:hover { background:rgba(255,255,255,.22); }

.wb-canvas-wrap {
  width:100%; height:54vh; background:#fff; position:relative;
}
#wb-canvas { width:100%; height:100%; display:block; cursor:crosshair; touch-action:none; }

.wb-foot {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 16px; border-top:1px solid var(--line); flex-wrap:wrap; background:#fff;
}
.wb-foot .btn { padding:10px 16px; font-size:.85rem; }
.wb-hint { font-size:.8rem; color:var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position:fixed; bottom:90px; left:50%; transform:translateX(-50%) translateY(20px);
  background:#0f172a; color:#fff; padding:12px 20px; border-radius:999px;
  font-size:.88rem; font-weight:600; z-index:300; opacity:0; transition:all .3s;
  box-shadow:var(--shadow-lg); max-width:90%;
}
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

@media (max-width:560px){
  .teacher-actions { grid-template-columns:1fr; }
  .wb-canvas-wrap { height:46vh; }
  .wb-tools { gap:4px; }
  .wb-tool { padding:6px 9px; font-size:.75rem; }
}

/* ============================================================
   HIDE ANY THIRD-PARTY / HOST-INJECTED BRANDING BADGE
   (this app is owned by its creator — no external badge)
   ============================================================ */
a[href*="ninjatech.ai"],
a[href*="myninja.ai"],
[class*="made-by"],
[id*="made-by"],
[class*="ninja-badge"],
[id*="ninja-badge"],
#ninja-daytona-badge {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ============================================================
   HOME TEACHER BANNER (clear "Add Content" entry point)
   ============================================================ */
.teach-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 28px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #15803d 0%, #166534 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21,128,61,.28);
  border: 1px solid rgba(255,255,255,.18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.teach-banner:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(21,128,61,.36); }
.teach-banner .tb-icon { font-size: 2.4rem; line-height: 1; flex-shrink: 0; }
.teach-banner .tb-text { flex: 1; }
.teach-banner .tb-text h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; color:#fff; }
.teach-banner .tb-text p { margin: 0; font-size: .85rem; opacity: .92; line-height: 1.4; color:#eafff0; }
.teach-banner .tb-text strong { background: rgba(255,255,255,.22); padding: 1px 6px; border-radius: 6px; }
.teach-banner .tb-cta {
  flex-shrink: 0;
  background: #fff;
  color: #15803d;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: .92rem;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .teach-banner { flex-direction: column; text-align: center; }
  .teach-banner .tb-cta { width: 100%; text-align: center; }
}

/* ============================================================
   STUDY.COM-STYLE UPGRADE
   ============================================================ */

/* --- Top nav search box --- */
.nav-search {
  flex: 1;
  max-width: 380px;
  display: flex; align-items: center; gap: 8px;
  background: #f1f5f9; border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px; margin: 0 16px;
}
.nav-search .mag { opacity: .6; }
.nav-search input {
  border: none; background: transparent; outline: none;
  width: 100%; font-size: .95rem; font-family: inherit; color: var(--ink);
}

/* --- Big hero (Study.com-like) --- */
.hero-hero {
  background: radial-gradient(1200px 500px at 50% -10%, #dcfce7 0%, transparent 60%),
              linear-gradient(160deg, #0f766e 0%, #15803d 55%, #166534 100%);
  color: #fff; border-radius: 24px; padding: 54px 26px; margin-top: 18px;
  text-align: center; box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-hero-inner { max-width: 760px; margin: 0 auto; }
.hero-hero .pill {
  display: inline-block; background: rgba(255,255,255,.18); color: #fff;
  padding: 7px 16px; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 18px;
}
.hero-hero h1 { font-size: 2.5rem; line-height: 1.15; letter-spacing: -1px; margin-bottom: 14px; }
.hero-hero .lead { font-size: 1.12rem; opacity: .95; max-width: 620px; margin: 0 auto 26px; }

.hero-search {
  display: flex; align-items: center; gap: 8px; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 8px 8px 8px 18px; max-width: 620px; margin: 0 auto 20px;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}
.hero-search .mag { font-size: 1.1rem; opacity: .6; }
.hero-search input { flex: 1; border: none; outline: none; font-size: 1rem; font-family: inherit; padding: 10px 6px; }
.hero-search .btn { border-radius: 999px; padding: 12px 22px; white-space: nowrap; }
.hero-search.light { box-shadow: var(--shadow); border: 1px solid var(--line); }

.hero-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.btn.big { padding: 14px 26px; font-size: 1.02rem; border-radius: 12px; }
.btn.outline.big { background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.5); }

.hero-trust { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; font-size: .92rem; opacity: .95; }
.hero-trust strong { font-size: 1.15rem; display: block; }

/* --- Continue learning card --- */
.continue-card {
  display: flex; align-items: center; gap: 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); cursor: pointer; transition: .15s;
}
.continue-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.continue-card .subject-ic { width: 54px; height: 54px; font-size: 1.6rem; flex: 0 0 auto; }
.continue-card .cc-meta { flex: 1; }
.continue-card .cc-meta h3 { font-size: 1.1rem; }
.continue-card .cc-sub { font-size: .82rem; color: var(--muted); }

/* --- Course cards (catalog + popular) --- */
.course-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: .15s; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cc-top {
  height: 96px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; color: #fff;
}
.cc-top .cc-ic { font-size: 2.6rem; }
.cc-top .cc-level { background: rgba(255,255,255,.22); padding: 4px 12px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.cc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.cc-body h3 { font-size: 1.12rem; margin-bottom: 6px; }
.cc-body p { font-size: .88rem; color: var(--muted); flex: 1; }
.cc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.cc-lessons { font-size: .82rem; color: var(--muted); font-weight: 500; }
.cc-badge { background: #eef2ff; color: #4338ca; font-weight: 700; font-size: .78rem; padding: 4px 12px; border-radius: 999px; }
.cc-badge.free { background: #dcfce7; color: #15803d; }
.lc-foot { margin-top: 12px; font-weight: 600; color: var(--green); font-size: .9rem; }

/* --- Catalog head + filters --- */
.catalog-head { margin-top: 20px; margin-bottom: 8px; }
.catalog-head h1 { font-size: 2rem; letter-spacing: -.5px; }
.catalog-head .sub { color: var(--muted); margin-bottom: 16px; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 26px; }
.filter-chip {
  background: #fff; border: 1.5px solid var(--line); color: var(--ink);
  padding: 9px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; transition: .15s;
}
.filter-chip:hover { border-color: var(--green-light); }
.filter-chip.active { background: var(--green); color: #fff; border-color: var(--green); }

/* --- How it works --- */
.how { margin: 40px 0; }
.sec-head.center { justify-content: center; text-align: center; }
.how-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; text-align: center; box-shadow: var(--shadow); }
.how-step .hs-num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff;
  font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.how-step h4 { font-size: 1.08rem; margin-bottom: 6px; }
.how-step p { font-size: .9rem; color: var(--muted); }

/* --- Certificate CTA + certificate --- */
.cert-cta {
  display: flex; align-items: center; gap: 16px; margin: 18px 0;
  background: linear-gradient(135deg,#fffbeb,#fef3c7); border: 1.5px solid #fde68a;
  border-radius: var(--radius); padding: 18px; cursor: pointer;
}
.cert-cta .ic { font-size: 2rem; }
.cert-cta .txt { flex: 1; display: flex; flex-direction: column; }
.cert-cta .txt strong { color: #92400e; }
.cert-cta .txt span { font-size: .85rem; color: #b45309; }

.cert-wrap { max-width: 780px; margin: 20px auto; }
.certificate { background: #fff; padding: 10px; border-radius: 10px; box-shadow: var(--shadow-lg); }
.cert-border {
  border: 3px double #b8860b; border-radius: 8px; padding: 40px 30px; text-align: center;
  background: radial-gradient(1000px 400px at 50% 0%, #fffdf5, #ffffff);
}
.cert-logo { font-size: 1.3rem; font-weight: 800; color: var(--green); letter-spacing: .5px; }
.cert-title { font-size: 2rem; font-weight: 800; color: #b8860b; margin: 18px 0 8px; font-family: Georgia, serif; }
.cert-sub { color: var(--muted); font-size: .95rem; margin: 6px 0; }
.cert-name { font-size: 1.9rem; font-weight: 800; color: var(--ink); font-family: Georgia, serif; margin: 8px 0; border-bottom: 2px solid var(--line); display: inline-block; padding: 0 24px 6px; }
.cert-course { font-size: 1.35rem; font-weight: 700; color: var(--green-dark); margin: 12px 0; }
.cert-lvl { font-weight: 500; color: var(--muted); font-size: 1rem; }
.cert-score { color: var(--muted); margin-top: 6px; }
.cert-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 40px; }
.cert-date, .cert-sign { display: flex; flex-direction: column; align-items: center; }
.cert-date span, .cert-sign span { font-weight: 700; border-bottom: 1px solid var(--ink); padding: 0 20px 4px; }
.cert-date small, .cert-sign small { color: var(--muted); font-size: .75rem; margin-top: 4px; }
.cert-seal { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; font-size: 1.6rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(21,128,61,.4); }

@media print {
  .topbar, .bottom-nav, .footer, .crumb, .lesson-actions { display: none !important; }
  body { padding: 0; background: #fff; }
  .certificate { box-shadow: none; }
}

/* --- Responsive tweaks --- */
@media (max-width: 640px) {
  .hero-hero { padding: 40px 18px; }
  .hero-hero h1 { font-size: 1.9rem; }
  .hero-hero .lead { font-size: 1rem; }
  .hero-search { flex-wrap: nowrap; }
  .hero-search .btn { padding: 12px 16px; }
  .continue-card { flex-wrap: wrap; }
  .continue-card .btn { width: 100%; }
  .catalog-head h1 { font-size: 1.6rem; }
}

/* ===== TEACHER GUIDE ===== */
.guide { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.guide-step { display: flex; gap: 12px; align-items: flex-start; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; }
.guide-step .gs-num { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: #14b8a6; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.guide-step strong { display: block; color: #0f172a; font-size: 1rem; margin-bottom: 2px; }
.guide-step p { margin: 0; color: #475569; font-size: 0.9rem; line-height: 1.4; }
.guide-tips { background: #ecfeff; border: 1px solid #a5f3fc; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.guide-tips strong { color: #0e7490; display: block; margin-bottom: 6px; }
.guide-tips ul { margin: 0; padding-left: 18px; color: #334155; font-size: 0.9rem; line-height: 1.6; }

/* ===== WRITTEN WORK (Portage-style) ===== */
.ww-intro { color: #64748b; font-size: 0.92rem; margin: -4px 0 12px; }
.ww-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.ww-card.locked { opacity: .75; cursor: pointer; }
.ww-q { display: flex; gap: 10px; align-items: flex-start; }
.ww-q .ww-num { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: #7c3aed; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.ww-q p { margin: 0; color: #0f172a; font-weight: 600; line-height: 1.45; }
.ww-hint { background: #fef9c3; border-radius: 8px; padding: 8px 10px; font-size: .85rem; color: #713f12; margin: 10px 0 0; }
.ww-answer { width: 100%; margin-top: 12px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; font-family: inherit; font-size: .95rem; resize: vertical; box-sizing: border-box; }
.ww-answer:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.15); }
.ww-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.btn.small { padding: 8px 14px; font-size: .88rem; }
.ww-model { margin-top: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; padding: 12px 14px; }
.ww-model strong { color: #047857; }
.ww-model p { margin: 6px 0 0; color: #065f46; line-height: 1.5; }
.ww-lockmsg { margin-top: 10px; color: #b91c1c; font-size: .88rem; font-weight: 600; }
.app-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); background: #0f172a; color: #fff; padding: 12px 20px; border-radius: 30px; font-size: .92rem; opacity: 0; pointer-events: none; transition: all .25s; z-index: 9999; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Practical / Science lab (Portage-style) ---------- */
.prac-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.prac-card.locked { opacity: .75; cursor: pointer; }
.prac-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.prac-title .ww-num { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; background: #0d9488; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.prac-title p { margin: 0; font-weight: 700; font-size: 1.05rem; color: #0f172a; }
.prac-video { margin: 0 0 14px; }
.prac-vlink { margin: 0 0 14px; font-size: .95rem; }
.prac-vlink a { color: #0d9488; font-weight: 600; }
.prac-block { margin-bottom: 14px; }
.prac-block > strong { display: block; color: #0f766e; margin-bottom: 4px; font-size: .95rem; }
.prac-block p { margin: 4px 0 0; color: #334155; line-height: 1.5; }
.prac-steps { margin: 6px 0 0; padding-left: 22px; color: #334155; line-height: 1.6; }
.prac-steps li { margin-bottom: 4px; }
.prac-notebook { background: #f0fdfa; border: 1px dashed #99f6e4; border-radius: 12px; padding: 12px 14px; }
.prac-note-prompt { font-style: italic; color: #475569; margin: 4px 0 8px !important; }
