/* ================= 塑材搜 PolySearch ================= */
:root{
  --brand:#0b62d0; --brand-dk:#084a9e; --ink:#1f2328; --ink2:#3c4043;
  --muted:#5f6368; --line:#e3e6ea; --line2:#eef1f4; --bg:#fff; --bg2:#f7f9fb;
  --green:#0f7b45; --amber:#a35b00;
  --radius:12px; --shadow:0 1px 3px rgba(16,24,40,.06),0 8px 24px rgba(16,24,40,.06);
  --shadow-sm:0 1px 2px rgba(16,24,40,.06),0 2px 8px rgba(16,24,40,.05);
}
*{box-sizing:border-box}
[hidden]{display:none !important}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue","Microsoft YaHei","PingFang SC",sans-serif;
  color:var(--ink); background:var(--bg); font-size:14px; line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}
button{font-family:inherit; font-size:inherit; cursor:pointer}
.muted{color:var(--muted)}
.dot{margin:0 6px; color:#c9cdd2}

/* ---------- 通用控件 ---------- */
.btn-primary{background:var(--brand); color:#fff; border:0; border-radius:8px; padding:9px 18px; font-weight:600; transition:background .15s}
.btn-primary:hover{background:var(--brand-dk)}
.btn-primary:disabled{background:#c8d3e0; cursor:not-allowed}
.btn-ghost{background:#fff; color:var(--ink2); border:1px solid var(--line); border-radius:8px; padding:8px 14px; font-weight:500}
.btn-ghost:hover{background:var(--bg2)}
.linklike{background:none;border:0;color:var(--brand);padding:0}
.linklike:hover{text-decoration:underline}

/* ---------- 首页 ---------- */
.home-top{display:flex; justify-content:space-between; align-items:center; padding:14px 22px; font-size:12.5px; color:var(--muted)}
.badge{background:#eaf2fd; color:var(--brand-dk); border:1px solid #d5e6fb; padding:3px 10px; border-radius:999px; font-weight:600}
.hero{max-width:860px; margin:0 auto; padding:40px 20px 0; text-align:center}
.logo-mark{font-size:40px; font-weight:700; letter-spacing:-.5px; color:var(--ink); font-family:"Segoe UI",Roboto,sans-serif}
.logo-mark span{color:var(--brand)}
.logo-mark.sm{font-size:20px}
.logo-sub{margin-top:6px; color:var(--muted); font-size:13.5px}
.logo{margin-bottom:28px}

.searchbar{position:relative; display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:26px; padding:6px 8px 6px 16px; box-shadow:var(--shadow-sm); background:#fff; transition:box-shadow .15s,border-color .15s}
.searchbar:focus-within{border-color:#c9dcf5; box-shadow:var(--shadow)}
.searchbar.compact{border-radius:22px; padding:3px 6px 3px 14px; flex:1; max-width:640px; box-shadow:none; border-color:var(--line)}
.ico-search{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:#9aa0a6;stroke-width:2;stroke-linecap:round}
.searchbar input{flex:1; border:0; outline:0; font-size:15.5px; padding:10px 0; background:transparent; color:var(--ink); min-width:0}
.searchbar.compact input{font-size:14px; padding:8px 0}
.ico-clear{border:0; background:#eef1f4; color:#5f6368; width:20px;height:20px;line-height:1; border-radius:50%; font-size:15px; padding:0}
.searchbar .btn-primary{border-radius:20px}
.searchbar.compact .btn-primary{border-radius:18px;padding:7px 14px;font-size:13.5px}

.suggest{position:absolute; left:0; right:0; top:calc(100% + 8px); background:#fff; border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); overflow:hidden; text-align:left; z-index:40; max-height:380px; overflow-y:auto}
.sg{display:flex; align-items:center; gap:10px; padding:9px 14px; cursor:pointer; border-bottom:1px solid var(--line2)}
.sg:last-child{border-bottom:0}
.sg:hover,.sg.on{background:#f3f8ff}
.sg-ico{width:16px;height:16px;stroke:#9aa0a6;fill:none;stroke-width:2;flex:0 0 16px}
.sg-main{flex:1; min-width:0}
.sg-t{font-weight:600; color:var(--ink)}
.sg-t em{color:var(--brand); font-style:normal}
.sg-s{color:var(--muted); font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.sg-kind{font-size:11.5px; color:var(--muted); border:1px solid var(--line); border-radius:5px; padding:1px 6px; flex:0 0 auto}

.scope{margin-top:30px; text-align:left}
.scope-label{font-size:13px; color:var(--ink2); font-weight:600; margin-bottom:9px}
.scope-note{font-weight:400; color:var(--muted); font-size:12px}
.chips{display:flex; flex-wrap:wrap; gap:8px}
.co-group-tag{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); background:#f4f6f9; border:1px solid var(--line); border-radius:999px; padding:3px 10px; white-space:nowrap}
.co-group-tag::before{content:""; width:3px; height:12px; border-radius:2px; background:#c8d3e0}
.chip{display:inline-flex; align-items:center; gap:7px; background:#fff; border:1px solid var(--line); border-radius:999px; padding:6px 13px; font-size:13px; color:var(--ink2); transition:all .13s; white-space:nowrap; flex:0 0 auto}
.chip:hover{border-color:#c7d4e4; background:var(--bg2)}
.chip .co-dot{width:8px;height:8px;border-radius:50%;background:#c9cdd2}
.chip .co-n{color:var(--muted); font-size:12px}
.chip.on{background:#eaf2fd; border-color:#bcd8f8; color:var(--brand-dk); font-weight:600}
.chip.on .co-n{color:var(--brand-dk); opacity:.75}
.chip.disabled{opacity:.55; cursor:default; border-style:dashed}
.chip.disabled:hover{background:#fff; border-color:var(--line)}
.chip-sm{padding:4px 11px; font-size:12.5px}
.chips-quiet .chip{background:var(--bg2); border-color:transparent}
.chips-quiet .chip:hover{background:#eef1f4}

.hero-hints{margin-top:26px; text-align:left; font-size:12.5px; color:var(--muted)}
.hint-label{display:block; margin-bottom:7px}

.home-foot{max-width:860px; margin:52px auto 40px; padding:18px 20px 0; border-top:1px solid var(--line2); color:var(--ink2); font-size:12.5px; text-align:center}
.home-foot .muted{margin-top:8px; font-size:12px}

/* ---------- 结果页 ---------- */
.results-top{border-bottom:1px solid var(--line); background:#fff; position:sticky; top:0; z-index:30}
.results-top-inner{display:flex; align-items:center; gap:18px; padding:12px 22px 6px; max-width:1400px; margin:0 auto}
.brand-btn{background:none;border:0;padding:0}
.results-top-chips{display:flex; align-items:center; gap:8px; white-space:nowrap; padding:2px 22px 12px; max-width:1400px; margin:0 auto; flex-wrap:wrap}
.results-body{display:flex; gap:26px; max-width:1400px; margin:0 auto; padding:20px 22px 140px; align-items:flex-start}
.filters{flex:0 0 232px; width:232px; position:sticky; top:120px; border:1px solid var(--line); border-radius:var(--radius); padding:14px; background:#fff}
.f-title{font-weight:700; font-size:13px; margin:0 0 10px}
.f-group{border-top:1px solid var(--line2); padding:11px 0 4px}
.f-group:first-of-type{border-top:0; padding-top:0}
.f-head{display:flex; justify-content:space-between; align-items:center; font-weight:600; font-size:12.5px; color:var(--ink2); cursor:pointer}
.f-head .caret{color:var(--muted); font-size:11px; transition:transform .15s}
.f-group.collapsed .f-opts{display:none}
.f-group.collapsed .f-head .caret{transform:rotate(-90deg)}
.f-opts{margin-top:8px; display:flex; flex-direction:column; gap:2px; max-height:230px; overflow-y:auto}
.f-opt{display:flex; align-items:center; gap:8px; padding:4px 6px; border-radius:6px; cursor:pointer; font-size:13px; color:var(--ink2)}
.f-opt:hover{background:var(--bg2)}
.f-opt input{margin:0; accent-color:var(--brand)}
.f-cnt{color:var(--muted); font-size:11.5px; margin-left:auto}
.f-clear{margin-top:12px; width:100%; text-align:center; font-size:12.5px}

.results-col{flex:1; min-width:0}
.results-head{font-size:13px; color:var(--muted); margin-bottom:12px}
.results-head b{color:var(--ink)}
.results-toolbar{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px}
.seg{display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden}
.seg button{background:#fff;border:0;padding:7px 13px;color:var(--ink2);font-size:12.5px;border-right:1px solid var(--line)}
.seg button:last-child{border-right:0}
.seg button.on{background:#eaf2fd;color:var(--brand-dk);font-weight:600}
.toolbar-note{font-size:12.5px;color:var(--muted);margin-left:auto}

.co-group{margin:0 0 26px}
.co-group-head{display:flex; align-items:center; gap:12px; padding:10px 14px; background:var(--bg2); border:1px solid var(--line); border-radius:10px; margin-bottom:12px}
.co-logo{width:52px;height:29px;border-radius:6px;color:#fff;font-size:11.5px;font-weight:700; display:flex;align-items:center;justify-content:center; letter-spacing:.3px; flex:0 0 52px}
.co-logo.lg{font-size:9px; letter-spacing:0; padding:0 3px}
.co-name{font-weight:700}
.co-desc{color:var(--muted); font-size:12.5px; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.co-count{font-size:12px; color:var(--muted); border:1px solid var(--line); background:#fff; padding:2px 9px; border-radius:999px}

.card{border:1px solid var(--line); border-radius:var(--radius); padding:15px 17px; margin-bottom:12px; background:#fff; transition:box-shadow .15s,border-color .15s}
.card:hover{box-shadow:var(--shadow-sm); border-color:#d8dee6}
.card.picked{border-color:#bcd8f8; background:#fbfdff}
.card-top{display:flex; gap:14px; align-items:flex-start}
.card-check{padding-top:3px}
.card-check input{width:16px;height:16px;accent-color:var(--brand)}
.card-main{flex:1; min-width:0}
.card-title{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap}
.card-grade{font-size:16.5px; font-weight:700; color:var(--ink); letter-spacing:.2px}
.card-zh{font-size:13px; color:var(--brand-dk); background:#eaf2fd; border-radius:5px; padding:1px 7px}
.card-en{font-size:12.5px; color:var(--muted)}
.card-sum{margin-top:6px; color:var(--ink2); font-size:13px}
.card-desc{margin-top:4px; color:var(--muted); font-size:12.5px}
.tags{display:flex; flex-wrap:wrap; gap:6px; margin-top:9px}
.tag{font-size:11.5px; color:var(--ink2); background:var(--bg2); border:1px solid var(--line2); border-radius:5px; padding:1px 7px}
.tag.k{background:#fff; border-color:var(--line); color:var(--muted)}
.tag.app{background:#f4faf6; border-color:#dcefe4; color:#14683c}

.docs{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; align-items:center}
.doc{display:inline-flex; align-items:center; gap:6px; border:1px solid var(--line); background:#fff; border-radius:7px; padding:5px 11px; font-size:12.5px; font-weight:600; color:var(--ink2)}
.doc:hover{border-color:#c7d4e4; background:var(--bg2); text-decoration:none}
.doc svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.doc.tds{color:#0b62d0; border-color:#cfe2fb; background:#f6faff}
.doc.tds:hover{background:#eaf2fd}
.doc.sds{color:#0f7b45; border-color:#d3ecdf; background:#f6fdf9}
.doc.sds:hover{background:#eaf7f0}
.doc.ul{color:#a35b00; border-color:#f0e0c2; background:#fffdf6}
.doc.ul:hover{background:#fdf6e7}
.doc.src{color:var(--muted); background:#fff}
.doc .cnt{font-weight:600; opacity:.7; font-size:11px}
.doc-missing{font-size:12px; color:var(--muted); border:1px dashed var(--line); border-radius:7px; padding:5px 11px}
.card-more{margin-top:11px}
.card-more summary{cursor:pointer; font-size:12.5px; color:var(--brand); list-style:none}
.card-more summary::-webkit-details-marker{display:none}
.card-detail{margin-top:11px; border-top:1px solid var(--line2); padding-top:11px}
.kv{display:grid; grid-template-columns:150px 1fr; gap:6px 14px; font-size:13px; margin:0}
.kv dt{color:var(--muted); margin:0}
.kv dd{margin:0; color:var(--ink2)}
.dl-note{font-size:12px; color:var(--muted); margin-top:8px}
.dl-list{display:flex; flex-direction:column; gap:5px; margin-top:9px; font-size:12.5px}
.dl-list a{display:inline-flex; gap:8px; align-items:center}
.dl-list .lang{color:var(--muted); font-size:11.5px; border:1px solid var(--line); border-radius:4px; padding:0 5px}

.empty{border:1px dashed var(--line); border-radius:var(--radius); padding:40px 20px; text-align:center; color:var(--muted)}
.empty b{display:block; color:var(--ink); font-size:15px; margin-bottom:6px}

.compare-bar{position:fixed; left:0; right:0; bottom:0; background:#fff; border-top:1px solid var(--line); box-shadow:0 -4px 18px rgba(16,24,40,.08); padding:11px 22px; display:flex; align-items:center; gap:16px; z-index:50}
.cb-items{display:flex; gap:8px; flex-wrap:wrap; flex:1; min-width:0}
.cb-pill{display:inline-flex; align-items:center; gap:7px; background:var(--bg2); border:1px solid var(--line); border-radius:999px; padding:4px 6px 4px 11px; font-size:12.5px}
.cb-pill b{font-weight:700}
.cb-x{border:0;background:#e3e6ea;border-radius:50%;width:17px;height:17px;line-height:1;color:#5f6368;padding:0}
.cb-actions{display:flex; gap:9px; flex:0 0 auto}

.cmp-actions{display:flex; gap:9px; margin-bottom:14px; flex-wrap:wrap}
.cmp-table-wrap{overflow:auto; border:1px solid var(--line); border-radius:var(--radius); background:#fff; max-height:76vh}
table.cmp{border-collapse:separate; border-spacing:0; width:100%; font-size:13px}
table.cmp th,table.cmp td{border-bottom:1px solid var(--line2); border-right:1px solid var(--line2); padding:9px 13px; vertical-align:top; text-align:left}
table.cmp thead th{position:sticky; top:0; background:#fbfcfe; z-index:2}
table.cmp th:first-child,table.cmp td:first-child{position:sticky; left:0; background:#fbfcfe; width:150px; color:var(--muted); font-weight:500; z-index:1}
table.cmp tbody tr:hover td{background:#fcfdff}
table.cmp tbody tr:hover td:first-child{background:#f7fafd}
.cmp-co{display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:#fff; border-radius:4px; padding:1px 7px}
.cmp-h{font-weight:700; font-size:14px}
.cmp-diff td{background:#fffdf6}
.cmp-legend{font-size:12px; color:var(--muted); margin-top:10px}

.modal-wrap{position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center}
.modal-mask{position:absolute; inset:0; background:rgba(16,24,40,.42)}
.modal{position:relative; background:#fff; border-radius:14px; width:min(720px,92vw); max-height:82vh; display:flex; flex-direction:column; box-shadow:var(--shadow)}
.modal.wide{width:min(1320px,95vw)}
.modal.wide .modal-body{padding:14px 16px}
.modal-body .cmp-table-wrap{max-height:62vh}
.modal-body .cmp-actions{position:sticky; top:-14px; background:#fff; padding-bottom:8px; z-index:3}
.modal-body .cmp-legend{position:sticky; bottom:-14px; background:#fff; padding-top:8px}
.modal-head{display:flex; align-items:center; justify-content:space-between; padding:15px 18px; border-bottom:1px solid var(--line)}
.modal-title{font-weight:700; font-size:15px}
.modal-x{border:0;background:none;font-size:22px;line-height:1;color:var(--muted)}
.modal-body{padding:16px 18px; overflow:auto}
.m-search{width:100%; border:1px solid var(--line); border-radius:8px; padding:9px 12px; font-size:13.5px; margin-bottom:12px; outline:0}
.m-search:focus{border-color:#bcd8f8}
.m-sec{font-size:12px; color:var(--muted); font-weight:600; margin:14px 0 7px}
.m-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:7px}
.m-item{display:flex; align-items:center; gap:9px; border:1px solid var(--line); border-radius:8px; padding:8px 11px; font-size:12.5px; color:var(--ink2); background:#fff}
.m-item:hover{border-color:#c7d4e4; background:var(--bg2); text-decoration:none}
.m-item .lang{color:var(--muted); font-size:11px; margin-left:auto}
.m-item.preferred{border-color:#9dc9ae; background:#f4fbf7; color:var(--ink); font-weight:600}
.m-item.preferred:hover{border-color:#7bb894; background:#eaf7f0}
.dl-list a.preferred{color:var(--ink); font-weight:600}
.about h4{margin:16px 0 6px; font-size:13.5px}
.about p,.about li{font-size:13px; color:var(--ink2)}
.about ul{margin:6px 0; padding-left:20px}

.toast{position:fixed; left:50%; bottom:96px; transform:translateX(-50%); background:#1f2328; color:#fff; padding:9px 16px; border-radius:8px; font-size:13px; z-index:200; box-shadow:var(--shadow)}

@media (max-width: 980px){
  .results-body{flex-direction:column; padding:16px 14px 150px}
  .filters{position:static; width:100%; flex:none}
  .results-top-inner{flex-wrap:wrap; gap:10px; padding:10px 14px 4px}
  .results-top-chips{padding:2px 14px 10px; flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none}
  .results-top-chips .chips, .results-top-chips{flex-wrap:nowrap}
  .searchbar.compact{max-width:none; order:3; flex:1 1 100%}
  .co-desc{display:none}
  .hero{padding-top:22px}
  .logo-mark{font-size:32px}
  .compare-bar{flex-direction:column; align-items:stretch; gap:9px}
  .kv{grid-template-columns:110px 1fr}
}






/* UL 黄卡状态徽标 */
.doc .cnt.warn{color:#b45309; background:#fdf1dd; opacity:1; border-radius:4px; padding:0 5px}
.doc .cnt.ok{color:#0f7b45; background:#e8f7ef; opacity:1; border-radius:4px; padding:0 5px}
