/* 专升本计算机基础 · 在 common.css 之上的扩展:考情分析、星级、速记、对比表、思维树 */
.cover-hero{border-radius:16px;padding:22px 26px;margin:6px 0 18px;color:#fff;background:linear-gradient(135deg,#0e9a8d,#0a6f66 60%,#27508f)}
.cover-hero h1{color:#fff!important;font-size:clamp(28px,4vw,38px)}
.cover-hero p{margin:.3em 0;opacity:.95}
.cover-hero .meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.cover-hero .meta span{background:rgba(255,255,255,.18);border-radius:999px;padding:1px 12px;font-size:13.5px}
.exam-panel{border:1px solid var(--line);border-radius:14px;margin:16px 0;overflow:hidden;background:var(--bg)}
.exam-panel>.ep-h{background:var(--bg2);border-bottom:1px solid var(--line);padding:9px 16px;font-weight:700;display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.exam-panel>.ep-h small{font-weight:400;color:var(--muted)}
.exam-panel table.t{margin:0;border:0}
.exam-panel table.t th,.exam-panel table.t td{border-left:0;border-right:0}
.stars{color:#e8a010;letter-spacing:2px;white-space:nowrap;font-size:14px}
.stars i{font-style:normal;color:var(--line)}
.heat{display:inline-block;width:100%;min-width:90px;height:9px;border-radius:6px;background:var(--bg2);border:1px solid var(--line);overflow:hidden;vertical-align:middle}
.heat b{display:block;height:100%;background:linear-gradient(90deg,var(--brand),#27508f);border-radius:6px}
.heatn{font-size:12px;color:var(--muted);white-space:nowrap}
.qtype{display:inline-block;font-size:11.5px;border-radius:5px;padding:0 6px;margin:1px 2px 1px 0;background:var(--brand-soft);color:var(--brand-ink)}
.qtype.c{background:color-mix(in srgb,var(--c1) 14%,var(--bg));color:var(--c1)}
.qtype.f{background:color-mix(in srgb,var(--c3) 16%,var(--bg));color:var(--c3)}
.qtype.o{background:color-mix(in srgb,var(--c2) 15%,var(--bg));color:var(--c2)}
.note-src{font-size:12.5px;color:var(--muted);margin:6px 2px 0;line-height:1.7}
.mnemo{border:1.5px dashed var(--brand);border-radius:12px;padding:8px 16px;margin:14px 0;background:var(--brand-soft)}
.mnemo b.lbl{color:var(--brand-ink)}
.trap{border-left:4px solid var(--bad);background:var(--bad-soft);border-radius:0 10px 10px 0;padding:8px 14px;margin:14px 0}
.trap b.lbl{color:var(--bad)}
.compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin:12px 0}
.compare>div{border:1px solid var(--line);border-radius:12px;padding:10px 14px;background:var(--bg2)}
.compare>div>b{display:block;color:var(--brand-ink);margin-bottom:2px}
.compare ul{margin:.3em 0;padding-left:1.2em}
.tree{margin:12px 0;border-left:3px solid var(--brand);padding-left:14px}
.tree .tn{font-weight:700;color:var(--brand-ink);margin:6px 0 2px}
.tree ul{margin:.2em 0 .5em;padding-left:1.2em}
.tree li{margin:2px 0}
.fcalc{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center}
.fcalc input,.fcalc select{border:1.5px solid var(--line);border-radius:8px;padding:4px 10px;font:inherit;background:var(--bg);color:var(--ink);max-width:100%}
.fcalc input[type=text],.fcalc input[type=number]{width:11em}
.bits{display:flex;flex-wrap:wrap;gap:3px;margin:6px 0;font-family:Consolas,"Cascadia Mono",monospace}
.bits span{width:26px;height:30px;line-height:30px;text-align:center;border-radius:6px;border:1px solid var(--line);background:var(--bg2);font-weight:700;font-size:15px}
.bits span.s{background:var(--warn-soft);border-color:#f0a020;color:var(--warn)}
.bits span.on{background:var(--brand);color:#fff;border-color:var(--brand)}
.bitrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0}
.bitrow>b{min-width:4.2em;font-size:14px}
.kv{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;font-size:14.5px}
.kv>b{color:var(--brand-ink);white-space:nowrap}
.tl{position:relative;margin:14px 0 14px 8px;padding-left:20px;border-left:3px solid var(--brand)}
.tl>div{position:relative;margin:0 0 12px;padding:6px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg2)}
.tl>div::before{content:"";position:absolute;left:-29px;top:14px;width:11px;height:11px;border-radius:50%;background:var(--bg);border:3px solid var(--brand)}
.tl>div b{color:var(--brand-ink)}
.keybd{display:inline-block;border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;padding:0 6px;font:12.5px/20px Consolas,monospace;background:var(--bg);white-space:nowrap}
.ex{border:1px solid var(--line);border-radius:12px;padding:8px 14px;margin:12px 0;background:var(--bg)}
.ex>.exh{font-weight:700;color:var(--c1)}
.ex .sol{margin-top:4px;padding-top:4px;border-top:1px dashed var(--line);font-size:14.5px}
.toc-mini{columns:2 240px;column-gap:24px;font-size:14.5px;margin:6px 0}
.toc-mini a{display:block;padding:1px 0}
@media (max-width:600px){.bits span{width:22px;height:26px;line-height:26px;font-size:13px}}
@media print{
  .cover-hero{background:#0e9a8d!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .exam-panel,.tree,.mnemo,.trap,.ex,.tl>div,.compare>div{break-inside:avoid}
  .heat b{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .bits span.on{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  #pyBox .btn,#osiBox .btn{display:block!important}
  .tablewrap.nb{break-inside:avoid}
  table.t tr{break-inside:avoid}
}

/* 宽松表格:学习进度表(不换行、留白更多,窄屏横向滚动) */
.doc.wide{max-width:1080px}
table.t.roomy{font-size:14.5px}
table.t.roomy th,table.t.roomy td{white-space:nowrap;padding:12px 13px;line-height:1.6}
table.t.roomy td:first-child,table.t.roomy th:first-child{padding-left:20px}
.exam-panel .tablewrap{overflow-x:auto}

/* =====================================================================
   手机适配(不是等比缩放,而是重新设计交互):
   ≤900px  抽屉目录 + 底部导航栏 + 紧凑顶栏
   ≤700px  表格改卡片/横滑、做题区大按钮、演示控件竖排
   ===================================================================== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,.btn,.opt,a,select,input{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.phist{font-size:12.5px;color:var(--muted);margin:2px 2px 8px}
.psync{flex-basis:100%;font-size:12.5px;color:var(--muted)}
.swipehint{font-size:12.5px;color:var(--muted);margin:10px 0 -4px}
.mbar,.msheet,.m-top,.sb-user{display:none}
.toast{position:fixed;left:50%;bottom:84px;transform:translate(-50%,12px);background:var(--ink);color:var(--bg);padding:9px 18px;border-radius:999px;font-size:14.5px;opacity:0;pointer-events:none;transition:.25s;z-index:300;max-width:88vw;text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.tablewrap{-webkit-overflow-scrolling:touch}

@media (max-width:900px){
  body{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
  .hd{padding:0 10px;gap:8px}
  .hd .userbox,.hd #printBtn{display:none!important}
  .hd .iconbtn{width:42px;height:42px}
  .hd .burger{width:42px;height:42px;font-size:24px;display:block}
  .search{flex:1 1 0;width:auto;min-width:0}
  .hd{overflow:hidden}
  #ptTabs,#tpTabs{display:flex;flex-wrap:wrap;gap:6px}
  #ptTabs .btn,#tpTabs .btn{min-height:38px;padding:4px 12px}
  .search input{font-size:16px;height:40px;padding:0 10px 0 34px}
  .sb{width:min(86vw,330px);padding-bottom:40px;z-index:108;top:0;padding-top:70px;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  .sb .sb-user{display:block;border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:0 0 12px;background:var(--bg2)}
  .sb-user .who{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
  .sb-user .who small{color:var(--muted)}
  .sb-user .acts{display:flex;gap:14px;margin-top:6px;font-size:14px;flex-wrap:wrap}
  .sb-item{padding:11px 10px}
  .subs a{padding:8px 10px;font-size:14.5px}
  .main{padding:18px 16px 30px}
  .pn{margin-top:36px;flex-direction:column}
  .mbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:95;background:var(--bg);border-top:1px solid var(--line);padding:4px 6px calc(4px + env(safe-area-inset-bottom));box-shadow:0 -4px 16px rgba(0,0,0,.08)}
  .mbar>*{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:52px;border:0;background:none;color:var(--muted);text-decoration:none!important;font:inherit;font-size:12px;border-radius:10px;cursor:pointer}
  .mbar>* i{font-style:normal;font-size:20px;line-height:1.2}
  .mbar>*:active{background:var(--brand-soft);color:var(--brand-ink)}
  .msheet{position:fixed;left:0;right:0;bottom:0;z-index:110;background:var(--bg);border-radius:18px 18px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.28);max-height:68vh;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom)}
  .msheet[hidden]{display:none!important}
  .msh-h{display:flex;justify-content:space-between;align-items:center;padding:14px 18px 8px;font-size:16px}
  .msh-h button{border:0;background:var(--bg2);width:34px;height:34px;border-radius:50%;font-size:15px;color:var(--ink)}
  .msh-b{overflow:auto;padding:0 12px 14px}
  .msh-b a{display:block;padding:11px 10px;border-radius:10px;color:var(--ink);text-decoration:none!important;line-height:1.5}
  .msh-b a.l3{padding-left:26px;color:var(--muted);font-size:14.5px}
  .msh-b a:active{background:var(--brand-soft)}
  .scrim.show{z-index:105;inset:0}
  .m-top{display:grid;place-items:center;position:fixed;right:14px;bottom:calc(76px + env(safe-area-inset-bottom));width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:var(--bg);color:var(--ink);font-size:20px;box-shadow:var(--shadow);z-index:90;opacity:0;pointer-events:none;transition:.2s}
  .m-top.show{opacity:1;pointer-events:auto}
  .toast{bottom:calc(82px + env(safe-area-inset-bottom))}
}

@media (max-width:700px){
  body{font-size:16px;line-height:1.8}
  .doc h1{font-size:26px}
  .doc>h1+.sub{font-size:14px;line-height:1.7}
  section.sec{padding-top:24px;margin-top:12px}
  .sec>h2{font-size:23px;gap:8px;flex-wrap:wrap}
  .sec h3{font-size:18px;margin:26px 0 6px}
  ul,ol{padding-left:1.25em}
  .callout{padding:9px 12px;margin:14px 0;gap:8px}
  .callout .ic{font-size:16px}
  .cover-hero{padding:18px 18px;border-radius:14px}
  .cover-hero .meta span{font-size:12.5px}
  .mnemo,.trap{padding:8px 12px}
  .compare{grid-template-columns:1fr}
  .grid2,.grid3,.glossbox{grid-template-columns:1fr}
  .chgrid{grid-template-columns:1fr!important}
  pre{overflow-x:auto;font-size:13px}
  .formula{font-size:15.5px;padding:8px 10px}
  .exam-panel>.ep-h{font-size:15px;padding:9px 14px}
  .note-src{font-size:13px}
  .kv{grid-template-columns:1fr;gap:0}.kv>b{margin-top:6px}
  .tl{margin-left:4px;padding-left:16px}
  .tl>div::before{left:-25px}

  table.t{font-size:14.5px}
  table.t.m-scroll{min-width:560px;width:max-content;max-width:none}
  table.t.m-scroll th,table.t.m-scroll td{white-space:nowrap;padding:9px 12px}
  .widget table.t.m-scroll{min-width:0;width:100%}
  .widget table.t.m-scroll th,.widget table.t.m-scroll td{white-space:normal;padding:7px 9px}
  table.t.m-two{width:100%}
  table.t.m-two th,table.t.m-two td{padding:9px 10px;white-space:normal;word-break:break-word;overflow-wrap:anywhere}
  table.t.m-two td:first-child,table.t.m-two th:first-child{width:6.6em;min-width:5.4em;font-weight:600}
  table.t.m-two th:first-child{font-weight:700}
  table.t.m-cards,table.t.m-cards tbody{display:block;border:0;width:100%}
  table.t.m-cards tr:first-child{display:none}
  table.t.m-cards tr{display:block;border:1px solid var(--line);border-radius:12px;margin:10px 0;padding:8px 14px;background:var(--bg2)}
  table.t.m-cards td{display:block;border:0;position:relative;padding:5px 0 5px 6.4em;white-space:normal;word-break:break-word;overflow-wrap:anywhere;line-height:1.7;background:transparent}
    table.t.m-cards td::before{content:attr(data-label);position:absolute;left:0;top:5px;width:6em;line-height:1.7;color:var(--muted);font-size:13px;font-weight:400}
  table.t.m-cards td:first-child{display:block;font-weight:700;font-size:16px;padding:2px 0 7px;margin-bottom:4px;border-bottom:1px dashed var(--line);}
  table.t.m-cards td:first-child::before{display:none}
  table.t.m-cards td:empty{display:none}
  table.t.m-cards td .heat{min-width:0;width:120px;max-width:40vw}
  .exam-panel .tablewrap{padding:0 12px 6px}
  .exam-panel table.t.m-cards tr{background:var(--bg)}
  .tablewrap:has(table.m-cards){overflow:visible}
  /* 列很多的数据表(各章情况、做题记录等):卡片内改为两列小格,标题在上、数值在下 */
  table.t.m-cards.m-grid tr:not(:first-child){display:flex;flex-wrap:wrap;gap:2px 0}
  table.t.m-cards.m-grid td:first-child{flex:0 0 100%}
  table.t.m-cards.m-grid td:not(:first-child){flex:0 0 50%;box-sizing:border-box;padding:6px 8px 6px 0;font-size:15px}
  table.t.m-cards.m-grid td:not(:first-child){position:static}
  table.t.m-cards.m-grid td:not(:first-child)::before{position:static;display:block;width:auto;margin-bottom:1px;font-size:12px}
  table.t.roomy th,table.t.roomy td{white-space:normal}

  .widget{padding:0 12px 12px;border-radius:12px}
  .widget>.wtitle{margin:0 -12px 10px;padding:9px 12px;line-height:1.5}
  .fcalc{flex-direction:column;align-items:stretch;gap:10px}
  .fcalc label{display:flex;flex-direction:column;align-items:stretch;gap:4px;width:100%}
  .fcalc input[type=text],.fcalc input[type=number],.fcalc select{width:100%!important;max-width:100%;height:44px;font-size:16px;border-radius:10px}
  .fcalc input[type=range]{width:100%;height:32px}
  .fcalc output{min-width:0}
  .fcalc .btn,.ctrl .btn{flex:1 1 calc(50% - 8px);min-height:44px;font-size:15px}
  .ctrl{gap:8px}
  .tabs{flex-wrap:nowrap;overflow-x:auto;gap:8px;padding-bottom:6px;-webkit-overflow-scrolling:touch}
  .tabs .btn{flex:none;min-height:42px;white-space:nowrap}
  .stat>div{flex:1 1 44%}
  .readout{font-size:14.5px}
  .btn{min-height:40px;padding:6px 16px}
  textarea{font-size:16px!important}
  select,input{font-size:16px}
  input[type=range]{width:100%}

  .q{padding:14px 14px;border-radius:14px;margin:12px 0}
  .q .qh{font-size:16px;line-height:1.75}
  .doc .q,.doc .fcalc{overflow-wrap:anywhere}
  .fcalc{max-width:100%}
  .doc .q .qh code,.doc .q .qh pre{white-space:pre-wrap;overflow-wrap:anywhere}
  .q .src{display:inline-block;margin:4px 6px 0 0}
  .kpref{margin:4px 0 0 0}
  .opts{gap:10px}
  .opt{min-height:50px;padding:12px 14px;font-size:16px;line-height:1.55;border-radius:12px;display:flex;align-items:center}
  .opt:active:not(:disabled){background:var(--brand-soft);border-color:var(--brand)}
  .blank{width:8em;height:40px;font-size:16px;margin:4px 3px}
  .numin{width:100%;height:44px;font-size:16px;margin-bottom:8px}
  .q .ctrl{flex-wrap:wrap}
  .q .ctrl .btn{flex:1 1 40%}
  details.ans>summary{min-height:44px;display:flex;align-items:center}
  .explain{font-size:15px;padding:10px 12px}
  .scorebar{top:56px;padding:8px 12px;gap:6px 10px;font-size:14px;border-radius:0 0 12px 12px}
  .scorebar>b:first-child{display:none}
  .scorebar .progress{flex-basis:100%;order:5}
  .scorebar #pRedo{margin-left:auto;min-height:34px;padding:2px 12px}
  .psync{display:none}
  .pn a,.pn span{padding:12px 16px}
  .pwf input{width:100%}
  .pwf .btn{width:100%;min-height:46px}
}
@media (max-width:380px){
  .main{padding:16px 12px 30px}
}
@media print{.mbar,.msheet,.m-top,.toast,.swipehint,.sb-user{display:none!important}
}

/* ===== 统一线条图标(emoji → SVG) ===== */
.ic{display:inline-block;width:1.2em;height:1.2em;vertical-align:-.22em;line-height:1;flex:none}
.ic svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ic.ok{color:var(--ok)}.ic.bad{color:var(--bad)}.ic.warn{color:var(--warn)}.ic.star{color:#f0a020}
.callout .ic,.wtitle .ic{color:var(--brand)}
.callout .ic.ok{color:var(--ok)}.callout .ic.bad{color:var(--bad)}.callout .ic.warn{color:var(--warn)}
.hd .burger .ic,.hd .iconbtn .ic{width:22px;height:22px;vertical-align:middle}
.search .sicon .ic{width:16px;height:16px;vertical-align:-3px}
.mbar i{font-style:normal;display:grid;place-items:center;height:26px}
.mbar i .ic{width:24px;height:24px;vertical-align:middle}
.mbar .on i,.mbar a:active i,.mbar button:active i{color:var(--brand)}
.subs a.subhome{color:var(--brand-ink);font-weight:600}
.userbox .ic{width:17px;height:17px;vertical-align:-3px;margin-right:2px}

/* ===== 思维导图 ===== */
.mm{margin:14px 0}
.mm-wrap{border:1px solid var(--line);border-radius:14px;background:var(--bg2);padding:10px;overflow-x:auto}
.mm-svg{display:block;width:100%;min-width:0;height:auto}
.mm-svg .mm-leaf{fill:var(--bg);stroke-width:1.6}
.mm-svg .mm-bt{fill:#fff}
.mm-svg .mm-lt{fill:var(--ink)}
.mm-list{display:none}
@media (max-width:900px){
  .mm-wrap{display:none}
  .mm-list{display:block}
  .mm-root{background:#0B5F57;color:#fff;font-weight:700;font-size:18px;text-align:center;border-radius:12px;padding:12px;margin-bottom:10px}
  .mm-br{border:1.5px solid var(--c);border-radius:12px;margin:8px 0;background:var(--bg);overflow:hidden}
  .mm-br>summary{list-style:none;cursor:pointer;background:var(--c);color:#fff;font-weight:700;font-size:16px;padding:12px 14px;min-height:44px;display:flex;align-items:center;justify-content:space-between}
  .mm-br>summary::-webkit-details-marker{display:none}
  .mm-br>summary::after{content:"+";font-size:20px;font-weight:400}
  .mm-br[open]>summary::after{content:"−"}
  .mm-br ul{margin:0;padding:8px 14px 10px 30px}
  .mm-br li{padding:5px 0;font-size:15.5px;line-height:1.6}
}
@media print{.mm-wrap{display:block!important;overflow:visible;border:0;padding:0}.mm-svg{min-width:0;width:100%}.mm-list{display:none!important}}

table.t.m-fit td,table.t.m-fit th{white-space:nowrap}
@media (max-width:700px){table.t.m-fit td,table.t.m-fit th{padding:3px 8px;font-size:15px;line-height:1.5}}
