/* EireneEduCloud — main stylesheet | Eirene Technologies Limited */
:root{
  --primary:#0D5C6B; --primary-d:#0A4A57; --secondary:#D4A017; --secondary-d:#b8890f;
  --dark:#2C3E50; --light:#F8FAFB; --white:#fff; --success:#27AE60; --error:#E74C3C;
  --warning:#F39C12; --muted:#7F8C8D; --line:#e5eaed; --ink:#1f2d3d;
  --english:#3498DB;--kiswahili:#1ABC9C;--mathematics:#E74C3C;--science:#9B59B6;
  --agriculture:#27AE60;--creative:#E67E22;--cre:#2980B9;--ire:#16A085;--hre:#8E44AD;--social:#D35400;
  --r:14px; --shadow:0 6px 24px rgba(13,92,107,.10); --shadow-sm:0 2px 8px rgba(13,92,107,.08);
  --font:'Segoe UI',Inter,Roboto,Arial,Helvetica,sans-serif; --serif:Georgia,'Times New Roman',serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:var(--font);color:var(--ink);background:var(--light);line-height:1.6}
a{color:var(--primary);text-decoration:none}
img{max-width:100%}
.container{max-width:1180px;margin:0 auto;padding:0 20px}
.btn{display:inline-block;border:0;border-radius:10px;padding:.7rem 1.4rem;font-size:1rem;font-weight:600;cursor:pointer;transition:.15s;font-family:inherit}
.btn-gold{background:var(--secondary);color:#3a2c02}
.btn-gold:hover{background:var(--secondary-d)}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-d)}
.btn-ghost{background:transparent;border:1.5px solid var(--line);color:var(--ink)}
.btn-ghost:hover{border-color:var(--primary);color:var(--primary)}

