/* Ngăn "Cách chấm điểm" (tỷ trọng, từ khóa theo mục, ngưỡng) — dùng chung các lớp sf-* của source-filters.css */
.sp-summary{margin:8px 0 0;font-size:13px}
#spOverlay{position:fixed;inset:0;background:rgba(10,20,15,.45);opacity:0;pointer-events:none;transition:opacity .18s;z-index:60}
#spOverlay.open{opacity:1;pointer-events:auto}
#spDrawer{position:fixed;inset:0 0 0 auto;left:auto;width:min(580px,100vw);padding:0;border:0;background:#fff;color:#1c2724;z-index:61;display:flex;flex-direction:column;box-shadow:-8px 0 28px rgba(0,0,0,.18);transform:translateX(100%);transition:transform .2s ease;visibility:hidden}
#spDrawer.open{transform:none;visibility:visible}
.sp-head{display:flex;justify-content:space-between;gap:12px;padding:16px 18px 12px;border-bottom:1px solid var(--line,#e3e8e5)}
.sp-head h2{margin:0 0 2px;font-size:19px}
.sp-head small{color:var(--muted,#667);font-size:12.5px;line-height:1.4;display:block}
.sp-body{flex:1;overflow:auto;padding:4px 18px 16px}
#spDrawer .sf-foot{border-top:1px solid var(--line,#e3e8e5);padding:10px 18px 14px;background:#fff}
#spDrawer input,#spDrawer select{color:#1c2724}
#spDrawer .sf-chip{background:#f1f3f2;color:#33413f;padding:3px 8px;border-radius:14px;font-size:12.5px}
#spDrawer .sf-chip.excl{background:#fdecea;color:#c0392b}
.sp-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0;font-size:13px}
.sp-row label{margin:0;font-weight:500}
.sp-row select,.sp-row .sf-input{padding:6px 8px;border:1px solid var(--line,#d5dcd8);border-radius:8px;font:inherit;background:#fff}
.sp-tpl select{flex:1;min-width:180px}
.sp-weights{margin:2px 0 6px}
.sp-w{display:grid;grid-template-columns:minmax(120px,1.1fr) 2fr 62px 52px;gap:8px;align-items:center;margin:5px 0;font-size:13.5px}
.sp-w input[type=range]{width:100%;margin:0;accent-color:var(--green,#167a5c)}
.sp-w .sp-num{width:62px;padding:5px 6px;border:1px solid var(--line,#d5dcd8);border-radius:7px;font:inherit}
.sp-pct{text-align:right;font-variant-numeric:tabular-nums}
.sp-bar{display:flex;height:9px;border-radius:5px;overflow:hidden;background:#eef1ef;margin:8px 0 2px}
.sp-bar i{display:block;height:100%}
.sp-warn{color:#8a6100;font-size:12.5px;margin:4px 0 0;min-height:0}
.sp-warn:empty{display:none}
.sp-help{font-size:12.5px;margin:6px 0}
.sp-sub{margin:10px 0;border:1px solid var(--line,#e3e8e5);border-radius:10px;padding:8px 12px}
.sp-sub>summary{cursor:pointer;font-weight:600;font-size:13.5px}
.sp-sub h4{margin:12px 0 4px;font-size:12.5px;color:var(--muted,#667);text-transform:uppercase;letter-spacing:.05em}
.sp-group{margin:10px 0 12px}
.sp-term{gap:4px}
.sp-term .sp-lv{border:0;background:transparent;font:inherit;font-size:11.5px;color:inherit;padding:0 2px;cursor:pointer}
.sp-term.lv-must{background:#167a5c!important;color:#fff!important}
.sp-term.lv-important{background:#dff1ea!important;color:#0f6b4d!important;font-weight:600}
.sp-crit{border:1px dashed var(--line,#d5dcd8);border-radius:10px;padding:6px 10px;margin:8px 0}
.sp-crit .sp-row .sf-input:first-child{flex:1;min-width:140px}
.sp-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 14px}
.sp-adv{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13px;margin:0;font-weight:400}
.sp-adv .sf-input.sm{flex:0 0 72px;min-width:0;padding:5px 6px;border:1px solid var(--line,#d5dcd8);border-radius:7px}
.sf-input.sm{width:72px;flex:0 0 72px}
.sp-preview p{margin:4px 0}
.sp-moves{display:grid;grid-template-columns:1fr 1fr;gap:10px;font-size:12.5px}
.sp-moves ul,.sp-top{margin:4px 0;padding-left:18px}
.sp-suggest{font-size:13px}
.sp-suggest p{margin:6px 0}
.pos{color:#167a5c}
.sp-terms{width:100%;border-collapse:collapse;font-size:12.5px;margin:8px 0}
.sp-terms th,.sp-terms td{text-align:left;padding:4px 6px;border-bottom:1px solid var(--line,#e3e8e5)}
.sp-terms th{font-weight:600;color:var(--muted,#667)}
@media (max-width:560px){.sp-w{grid-template-columns:1fr 62px 48px}.sp-w input[type=range]{grid-column:1/-1;order:3}.sp-grid,.sp-moves{grid-template-columns:1fr}.sp-head,.sp-body{padding-left:14px;padding-right:14px}}
@media (prefers-reduced-motion:reduce){#spDrawer,#spOverlay{transition:none}}
#spDrawer .sp-term .sp-lv{width:auto;min-width:0;max-width:120px;flex:none;margin:0;height:auto;padding:0 2px;border:0;box-shadow:none}
#spDrawer .sp-term>span{white-space:nowrap}
#spDrawer .sf-radios input,#spDrawer input[type=checkbox]{width:auto;margin:0;flex:none}
#spDrawer .sf-radios label{margin:0;font-weight:500;display:inline-flex;align-items:center;gap:6px}

/* mục gập */
.sp-acc{margin:10px 0;border:1px solid var(--line,#e3e8e5);border-radius:12px;background:#fff}
.sp-acc>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;cursor:pointer;list-style:none;padding:11px 14px;font-weight:600;font-size:14px}
.sp-acc>summary::-webkit-details-marker{display:none}
.sp-acc>summary::after{content:"▾";margin-left:auto;color:var(--muted,#667);transition:transform .15s}
.sp-acc:not([open])>summary::after{transform:rotate(-90deg)}
.sp-acc>summary small{font-weight:400;font-size:12.5px;order:2}
.sp-acc>summary span{order:1}
.sp-acc>summary::after{order:3}
.sp-acc[open]>summary{border-bottom:1px solid var(--line,#eef1ef)}
.sp-acc-body{padding:6px 14px 12px}
.sp-acc-body>.sp-group:first-child,.sp-acc-body>.sp-weights:first-child{margin-top:8px}

.sp-more{margin:10px 0 0;border:1px dashed var(--line,#d5dcd8);border-radius:10px;padding:2px 12px}
.sp-more>summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--muted,#667);padding:7px 0}
.sp-more[open]>summary{border-bottom:1px solid var(--line,#eef1ef);margin-bottom:6px}
.sp-more .sp-help{margin:6px 0}
.sp-more .linkbtn{margin:2px 0 8px}

.sp-guide{display:inline-block;margin-top:4px;font-size:12.5px;font-weight:600;color:var(--green,#0f7a55);text-decoration:none}
.sp-guide:hover{text-decoration:underline}
