/* 列表页（全部技能 resources.html、教程 tutorials.html）共用的几样：左侧筛选栏、收起后的竖条、已选条件一排。11-07 B「派派一家」，
   从样稿 site/resources.css 的 .res-fl / .res-g / .res-rail / .res-on 搬来，改成 .list- 前缀（两页同一个样子，样稿里教程页那套 .tut-fl 是同一个意思）。
   模板在 templates/pp/_lp.html 的「B 写法」那一段（list_side、list_group、list_opt、list_on），收起 / 展开在 pp/js/lp.js。
   标「→ site.css」的是别的列表页也用得上的，交付时请主会话收进 site.css。 */

/* ---------- 左栏 + 结果两栏（每页自己定 --side-w；收起后左栏只剩 56 宽的竖条） ---------- */
.list-body { display: grid; grid-template-columns: var(--side-w, 280px) minmax(0, 1fr); gap: var(--grid-gap); align-items: start; }
.list-body.is-folded { grid-template-columns: 56px minmax(0, 1fr); }
.list-main { min-width: 0; }

/* ---------- 左栏筛选（吸顶；比窗口高时栏里自己滚） → site.css「.side-filter」 ---------- */
.list-side { position: sticky; top: var(--space-md); display: flex; max-height: calc(100vh - 2 * var(--space-md)); }
.list-fl { width: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
  padding: 0 var(--space-md) var(--space-sm); background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--sh); container-type: inline-size; }
.list-fl__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: var(--space-sm); height: 56px; margin: 0 calc(-1 * var(--space-md));
  padding: 0 var(--space-sm) 0 var(--space-md); background: var(--paper); border-bottom: 1px solid var(--line); }
.list-fl__title { display: flex; align-items: center; gap: var(--space-sm); font: var(--display-w) var(--fs-lg)/1 var(--display); -webkit-text-stroke: var(--display-stroke) currentColor; }
.list-fl__title svg { width: 18px; height: 18px; color: var(--ink-2); -webkit-text-stroke: 0; }
.list-fl__clear { display: inline-flex; align-items: center; min-height: 32px; margin-left: auto; padding: 0 6px; font-size: var(--fs-sm); color: var(--link); }
@media (hover: hover) { .list-fl__clear:hover { text-decoration: underline; text-underline-offset: 3px; } }
.list-fl__fold { flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-2); transition: background-color .2s, color .2s; }
.list-fl__clear:not([hidden]) + .list-fl__fold { margin-left: 0; }
@media (hover: hover) { .list-fl__fold:hover { background: var(--sunk); color: var(--ink); } }
.list-fl__fold svg { width: 18px; height: 18px; }
html:not(.js) .list-fl__fold { display: none; }            /* 不开 JS：收不起来，按钮不出来 */
.list-side [hidden] { display: none !important; }

/* 一组：<details> 可折叠；标题后面跟着当前选了什么（蓝字小字） */
.list-g { padding-bottom: var(--space-ms); }
.list-g + .list-g { border-top: 1px solid var(--line); }
.list-g > summary { display: flex; align-items: center; height: 44px; list-style: none; cursor: pointer; }
.list-g > summary::-webkit-details-marker { display: none; }
.list-g__t { flex: 1; font-size: var(--fs-sm); font-weight: 600; }
.list-g__t small { margin-left: 2px; font-size: var(--fs-xs); font-weight: 400; color: var(--link); }
.list-g__chev { width: 16px; height: 16px; color: var(--ink-3); transition: transform .2s var(--ease); }
.list-g:not([open]) .list-g__chev { transform: rotate(-90deg); }
.list-g:not([open]) { padding-bottom: 0; }
.list-g__tip { margin: -6px 0 6px; font-size: var(--fs-xs); color: var(--ink-3); }
/* 选项：一列，或两列（适合谁、难度）；「适合谁」11-07 站长：不要陶土头像，两列文字选项，名字不折行，栏窄了退成一列 */
.list-opts { display: grid; gap: 2px; }
.list-opts--2 { grid-template-columns: 1fr 1fr; }
.list-opts .filter__opt { min-height: 34px; padding: 0 10px; }
.list-opts .filter__opt > span:not(.chip__n) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-opts .chip__n { font-size: var(--fs-xs); }
.list-opts--2 .filter__opt { padding: 0 8px; }
@container (max-width: 210px) { .list-opts--2 { grid-template-columns: 1fr; } }
.filter__opt[aria-current] .chip__n, .filter__opt.is-on .chip__n { color: var(--link); }
.list-oi { flex: none; width: 16px; height: 16px; color: var(--ink-3); }
.filter__opt[aria-current] .list-oi { color: var(--link); }
/* 「全部 / 不限」选中时灰底黑字（不用蓝）：没筛的时候页面安静，蓝色只留给真正选了的条件 */
.filter__opt[aria-current][data-v=""] { background: var(--sunk); color: var(--ink); }
.filter__opt[aria-current][data-v=""] .chip__n { color: var(--ink-2); font-weight: 400; }   /* 灰底上用灰一（灰二在浅灰蓝底上不到 4.5:1） */
/* 0 个、点不了：淡掉（读屏念「不可用」） */
.filter__opt.is-off { opacity: .42; cursor: default; }
@media (hover: hover) { .filter__opt.is-off:hover { background: none; color: var(--ink-2); } }
/* 多选（用哪个 AI）：前面一个方框，选中打勾；字不变蓝（选了好几个时一排蓝太吵），只看方框 */
.list-ck__box { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px var(--line-2); background: var(--paper); transition: background-color .15s, box-shadow .15s; }
.list-ck__box svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.is-on > .list-ck__box { background: var(--btn); box-shadow: none; }
.is-on > .list-ck__box svg { opacity: 1; }
.filter__opt.list-ck.is-on { background: none; color: var(--ink); font-weight: 400; }
.filter__opt.list-ck.is-on .chip__n { color: var(--ink-3); }
@media (hover: hover) { .filter__opt.list-ck.is-on:hover { background: var(--sunk); } }
/* 「其余 12 个」：后面那些收在一个 <details> 里 */
.list-more > summary { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: 2px 0 0 6px; list-style: none; cursor: pointer; font-size: var(--fs-sm); color: var(--link); }
.list-more > summary::-webkit-details-marker { display: none; }
.list-more > summary svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.list-more[open] > summary svg { transform: rotate(180deg); }
.list-more[open] { display: flex; flex-direction: column; }
.list-more[open] > summary { order: 2; }
.list-more__c, .list-more[open] .list-more__o { display: none; }
.list-more[open] .list-more__c { display: inline; }

