/* ===== 辽宁专升本 · 电工电子技术学习中心
   风格对齐：辽宁专升本英语学习中心（同系列模板）
   课程特色：公式块 / 分步拆解 / 单位提醒 / 电路图表 / 数学急救 ===== */
:root{
  --brand:#2563eb; --brand2:#7c3aed; --brand-dark:#1d4ed8;
  --ok:#16a34a; --ok-bg:#ecfdf5; --err:#dc2626; --err-bg:#fef2f2;
  --bg:#f4f6fb; --card:#fff; --text:#1f2937; --muted:#6b7280; --line:#e5e7eb;
  --warn:#f59e0b; --warn-bg:#fffbeb;
  --radius:14px; --shadow:0 2px 10px rgba(30,41,59,.06);
  --fml-bg:#f5f3ff; --fml-line:#7c3aed;
  --pri:#2563eb; --pri2:#7c3aed; --pri-soft:#eef4ff;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,sans-serif;
  background:var(--bg); color:var(--text); font-size:15px; line-height:1.75;
  padding-bottom:env(safe-area-inset-bottom);
}
a{color:var(--brand);text-decoration:none}
button{font-family:inherit;font-size:inherit;cursor:pointer;border:none;background:none;color:inherit}
.hide{display:none !important}

/* ---------- 顶部 ---------- */
header{
  position:sticky;top:0;z-index:50;background:linear-gradient(120deg,var(--brand),var(--brand2));
  color:#fff;padding:12px 16px;box-shadow:0 2px 12px rgba(37,99,235,.25)
}
.hd-inner{max-width:1080px;margin:0 auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.logo{font-size:17px;font-weight:700;letter-spacing:.5px;display:flex;align-items:center;gap:8px}
.logo .badge{background:rgba(255,255,255,.22);border-radius:20px;padding:2px 10px;font-size:12px;font-weight:500}
.hd-nav{display:flex;gap:4px;margin-left:auto;flex-wrap:wrap}
.hd-nav button{color:rgba(255,255,255,.85);padding:6px 12px;border-radius:20px;font-size:14px;transition:.15s}
.hd-nav button:hover{background:rgba(255,255,255,.15);color:#fff}
.hd-nav button.active{background:#fff;color:var(--brand);font-weight:600}
.hd-stat{font-size:12px;opacity:.92;display:flex;gap:10px;align-items:center}

/* ---------- 布局 ---------- */
main{max-width:1080px;margin:0 auto;padding:18px 14px 40px}
.card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;margin-bottom:16px}
h1,h2,h3,h4{margin:0 0 10px;line-height:1.4}
h1{font-size:20px}
h2{font-size:17px}
h3{font-size:15px}
.sec-title{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.sec-title h2{margin:0}
.sec-title .bar{width:4px;height:17px;border-radius:3px;background:linear-gradient(var(--brand),var(--brand2));flex:none}
.muted{color:var(--muted);font-size:13px}
.grid{display:grid;gap:12px}

/* ---------- 按钮 ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:10px 18px;border-radius:10px;font-size:14px;font-weight:600;
  background:var(--brand);color:#fff;transition:.15s;border:1px solid transparent
}
.btn:hover{background:var(--brand-dark)}
.btn.alt{background:#fff;color:var(--brand);border-color:var(--brand)}
.btn.gray{background:#f1f5f9;color:#475569}
.btn.ok{background:var(--ok)}
.btn.sm{padding:6px 12px;font-size:13px;border-radius:8px}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}

/* ---------- 首页 ---------- */
.hero{
  background:linear-gradient(135deg,#eef4ff,#f5f0ff);border:1px solid #e0e9ff;
  border-radius:var(--radius);padding:18px;margin-bottom:16px
}
.hero h1{font-size:20px;margin-bottom:6px}
.hero .lead{font-size:14px;color:#475569;margin:0}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.chip{background:#fff;border:1px solid #dbe4f5;border-radius:20px;padding:4px 12px;font-size:12px;color:#44507a}
.src-note{margin-top:10px;font-size:12px;color:var(--muted);line-height:1.7}
.stat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:16px}
.stat{background:#fff;border-radius:10px;padding:10px;text-align:center;border:1px solid #eef1f7}
.stat .n{font-size:20px;font-weight:700;color:var(--brand);line-height:1.3}
.stat .t{font-size:11px;color:var(--muted)}

table{width:100%;border-collapse:collapse;font-size:13px}
th,td{border-bottom:1px solid var(--line);padding:8px 6px;text-align:left;vertical-align:top}
th{background:#f8fafc;font-weight:600;color:#475569}
td.score{color:var(--brand);font-weight:700;white-space:nowrap}
.tbl-wrap{overflow-x:auto}

/* ---------- 考点卡片 ---------- */
.mod-title{font-size:12px;color:var(--muted);margin:16px 4px 8px;font-weight:600;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.pt-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(252px,1fr));gap:12px}
.pt-card{
  background:#fff;border-radius:12px;border:1px solid var(--line);padding:14px;
  display:flex;flex-direction:column;gap:6px;transition:.15s;position:relative;text-align:left;width:100%
}
.pt-card:hover{border-color:var(--brand);box-shadow:0 4px 14px rgba(37,99,235,.12);transform:translateY(-2px)}
.pt-card .top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.pt-card .nm{font-weight:600;font-size:14px}
.pt-card .en{font-size:11px;color:var(--muted)}
.pt-card .meta{font-size:11px;color:var(--muted);display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pt-bar{height:5px;border-radius:3px;background:#eef1f7;overflow:hidden;margin-top:4px}
.pt-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--brand),var(--brand2));border-radius:3px;transition:width .4s}
.focus{background:#f8fafc;border-left:3px solid var(--brand);border-radius:0 8px 8px 0;padding:6px 10px;font-size:12.5px;line-height:1.7;color:#374151;margin-top:2px}
.focus b{color:var(--brand-dark)}
.tag{display:inline-block;font-size:11px;padding:1px 8px;border-radius:20px;background:#eef2ff;color:#44507a;white-space:nowrap}
.tag.ok{background:var(--ok-bg);color:var(--ok)}
.tag.warn{background:var(--warn-bg);color:#b45309}
.tag.err{background:var(--err-bg);color:var(--err)}
.tag.done{background:linear-gradient(90deg,var(--brand),var(--brand2));color:#fff}
.stars{color:#f59e0b;font-size:11px;letter-spacing:-1px;flex:none}

/* ---------- 重点速记 ---------- */
.kf-item{background:#f8fafc;border-left:3px solid var(--brand);border-radius:0 8px 8px 0;padding:8px 12px;margin-bottom:7px;font-size:13.5px;line-height:1.8}
.kf-item b{color:var(--brand-dark)}
.kf-group{border:1px solid var(--line);border-radius:10px;margin-bottom:10px;overflow:hidden;background:#fff}
.kf-head{padding:10px 14px;background:#f8fafc;font-weight:600;font-size:14px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;text-align:left}
.kf-head:hover{background:#f1f5f9}
.kf-head .ar{font-size:12px;color:var(--muted)}
.kf-body{padding:12px 14px;border-top:1px solid var(--line)}

/* ---------- 训练页 ---------- */
.train-wrap{display:grid;grid-template-columns:230px 1fr;gap:16px;align-items:start}
.pt-list{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:10px;position:sticky;top:76px;max-height:calc(100vh - 100px);overflow:auto}
.pt-list .mt{font-size:12px;color:var(--muted);margin:10px 8px 6px;font-weight:600}
.pt-item{padding:7px 10px;border-radius:8px;font-size:13px;display:flex;align-items:center;gap:6px;transition:.12s;width:100%;text-align:left}
.pt-item:hover{background:#f1f5f9}
.pt-item.active{background:#eef4ff;color:var(--brand);font-weight:600}
.pt-item .dot{width:6px;height:6px;border-radius:50%;background:#cbd5e1;flex:none}
.pt-item.done .dot{background:var(--ok)}
.qhead{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.qhead .idx{font-size:13px;color:var(--muted)}
.lvl{font-size:11px;padding:2px 9px;border-radius:20px;background:#eef2ff;color:#44507a}
.lvl.l2{background:#fff7ed;color:#c2410c}
.lvl.l3{background:#fef2f2;color:#b91c1c}
.qdots{display:flex;gap:4px;flex-wrap:wrap;margin-left:auto}
.qdot{width:24px;height:24px;border-radius:7px;background:#f1f5f9;font-size:11px;font-weight:700;color:#94a3b8;display:flex;align-items:center;justify-content:center}
.qdot.done{background:var(--ok-bg);color:var(--ok)}
.qdot.wrong{background:var(--err-bg);color:var(--err)}
.qdot.cur{outline:2px solid var(--brand);outline-offset:1px;color:var(--brand)}
.qtext{font-size:16px;line-height:1.9;white-space:pre-wrap;word-break:break-word;margin:0 0 4px}

/* ---------- 选项 ---------- */
.opts{display:grid;gap:10px;margin-top:14px}
.opt{
  display:flex;gap:10px;align-items:flex-start;background:#fbfcfe;border:1.5px solid var(--line);
  border-radius:10px;padding:11px 14px;font-size:15px;line-height:1.7;text-align:left;transition:.12s;width:100%
}
.opt:hover:not(:disabled){border-color:var(--brand);background:#f5f9ff}
.opt .k{
  flex:none;width:24px;height:24px;border-radius:50%;background:#fff;border:1.5px solid #cbd5e1;
  display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#64748b;margin-top:1px
}
.opt.picked{border-color:var(--brand);background:#eef4ff}
.opt.right{border-color:var(--ok);background:var(--ok-bg)}
.opt.right .k{background:var(--ok);color:#fff;border-color:var(--ok)}
.opt.wrong{border-color:var(--err);background:var(--err-bg)}
.opt.wrong .k{background:var(--err);color:#fff;border-color:var(--err)}
.opt:disabled{cursor:default}
.res-banner{border-radius:10px;padding:10px 14px;font-size:14px;font-weight:600;margin-top:14px;display:flex;align-items:center;gap:8px}
.res-banner.ok{background:var(--ok-bg);color:var(--ok);border:1px solid #a7f3d0}
.res-banner.err{background:var(--err-bg);color:var(--err);border:1px solid #fecaca}

/* ---------- 解析面板 ---------- */
.analysis{margin-top:14px;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.an-box{padding:12px 14px;border-bottom:1px solid var(--line)}
.an-box:last-child{border-bottom:none}
.an-box .h{font-weight:700;font-size:13px;display:flex;align-items:center;gap:6px;margin-bottom:5px}
.an-box .c{font-size:14px;line-height:1.85;color:#374151;white-space:pre-wrap}
.an-key{background:linear-gradient(135deg,#eef4ff,#f5f3ff)}.an-key .h{color:var(--brand-dark)}
.an-how{background:#fffbeb}.an-how .h{color:#b45309}
.an-ex{background:#f8fafc}.an-ex .h{color:var(--brand)}
.an-base{background:#f5f3ff}.an-base .h{color:var(--brand2)}
.an-trap{background:#fef2f2}.an-trap .h{color:#b91c1c}
.an-ref{background:#ecfdf5}.an-ref .h{color:var(--ok)}
.an-pts{background:#eef2ff}.an-pts .h{color:#4338ca}
.an-box ol{margin:0;padding-left:20px}
.an-box ol li{margin-bottom:5px;font-size:14px;line-height:1.85}
.fml-box{background:var(--fml-bg);border:1px dashed var(--fml-line);border-radius:9px;padding:9px 12px;font-size:14px;line-height:1.9;white-space:pre-wrap}
.unit-tip{background:#fffbeb;border-radius:8px;padding:7px 11px;font-size:13px;color:#b45309;margin-top:8px}

/* ---------- 总结 ---------- */
.sum-hero{text-align:center;padding:22px 16px;background:linear-gradient(135deg,#eef4ff,#f5f0ff);border-radius:var(--radius);margin-bottom:16px}
.sum-hero .big{font-size:40px;font-weight:800;color:var(--brand);line-height:1.2}
.sum-hero .big.good{color:var(--ok)}.sum-hero .big.mid{color:var(--warn)}.sum-hero .big.bad{color:var(--err)}
.sum-hero .cmt{font-size:14px;color:#475569;margin-top:4px}
.sum-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}
.sum-grid .s{background:#fff;border-radius:10px;padding:10px;text-align:center;border:1px solid #eef1f7}
.sum-grid .s .n{font-size:19px;font-weight:700}
.sum-grid .s .t{font-size:11px;color:var(--muted)}
.wrong-item{border:1px solid #fecaca;background:var(--err-bg);border-radius:10px;padding:10px 12px;margin-bottom:8px;font-size:13.5px}
.wrong-item .qs{font-weight:600;margin-bottom:3px}

/* ---------- 路线图 ---------- */
.road{position:relative;padding-left:24px}
.road::before{content:"";position:absolute;left:7px;top:6px;bottom:6px;width:2px;background:linear-gradient(var(--brand),var(--brand2))}
.road-item{position:relative;margin-bottom:16px}
.road-item::before{content:"";position:absolute;left:-22px;top:6px;width:12px;height:12px;border-radius:50%;background:#fff;border:3px solid var(--brand)}
.road-item .st{font-weight:700;font-size:15px;color:var(--brand)}
.road-item .tg{font-size:12px;color:var(--muted);margin-bottom:4px}
.road-item .ds{font-size:13.5px;line-height:1.8}
.road-item .its{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.road-item .its button{background:#eef4ff;color:var(--brand);border-radius:8px;padding:3px 10px;font-size:12.5px}
.road-item .its button.done{background:var(--ok-bg);color:var(--ok)}

/* ---------- 列表 / 空态 ---------- */
.wb-item{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin-bottom:10px}
.wb-item .q{font-size:14.5px;line-height:1.8;margin-bottom:6px}
.wb-item .a{font-size:13px;color:var(--muted)}
.empty{text-align:center;padding:40px 16px;color:var(--muted)}
.empty .ico{font-size:40px;margin-bottom:8px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.spacer{margin-left:auto}
.crumb{font-size:13px;color:var(--muted);margin-bottom:10px}
.crumb b{color:var(--brand)}

/* ---------- 自检 ---------- */
.chk{display:flex;align-items:flex-start;gap:10px;padding:10px 13px;border-radius:10px;margin-bottom:8px;font-size:13.6px;border:1px solid var(--line);background:#fff}
.chk.pass{background:var(--ok-bg);border-color:#a7f3d0}
.chk.fail{background:var(--err-bg);border-color:#fecaca}
.chk .ic{font-weight:800}
.chk .nm{font-weight:700}
.chk .dt{color:var(--muted);font-size:12.8px}
.sumbar{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px}
.sumbar .b{background:#fff;border-radius:10px;padding:10px;text-align:center;border:1px solid #eef1f7}
.sumbar .b .n{font-size:19px;font-weight:700;color:var(--brand);display:block}
.sumbar .b .t{font-size:11px;color:var(--muted)}

/* ---------- 表单 ---------- */
textarea{width:100%;min-height:170px;border:1.5px solid var(--line);border-radius:10px;padding:11px;font-size:13px;font-family:ui-monospace,Menlo,Consolas,monospace;resize:vertical;background:#fbfcfe}
textarea:focus,select:focus,input:focus{outline:none;border-color:var(--brand)}
select{padding:8px 10px;border-radius:9px;border:1.5px solid var(--line);font-size:14px;font-family:inherit;background:#fff}
.hintline{font-size:12.5px;color:var(--muted);margin-top:7px}

/* ---------- 图表 ---------- */
.kmap table{border-collapse:collapse;margin:0 auto;font-size:13px}
.kmap th,.kmap td{border:1px solid #cbd5e1;width:52px;height:40px;text-align:center;font-weight:700}
.kmap th{background:#f1f5f9;font-size:12px}
.kmap td{color:#cbd5e1}
.kmap td.on{background:#eef4ff;color:var(--brand)}
.kmap td span{font-size:11px;font-weight:400;color:#94a3b8}
.diagram{margin:10px 0;overflow-x:auto}

/* ---------- 浮动提示 ---------- */
.toast{
  position:fixed;left:50%;bottom:80px;transform:translateX(-50%);
  background:rgba(17,24,39,.92);color:#fff;padding:10px 18px;border-radius:24px;
  font-size:13.5px;z-index:200;opacity:0;transition:.25s;pointer-events:none;max-width:90vw;text-align:center
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(-6px)}

/* ---------- 底部导航 ---------- */
.tabbar{
  display:none;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);
  z-index:60;padding:6px 0 env(safe-area-inset-bottom)
}
.tabbar .t{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;color:var(--muted);padding:4px}
.tabbar .t.active{color:var(--brand);font-weight:600}
.tabbar .t .ic{font-size:18px;line-height:1}

/* ---------- 页脚 ---------- */
.foot{text-align:center;color:var(--muted);font-size:12px;padding:6px 14px 24px;line-height:1.8}

@media (max-width:860px){
  .train-wrap{grid-template-columns:1fr}
  .pt-list{position:static;max-height:none;display:flex;gap:6px;overflow-x:auto;padding:8px}
  .pt-list .mt{display:none}
  .pt-item{white-space:nowrap;border:1px solid var(--line);width:auto}
  .stat-row,.sum-grid{grid-template-columns:repeat(2,1fr)}
  .sumbar{grid-template-columns:repeat(3,1fr)}
  .hd-nav{display:none}
  .tabbar{display:flex}
  main{padding-bottom:70px}
  .hero h1{font-size:18px}
  .qtext{font-size:15px}
  .hd-stat{font-size:11px}
}
