/* ---------- 线路 ---------- */
.links { margin-top: 28px; }
.links-head { display: flex; align-items: center; gap: 12px; margin: 0 4px 10px; }
.links-head h2 { margin-right: auto; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 600px) {
  .links { margin-top: 18px; }
  .links-head { margin-bottom: 8px; }
}
.text-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; margin: -5px -8px; border-radius: 8px;
  font-size: 13px; color: var(--muted); transition: color .2s, background .2s;
}
.text-btn .ic { width: 14px; height: 14px; }
.text-btn:hover { color: var(--ink); background: rgba(17, 17, 19, .04); }
.text-btn:disabled { opacity: .55; cursor: default; }
.text-btn.spinning .ic { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.tag { flex: none; padding: 2px 6px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--ink-2); background: var(--surface-2); }
.tag-fast { color: #15803d; background: #dcfce7; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

.lat { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.lat[data-level="idle"] { display: none; }
.lat[data-level="testing"] .lat-dot { animation: breathe 1.2s ease-in-out infinite; }
.lat[data-level="good"] .lat-dot { background: var(--good); }
.lat[data-level="ok"] .lat-dot { background: var(--ok); }
.lat[data-level="slow"] .lat-dot { background: var(--slow); }
.lat[data-level="bad"] .lat-dot { background: var(--bad); }
.lat[data-level="bad"] { color: var(--bad); }

/* 主推线路：黑色主按钮 */
.cta {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 18px;
  border-radius: var(--radius); color: #fff; background: linear-gradient(180deg, #26262a, #0e0e10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 1px 2px rgba(0, 0, 0, .2), 0 16px 32px -14px rgba(17, 17, 19, .55);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .12) 50%, transparent 65%);
}
@media (hover: hover) {
  .cta:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 2px 4px rgba(0, 0, 0, .2), 0 24px 40px -16px rgba(17, 17, 19, .6); }
  .cta:hover::after { transform: translateX(120%); transition: transform .9s var(--ease); }
  .cta:hover .cta-go { transform: translateX(2px); }
}
.cta:active { transform: scale(.99); }
.cta-ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.cta-ico .ic { width: 20px; height: 20px; }
.cta-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cta-title { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; font-size: 16px; font-weight: 600; }
.cta-title > span:first-child { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta .tag { color: #fff; background: rgba(255, 255, 255, .14); }
.cta .tag-fast { color: #052e16; background: #86efac; }
.cta-desc { font-size: 13px; color: rgba(255, 255, 255, .58); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta .lat { color: rgba(255, 255, 255, .65); }
.cta .lat[data-level="bad"] { color: #fca5a5; }
.cta-go { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: #fff; transition: transform .35s var(--ease); }
.cta-go .ic { width: 16px; height: 16px; }
.meta-copy { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--muted); transition: color .2s, background .2s; }
.meta-copy .ic { width: 13px; height: 13px; }

/* 其他线路：分组列表 */
.list {
  margin-top: 18px; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.list:empty { display: none; }
.row { display: flex; align-items: center; }
.row + .row { border-top: 1px solid var(--line); }
.row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 6px 14px 16px; transition: background .2s; }
.row-link:focus-visible { outline-offset: -2px; border-radius: 12px; }
.row-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--ink); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.row-ico .ic { width: 18px; height: 18px; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
/* 位置不够时角标换到下一行，优先把名称显示完整 */
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; min-width: 0; }
.row-name { max-width: 100%; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-chev { flex: none; display: inline-flex; color: var(--faint); transition: transform .3s var(--ease), color .3s; }
.row-chev .ic { width: 16px; height: 16px; }
.row-copy { flex: none; width: 36px; height: 36px; margin-right: 8px; display: grid; place-items: center; border-radius: 10px; color: var(--faint); transition: color .2s, background .2s; }
.row-copy .ic { width: 16px; height: 16px; }
.row-copy:focus-visible { outline-offset: -2px; }
.row-copy.done, .meta-copy.done { color: var(--good); }
@media (hover: hover) {
  .row:hover .row-link { background: #fafaf8; }
  .row:hover .row-ico { transform: scale(1.06); }
  .row:hover .row-chev { color: var(--ink); transform: translateX(2px); }
  .row-copy:hover, .meta-copy:hover { color: var(--ink); background: var(--surface-2); }
}
.empty { padding: 28px 16px; text-align: center; font-size: 13px; color: var(--muted); }

/* 放在文件末尾才能覆盖上面的基础样式。小屏手机：收紧卡片内边距和间隙，让名称和角标排得下一行 */
@media (max-width: 420px) {
  .cta { gap: 10px; padding: 14px 12px 14px 14px; }
  .cta-ico { width: 38px; height: 38px; border-radius: 11px; }
  .cta-go { width: 30px; height: 30px; }
  .row-link { gap: 10px; padding: 13px 4px 13px 12px; }
  .row-ico { width: 34px; height: 34px; }
  .row-copy { width: 32px; height: 32px; margin-right: 4px; }
  .row-chev { display: none; }
  .tag { padding: 2px 5px; font-size: 10.5px; }
  .lat { gap: 4px; font-size: 12px; }
  .cta-title { font-size: 15px; }
  .row-name { font-size: 14.5px; }
}