/* 收起后的竖条：筛选图标、竖排「筛选」、已选几个、展开箭头 */
.list-rail { position: relative; display: none; flex-direction: column; align-items: center; gap: var(--space-ms); width: 56px; padding: var(--space-md) 0; border: 0; border-radius: var(--r-lg);
  background: var(--paper); box-shadow: var(--sh); color: var(--ink-2); transition: color .2s, box-shadow .2s; }
@media (hover: hover) { .list-rail:hover { color: var(--link); box-shadow: var(--sh-lg); } }
.list-rail svg { width: 18px; height: 18px; }
.list-rail__t { writing-mode: vertical-rl; letter-spacing: .3em; font: var(--display-w) var(--fs-md)/1 var(--display); -webkit-text-stroke: var(--display-stroke) currentColor; color: var(--ink); }
.list-body.is-folded .list-fl { display: none; }
.list-body.is-folded .list-rail { display: flex; }
/* 已选个数的小圆标（竖条上、手机「筛选」按钮上） */
.list-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--btn); color: #fff;
  font: 600 var(--fs-xs)/1 var(--sans); font-variant-numeric: tabular-nums; }
.list-badge[hidden] { display: none; }

/* ---------- 已选条件：每个一块「类型：技能 ×」，点哪块去掉哪个；最后「清空」 → site.css「.chips-on」 ---------- */
.list-on { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.list-on[hidden] { display: none; }
.list-on__label { font-size: var(--fs-sm); color: var(--ink-3); margin-right: 2px; }
.list-on__x { display: inline-flex; align-items: center; gap: 2px; height: 30px; padding: 0 8px 0 12px; border-radius: var(--r-pill); background: var(--blue-bg);
  box-shadow: inset 0 0 0 1px var(--blue-line); font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; transition: box-shadow .2s, background-color .2s; }
.list-on__x span { color: var(--ink-2); }
.list-on__x b { font-weight: 600; color: var(--link); }
.list-on__x svg { width: 14px; height: 14px; margin-left: 4px; color: var(--ink-3); }
@media (hover: hover) { .list-on__x:hover { background: #D6EBFF; box-shadow: inset 0 0 0 1px var(--blue); } .list-on__x:hover svg { color: var(--link); } }
.list-on__clear { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; margin-left: 4px; font-size: var(--fs-sm); color: var(--link); }
.list-on__clear svg { width: 15px; height: 15px; }
@media (hover: hover) { .list-on__clear:hover { text-decoration: underline; text-underline-offset: 3px; } }

/* 面包屑里的链接补到 24 高（site.css 里是行内元素，点击区只有 19 高） */
.list-crumbs a { display: inline-flex; align-items: center; min-height: 24px; }

@media (pointer: coarse) {
  .list-on__x, .list-on__clear { min-height: 36px; }
  .list-opts .filter__opt { min-height: 40px; }
}