/* Header */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);backdrop-filter:blur(6px);border-bottom:1px solid var(--line)}
.site-header .container{display:flex;align-items:center;gap:18px;height:66px}
.brand{display:flex;align-items:center;gap:10px}
.brand svg{height:34px;width:auto}
.brand .sub{font-size:.72rem;color:var(--muted);font-weight:600}
.nav{margin-left:auto;display:flex;align-items:center;gap:6px}
.nav a{padding:.5rem .8rem;border-radius:8px;color:var(--dark);font-weight:600;font-size:.95rem}
.nav a:hover,.nav a.active{background:#eef5f6;color:var(--primary)}
.partner-logos{display:flex;align-items:center;gap:12px;margin-left:8px}
.partner-logos img{height:34px;width:auto;opacity:.95}
.hamburger{display:none;background:none;border:0;font-size:1.5rem;cursor:pointer;color:var(--primary)}

/* Hero */
.hero{background:linear-gradient(135deg,var(--primary),var(--primary-d));color:#fff;padding:64px 0 72px;position:relative;overflow:hidden}
.hero::after{content:"";position:absolute;right:-120px;top:-120px;width:360px;height:360px;border-radius:50%;background:rgba(212,160,23,.18)}
.hero h1{font-size:2.8rem;margin:0 0 .6rem;line-height:1.15}
.hero p.lead{font-size:1.25rem;color:#d6ecef;max-width:680px;margin:0 0 1.6rem}
.hero .cta-row{display:flex;gap:14px;flex-wrap:wrap;align-items:center}
.hero .stats{margin-top:32px;display:flex;gap:34px;flex-wrap:wrap}
.hero .stats .s b{font-size:1.7rem;color:var(--secondary);display:block}
.hero .stats .s span{font-size:.9rem;color:#cfe6ea}

/* Sections */
.section{padding:56px 0}
.section h2{font-size:1.9rem;margin:0 0 6px;color:var(--dark)}
.section .muted{color:var(--muted);margin:0 0 30px}

/* Subject grid */
.subjects{display:grid;grid-template-columns:repeat(auto-fill,minmax(248px,1fr));gap:20px}
.subject-card{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:22px;box-shadow:var(--shadow-sm);transition:.18s;display:flex;flex-direction:column;text-decoration:none;color:inherit}
.subject-card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:transparent}
.subject-card .ic{width:52px;height:52px;border-radius:13px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:1.5rem;margin-bottom:14px}
.subject-card h3{margin:0 0 4px;font-size:1.12rem;color:var(--dark)}
.subject-card .meta{font-size:.85rem;color:var(--muted);margin-bottom:14px}
.subject-card .lot{font-size:.72rem;font-weight:700;color:var(--secondary-d);text-transform:uppercase;letter-spacing:.5px}
.progress{height:8px;background:#eef2f3;border-radius:6px;overflow:hidden;margin-top:auto}
.progress>span{display:block;height:100%;background:var(--success);width:0}
.subject-card .start{margin-top:12px;font-weight:700;color:var(--primary);font-size:.92rem}

/* Features strip */
.features{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.features .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:24px}
.feature{display:flex;gap:14px;align-items:flex-start}
.feature .fi{width:46px;height:46px;flex:0 0 46px;border-radius:12px;background:#eef5f6;color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:1.3rem}
.feature h4{margin:0 0 3px;font-size:1rem}
.feature p{margin:0;color:var(--muted);font-size:.9rem}

/* Footer */
.site-footer{background:var(--dark);color:#cdd6df;padding:40px 0 28px;font-size:.92rem}
.site-footer a{color:#9fd0d8}
.site-footer .top{display:flex;flex-wrap:wrap;gap:20px;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(255,255,255,.12);padding-bottom:18px;margin-bottom:18px}
.site-footer .logos{display:flex;gap:16px;align-items:center}
.site-footer .logos img{height:36px;background:#fff;border-radius:6px;padding:3px}

/* Subject viewer */
.viewer{display:grid;grid-template-columns:300px 1fr;min-height:calc(100vh - 66px)}
.v-side{background:#fff;border-right:1px solid var(--line);padding:20px;position:sticky;top:66px;height:calc(100vh - 66px);overflow-y:auto}
.v-side .stitle{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.v-side .stitle .ic{width:40px;height:40px;border-radius:10px;color:#fff;display:flex;align-items:center;justify-content:center;font-size:1.2rem}
.v-progress{font-size:.85rem;color:var(--muted);margin-bottom:14px}
.v-search{width:100%;padding:.55rem .7rem;border:1px solid var(--line);border-radius:9px;margin-bottom:14px;font-family:inherit}
.unit{margin-bottom:6px}
.unit>.uh{font-weight:700;padding:.55rem .5rem;cursor:pointer;border-radius:8px;display:flex;justify-content:space-between;align-items:center;color:var(--dark)}
.unit>.uh:hover{background:#f2f7f8}
.unit .lessons{display:none;padding-left:8px}
.unit.open .lessons{display:block}
.lesson-link{display:flex;gap:8px;align-items:center;padding:.45rem .5rem;border-radius:7px;cursor:pointer;color:var(--ink);font-size:.92rem}
.lesson-link:hover{background:#f2f7f8}
.lesson-link.active{background:#eef5f6;color:var(--primary);font-weight:600}
.lesson-link .dot{width:8px;height:8px;border-radius:50%;background:#cfd8dc;flex:0 0 8px}
.lesson-link.done .dot{background:var(--success)}
.v-main{padding:28px 36px;max-width:900px}
.breadcrumb{font-size:.85rem;color:var(--muted);margin-bottom:14px}
.breadcrumb a{color:var(--muted)}
.lesson-head h1{margin:.2rem 0;font-size:1.7rem;color:var(--dark)}
.badges{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 18px}
.badge{font-size:.72rem;font-weight:700;padding:.25rem .6rem;border-radius:20px;background:#eef5f6;color:var(--primary)}
.badge.time{background:#fff7e6;color:var(--secondary-d)}
.video-wrap{position:relative;padding-top:56.25%;border-radius:12px;overflow:hidden;background:#000;margin-bottom:8px}
.video-wrap iframe,.video-wrap video{position:absolute;inset:0;width:100%;height:100%;border:0}
.transcript{border:1px solid var(--line);border-radius:12px;margin:14px 0;overflow:hidden}
.transcript .th{background:#f7fafb;padding:.7rem 1rem;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.transcript .th input{flex:1;min-width:140px;padding:.4rem .6rem;border:1px solid var(--line);border-radius:8px}
.transcript .tb{padding:1rem;max-height:240px;overflow-y:auto;font-size:.93rem}
.tline{display:flex;gap:10px;padding:.2rem 0}
.tline .ts{color:var(--secondary-d);font-weight:700;flex:0 0 44px}
.tline mark{background:#fff2b8}
.dive{background:#f7fafb;border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:14px 0}
.dive h4{margin:0 0 10px;font-size:.98rem}
.dive .dive-btn{margin:0 8px 8px 0;background:#fff;border:1.5px solid var(--primary);color:var(--primary);border-radius:20px;padding:.4rem .9rem;font-size:.86rem;cursor:pointer;font-family:inherit}
.dive .dive-btn:hover{background:var(--primary);color:#fff}
.dive .dive-out{margin-top:8px;font-size:.92rem;color:var(--dark);display:none}
.reading{font-family:var(--serif);font-size:1.05rem;line-height:1.8;margin:18px 0}
.reading h3{font-family:var(--font)}
.callout{background:#eef5f6;border-radius:10px;padding:14px 16px;margin:14px 0}
.interactive{background:#fff;border:1px dashed var(--primary);border-radius:12px;padding:18px;margin:16px 0}
.lesson-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:28px 0 10px;flex-wrap:wrap}

/* Quiz */
.quiz{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;margin:18px 0;box-shadow:var(--shadow-sm)}
.quiz .qh{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.quiz .qbar{height:7px;background:#eef2f3;border-radius:6px;overflow:hidden;margin-bottom:16px}
.quiz .qbar>span{display:block;height:100%;background:var(--secondary);transition:.3s}
.quiz .qtext{font-size:1.1rem;font-weight:600;margin-bottom:14px}
.quiz .opt{display:block;width:100%;text-align:left;border:1.5px solid var(--line);background:#fff;border-radius:10px;padding:.8rem 1rem;margin-bottom:10px;cursor:pointer;font-size:1rem;font-family:inherit;transition:.12s}
.quiz .opt:hover{border-color:var(--primary)}
.quiz .opt.correct{border-color:var(--success);background:#eafaf0}
.quiz .opt.wrong{border-color:var(--error);background:#fdeceb}
.quiz .opt.disabled{pointer-events:none;opacity:.85}
.quiz .explain{background:#f7fafb;border-radius:10px;padding:.8rem 1rem;margin-top:8px;font-size:.92rem;display:none}
.quiz .qresult{text-align:center;padding:10px}
.quiz .qresult .score{font-size:2.6rem;font-weight:800;color:var(--primary)}
.quiz .review .ri{padding:.5rem 0;border-bottom:1px solid var(--line);font-size:.92rem}

/* Help modal */
.help-btn{position:fixed;right:20px;bottom:20px;z-index:60;background:var(--secondary);color:#3a2c02;border:0;border-radius:30px;padding:.7rem 1.1rem;font-weight:700;cursor:pointer;box-shadow:var(--shadow)}
.modal{position:fixed;inset:0;z-index:70;background:rgba(20,30,40,.55);display:none;align-items:center;justify-content:center;padding:20px}
.modal.open{display:flex}
.modal .box{background:#fff;border-radius:16px;max-width:640px;width:100%;max-height:86vh;overflow-y:auto;padding:24px}
.modal h2{margin:0 0 14px;color:var(--primary)}
.modal section{margin-bottom:14px}
.modal h3{margin:0 0 4px;font-size:1.02rem}
.modal p,.modal li{color:var(--dark)}

.toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:var(--dark);color:#fff;padding:.7rem 1.2rem;border-radius:30px;font-size:.92rem;z-index:80;opacity:0;transition:.25s;pointer-events:none}
.toast.show{opacity:1}

/* ============================================================
   Component styles for data-driven markup (app.js / subject.js)
   ============================================================ */
/* accent palette mapping */
.accent-english{--accent:var(--english)} .accent-kiswahili{--accent:var(--kiswahili)}
.accent-mathematics{--accent:var(--mathematics)} .accent-science{--accent:var(--science)}
.accent-agriculture{--accent:var(--agriculture)} .accent-creative{--accent:var(--creative)}
.accent-cre{--accent:var(--cre)} .accent-ire{--accent:var(--ire)}
.accent-hre{--accent:var(--hre)} .accent-social{--accent:var(--social)}
:root{--accent:var(--primary)}

/* Homepage subject cards (inner) */
.subject-card{border-top:4px solid var(--accent)}
.sc-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.sc-icon{width:50px;height:50px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:1.5rem;background:color-mix(in srgb,var(--accent) 16%,#fff)}
.sc-lot{font-size:.7rem;font-weight:800;color:var(--accent);text-transform:uppercase;letter-spacing:.6px;background:color-mix(in srgb,var(--accent) 12%,#fff);padding:.2rem .55rem;border-radius:20px}
.sc-blurb{color:var(--muted);font-size:.9rem;flex:1;margin:.2rem 0 14px}
.sc-meta{display:flex;gap:8px;font-size:.82rem;color:var(--muted);margin-bottom:10px}
.sc-bar{height:8px;background:#eef2f3;border-radius:6px;overflow:hidden}
.sc-bar i{display:block;height:100%;background:var(--accent);width:0;transition:.3s}
.sc-prog{font-size:.8rem;color:var(--muted);margin-top:6px;font-weight:600}

/* Subject banner */
.subject-banner{background:linear-gradient(135deg,var(--primary),var(--primary-d));color:#fff;padding:26px 0 22px}
.subject-banner .back{color:#bfe2e8;font-weight:600;font-size:.9rem}
.subject-banner h1{margin:.4rem 0 .2rem;font-size:2rem}
.subject-banner .muted{color:#cfe6ea;margin:0}
.sb-bar{height:7px;background:rgba(255,255,255,.25);border-radius:6px;margin-top:14px;max-width:520px;overflow:hidden}
.sb-bar i{display:block;height:100%;background:var(--secondary);width:0;transition:.3s}

/* Sidebar (new structure) */
.side-h{font-weight:800;color:var(--dark);text-transform:uppercase;letter-spacing:.5px;font-size:.78rem;margin-bottom:12px}
.v-side .unit ul{list-style:none;margin:0 0 4px;padding:0}
.unit-t{font-weight:700;color:var(--dark);padding:.5rem .4rem;font-size:.95rem}
.v-side .lesson-link{justify-content:flex-start}
.tick{width:18px;height:18px;flex:0 0 18px;border-radius:50%;border:1.5px solid #cfd8dc;display:flex;align-items:center;justify-content:center;font-size:.7rem;color:#fff}
.tick.on{background:var(--success);border-color:var(--success)}
.ll-title{flex:1}
.ll-score{font-size:.72rem;font-weight:800;color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,#fff);padding:.1rem .4rem;border-radius:10px}
.lesson-link.active{background:color-mix(in srgb,var(--accent) 10%,#fff);color:var(--accent)}

/* Lesson head */
.lesson-head{margin-bottom:8px}
.crumbs{font-size:.82rem;color:var(--muted);margin-bottom:4px}
.lesson-head h2{margin:.1rem 0;font-size:1.7rem;color:var(--dark)}
.lesson-tags{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 16px}
.lesson-tags .tag,.lesson-tags .time{font-size:.72rem;font-weight:700;padding:.25rem .6rem;border-radius:20px;background:#eef5f6;color:var(--primary)}
.lesson-tags .time{background:#fff7e6;color:var(--secondary-d)}
.video-note{font-size:.82rem;margin:.3rem 0 0}

/* Transcript */
.transcript-box{border:1px solid var(--line);border-radius:12px;margin:14px 0;overflow:hidden}
.tr-bar{background:#f7fafb;padding:.6rem .8rem;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.tr-title{font-weight:700;color:var(--accent,var(--primary));font-size:.9rem}
.tr-search{flex:1;min-width:140px;padding:.4rem .6rem;border:1px solid var(--line);border-radius:8px;font-family:inherit}
.btn-sm{padding:.4rem .8rem;font-size:.86rem}
.transcript{padding:1rem;max-height:260px;overflow-y:auto;font-size:.93rem}
.tr-line{display:flex;gap:10px;padding:.25rem .3rem;margin:0;border-radius:6px}
.tr-line .t{color:var(--secondary-d);font-weight:700;flex:0 0 48px}
.tr-line.hl{background:#fff2b8}

/* Interactive */
.interactive h4{margin:0 0 8px;font-size:1rem;color:var(--primary)}
.expr{display:flex;gap:8px;flex-wrap:wrap;font-size:1.5rem;font-family:var(--serif);margin:10px 0}
.expr-part{border:1.5px solid var(--line);background:#fff;border-radius:8px;padding:.3rem .7rem;cursor:pointer;font-size:1.3rem;font-family:inherit}
.expr-part:hover{border-color:var(--primary)}
.expr-part.sel{background:var(--primary);color:#fff;border-color:var(--primary)}
.expr-out{margin-top:8px;color:var(--dark);font-size:.95rem}

/* Quiz (quiz-engine.js markup) */
.quiz-section{margin-top:8px}
.quiz-head h3{margin:0 0 2px;color:var(--dark)}
.quiz .q{font-size:1.08rem;font-weight:600;margin-bottom:12px}
.quiz .qnum{color:var(--accent,var(--primary));font-weight:800;margin-right:4px}
.opts{margin-bottom:8px}
.opt .bullet{display:inline-flex;width:24px;height:24px;border-radius:50%;background:#eef2f3;color:var(--dark);align-items:center;justify-content:center;font-weight:700;font-size:.82rem;margin-right:10px}
.opt.correct .bullet{background:var(--success);color:#fff}
.opt.wrong .bullet{background:var(--error);color:#fff}
.explain{display:none}
.explain.show{display:block}
.explain.ok{background:#eafaf0;color:#1c7a44}
.explain.no{background:#fdeceb;color:#b03a2e}
.qresult{display:none;align-items:center;gap:16px;background:#f7fafb;border:1px solid var(--line);border-radius:14px;padding:18px;margin-top:6px}
.qresult.show{display:flex;flex-wrap:wrap}
.score-ring{width:74px;height:74px;flex:0 0 74px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1.1rem;color:#fff;background:conic-gradient(var(--success) calc(var(--p,0)*1%),#e4eaec 0);position:relative}
.score-ring::after{content:"";position:absolute;inset:8px;border-radius:50%;background:#f7fafb}
.score-ring{color:var(--dark)}
.score-ring>span,.score-ring{z-index:1}

.site-footer.slim{padding:22px 0}

/* ===== Animation (canvas) ===== */
.animation{border:1px solid var(--line);border-radius:14px;padding:14px;margin:16px 0;background:#fff}
.anim-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;font-weight:700;color:var(--accent,var(--primary))}
.anim-canvas{width:100%;height:auto;background:#f7fafb;border-radius:10px;display:block}
.anim-cap{margin:.5rem 0 0;font-size:.9rem}

/* ===== Games ===== */
.game{border:1px dashed var(--accent,var(--primary));border-radius:14px;padding:16px;margin:16px 0;background:#fff}
.game-head{display:flex;align-items:center;gap:8px;font-size:1.05rem;margin-bottom:4px}
.game-ic{font-size:1.2rem}
.game-instr{margin:.2rem 0 10px}
.game-result{display:none;margin-top:10px;padding:.6rem .9rem;border-radius:10px;font-weight:600}
.game-result.show{display:block}
.game-result.ok{background:#eafaf0;color:#1c7a44}
.game-result.no{background:#fdeceb;color:#b03a2e}
.game button{font-family:inherit;cursor:pointer}
/* match */
.match-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.match-col{display:flex;flex-direction:column;gap:8px}
.match-item{display:flex;align-items:center;gap:8px;text-align:left;border:1.5px solid var(--line);background:#fff;border-radius:10px;padding:.6rem .8rem;font-size:.95rem}
.match-item:hover{border-color:var(--accent,var(--primary))}
.match-item.sel{border-color:var(--secondary);background:#fff7e6}
.match-item.done{border-color:var(--success);background:#eafaf0;pointer-events:none;opacity:.85}
.match-item.wrong{border-color:var(--error);background:#fdeceb}
.match-item .bullet{display:inline-flex;width:22px;height:22px;border-radius:50%;background:#eef2f3;align-items:center;justify-content:center;font-weight:700;font-size:.78rem;flex:0 0 22px}
/* sort */
.sort-pool{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.sort-item{border:1.5px solid var(--line);background:#fff;border-radius:20px;padding:.4rem .8rem}
.sort-item.sel{border-color:var(--secondary);background:#fff7e6}
.sort-item.done{border-color:var(--success);background:#eafaf0}
.sort-buckets{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.sort-bucket{border:2px dashed var(--line);border-radius:12px;padding:10px;min-height:80px}
.sort-bucket.wrong{border-color:var(--error);background:#fdeceb}
.sb-name{font-weight:700;color:var(--accent,var(--primary));margin-bottom:6px;font-size:.85rem}
.sort-bucket .sort-item{display:inline-block;margin:3px}
/* order */
.order-pool{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.order-item{border:1.5px solid var(--line);background:#fff;border-radius:10px;padding:.5rem .8rem}
.order-item.done{opacity:.4;pointer-events:none;border-color:var(--success)}
.order-item.wrong{border-color:var(--error);background:#fdeceb}
.order-step{padding:.4rem .6rem;border-left:3px solid var(--success);background:#f7fafb;border-radius:6px;margin:4px 0}
/* fill */
.fill-sentence{font-size:1.05rem;line-height:2;margin-bottom:12px}
.fill-blank{display:inline-block;min-width:80px;border-bottom:2px solid var(--accent,var(--primary));margin:0 4px;text-align:center;color:var(--primary);font-weight:700;cursor:pointer}
.fill-blank.done{border-bottom-color:var(--success);color:#1c7a44}
.fill-blank.wrong{background:#fdeceb}
.fill-bank{display:flex;flex-wrap:wrap;gap:8px}
.fill-word{border:1.5px solid var(--line);background:#fff;border-radius:20px;padding:.4rem .8rem}
.fill-word.sel{border-color:var(--secondary);background:#fff7e6}
.fill-word.used{opacity:.35;pointer-events:none}
/* flash */
.flash-card{background:linear-gradient(135deg,var(--primary),var(--primary-d));color:#fff;border-radius:14px;min-height:130px;display:flex;align-items:center;justify-content:center;text-align:center;padding:20px;cursor:pointer;font-size:1.1rem}
.flash-card.flipped{background:linear-gradient(135deg,var(--secondary),var(--secondary-d));color:#3a2c02}
.flash-face{width:100%}
.flash-ctr{display:flex;align-items:center;justify-content:space-between;margin-top:10px}

/* ============================================================
   Enrichment components: outcomes, media badges, audio, AI,
   wiki, virtual labs, podcasts, key terms, media library
   ============================================================ */
/* learning outcomes */
.outcomes{background:#f3f9fa;border-left:4px solid var(--accent,var(--primary));border-radius:8px;padding:12px 16px;margin:14px 0}
.outcomes h4{margin:0 0 6px;font-size:.92rem;color:var(--accent,var(--primary));text-transform:uppercase;letter-spacing:.4px}
.outcomes ul{margin:0;padding-left:18px}
.outcomes li{font-size:.95rem;margin:.15rem 0}

/* media badges row (discoverability) */
.media-badges{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}
.mb{display:inline-flex;align-items:center;gap:6px;font-size:.78rem;font-weight:700;padding:.3rem .7rem;border-radius:20px;border:1.5px solid var(--line);color:var(--dark);cursor:pointer;background:#fff}
.mb:hover{border-color:var(--accent,var(--primary));color:var(--accent,var(--primary))}
.mb.on{background:color-mix(in srgb,var(--accent,var(--primary)) 12%,#fff);border-color:var(--accent,var(--primary));color:var(--accent,var(--primary))}

/* audio narration bar */
.audio-bar{display:flex;align-items:center;gap:10px;background:linear-gradient(135deg,var(--primary),var(--primary-d));color:#fff;border-radius:12px;padding:12px 14px;margin:14px 0;flex-wrap:wrap}
.audio-bar .ab-btn{background:rgba(255,255,255,.16);border:0;color:#fff;width:40px;height:40px;border-radius:50%;font-size:1.1rem;cursor:pointer}
.audio-bar .ab-btn:hover{background:rgba(255,255,255,.28)}
.audio-bar .ab-label{font-weight:700}
.audio-bar .ab-status{font-size:.85rem;color:#cfe6ea;flex:1;min-width:120px}
.audio-bar select{background:rgba(255,255,255,.16);color:#fff;border:0;border-radius:8px;padding:.3rem .5rem;font-family:inherit}
.audio-bar select option{color:#1f2d3d}
.narrate-active{background:#fff2b8;border-radius:4px;padding:0 2px}

/* AI assistant */
.ai-panel{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:16px 0;background:#fff}
.ai-head{background:#0f2733;color:#fff;padding:.7rem 1rem;display:flex;align-items:center;gap:10px}
.ai-head .ai-ic{width:30px;height:30px;border-radius:8px;background:var(--secondary);color:#3a2c02;display:flex;align-items:center;justify-content:center;font-weight:800}
.ai-mode{margin-left:auto;font-size:.72rem;font-weight:700;padding:.15rem .5rem;border-radius:20px;background:rgba(255,255,255,.15)}
.ai-mode.live{background:#1c7a44}
.ai-actions{display:flex;gap:8px;flex-wrap:wrap;padding:12px}
.ai-actions .mb{cursor:pointer}
.ai-log{padding:0 12px;max-height:300px;overflow-y:auto}
.ai-msg{padding:.6rem .8rem;border-radius:10px;margin:8px 0;font-size:.93rem;white-space:pre-wrap}
.ai-msg.user{background:#eef5f6;margin-left:30px}
.ai-msg.ai{background:#f7fafb;border:1px solid var(--line);margin-right:30px}
.ai-msg.ai b{color:var(--primary)}
.ai-inrow{display:flex;gap:8px;padding:12px}
.ai-inrow input{flex:1;padding:.6rem .8rem;border:1px solid var(--line);border-radius:9px;font-family:inherit}

/* wikipedia panel */
.wiki-panel{border:1px solid var(--line);border-radius:12px;padding:14px 16px;margin:14px 0;background:#fbfdfd}
.wiki-panel h4{margin:0 0 8px;font-size:1rem;color:var(--primary)}
.wiki-thumb{float:right;max-width:120px;border-radius:8px;margin:0 0 8px 12px}
.wiki-link{display:inline-block;margin-top:6px;font-weight:600}
.wiki-terms{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px}
.wiki-terms button{background:#fff;border:1.5px solid var(--line);border-radius:20px;padding:.3rem .8rem;cursor:pointer;font-family:inherit;font-size:.86rem}
.wiki-terms button:hover,.wiki-terms button.on{border-color:var(--primary);color:var(--primary)}

/* virtual lab */
.lab{border:1px dashed var(--accent,var(--primary));border-radius:14px;padding:14px;margin:16px 0;background:#fff}
.lab-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:1rem}
.lab-ic{font-size:1.2rem}
.lab-frame{position:relative;padding-top:62%;border-radius:10px;overflow:hidden;background:#0b1f28}
.lab-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.lab-actions{display:flex;align-items:center;gap:12px;margin-top:8px;flex-wrap:wrap}

/* key terms */
.keyterms{margin:14px 0}
.keyterms h4{margin:0 0 8px;font-size:1rem;color:var(--dark)}
.kt{display:flex;gap:10px;padding:.4rem 0;border-bottom:1px dashed var(--line);font-size:.95rem}
.kt b{flex:0 0 150px;color:var(--accent,var(--primary))}

/* podcasts */
.podcast-card{border:1px solid var(--line);border-radius:14px;padding:16px;margin:14px 0;background:#fff;border-top:4px solid var(--secondary)}
.podcast-card h4{margin:0 0 4px}
.pod-embed{border-radius:10px;overflow:hidden;margin-top:10px}
.pod-embed iframe{width:100%;border:0}

/* media library */
.ml-filters{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.ml-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}
.ml-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px;border-left:4px solid var(--accent,var(--primary));display:flex;flex-direction:column}
.ml-card .ml-type{font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.5px;color:var(--accent,var(--primary))}
.ml-card h4{margin:.2rem 0}
.ml-card .ml-sub{font-size:.82rem;color:var(--muted);margin-bottom:10px}
.ml-card a.ml-go{margin-top:auto;font-weight:700;color:var(--primary)}

@media(max-width:880px){
  .viewer{grid-template-columns:1fr}
  .v-side{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line)}
  .nav{display:none}
  .nav.open{display:flex;position:absolute;top:66px;left:0;right:0;flex-direction:column;background:#fff;border-bottom:1px solid var(--line);padding:10px 20px}
  .hamburger{display:block;margin-left:auto}
  .partner-logos{display:none}
  .hero h1{font-size:2.1rem}
  .v-main{padding:20px}
}
