/* detail.css — 详情页评论与图形验证码、发布清单、/help、404、窄屏兜底与点按目标
 *
 * 拆分自 2026-11-19 的单文件 style.css（1439–2258 行），**顺序即层叠顺序**：
 * base → labs → components → workbench → detail。base.html 按这个顺序加载，
 * 不要调换、不要把一个文件的规则挪到另一个文件里——这个项目吃过「后写的同权重
 * 规则盖掉前面的组件样式」三次亏（.onboard / .facets / .detail-side）。
 */
/* ---------------- 评论（详情页底部） ---------------- */
.comments {
  max-width: 1080px; margin: 2.6rem auto 0; padding: 1.9rem 1.2rem 0;
  border-top: 1px solid var(--line);
}
.comments-head h2 { font-size: 1.05rem; margin: 0 0 .3rem; display: flex; align-items: center; gap: .5rem; }
.comments-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.4rem; height: 1.4rem; padding: 0 .4rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 500;
}
.comments-head .meta { margin: 0 0 .9rem; }
.comments-flash {
  margin: 0 0 .9rem; padding: .6rem .8rem; border-radius: 10px; font-size: 13px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.comments-flash.is-ok { border-color: var(--ok-soft); background: var(--ok-soft); color: var(--ok); }
.comments-flash.is-err { border-color: var(--danger-soft); background: var(--danger-soft); color: var(--danger); }

.comments-form { display: grid; gap: .7rem; margin-bottom: 1.4rem; }
.comment-identity { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 13px; color: var(--muted); }
.comment-identity { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: 13px; color: var(--muted); }
.comments-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.comment-field { display: grid; gap: .35rem; font-size: 13px; color: var(--muted); }
.comment-field input, .comment-field textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 9px;
  background: var(--card); color: var(--ink); font-size: 14px; font-family: inherit;
}
.comment-field input:focus, .comment-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.comment-field textarea { resize: vertical; min-height: 96px; }
.comments-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }

.comments-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.comment-item { display: flex; gap: .7rem; }
.comment-avatar {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px;
}
.comment-body p { margin: .25rem 0 0; white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.comment-meta { display: flex; align-items: baseline; gap: .5rem; }
.comment-meta time { color: var(--muted); font-size: 12px; }
.comments-empty { color: var(--muted); font-size: 13px; }

/* 图形滑块弹层 */
body.is-modal { overflow: hidden; }
.captcha-modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(24, 28, 34, .35); padding: 1rem;
}
/* 关键：给了 display:flex 就会盖掉 hidden 属性自带的 display:none，
   弹层会一进页面就挂在屏幕上（2026-11-18 线上就是这么炸的） */
.captcha-modal[hidden] { display: none; }
.captcha-card {
  width: min(92vw, 380px); background: var(--card); border-radius: 14px; padding: 1rem 1.1rem 1.1rem;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.captcha-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.captcha-head h3 { margin: 0; font-size: 1rem; }
.captcha-x { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.captcha-stage { position: relative; width: 100%; height: 160px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.captcha-stage img { display: block; user-select: none; -webkit-user-drag: none; }
#captcha-bg { width: 100%; height: 160px; object-fit: cover; }
#captcha-piece { position: absolute; left: 0; top: 20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.captcha-slider { position: relative; height: 38px; margin-top: .7rem; }
.captcha-track {
  position: absolute; left: 0; right: 44px; top: 8px; height: 22px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
}
.captcha-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-soft); }
.captcha-handle {
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--card); color: var(--accent);
  font-size: 18px; cursor: grab; touch-action: none;
}
.captcha-handle:active { cursor: grabbing; }
.captcha-hint { margin: .5rem 0 0; font-size: 12.5px; color: var(--muted); }
.captcha-hint.is-ok { color: var(--ok); }
.captcha-hint.is-err { color: var(--danger); }
.captcha-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .8rem; }
.btn-text { border: 0; background: transparent; color: var(--accent); font-size: 13px; cursor: pointer; }

@media (max-width: 640px) {
  .comments-row { grid-template-columns: 1fr; }
  .comments-actions { flex-direction: column; align-items: stretch; }
}

/* 登录状态页：最近来访 IP 列表（只读、内存数据） */
.visitor-list { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.visitor-list li { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13px; }
.visitor-list code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }

/* 账号页「在线」列：绿点=在线，灰点=最近一次活动在多久以前 */
.presence { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.presence-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-soft); flex: none; }
.presence.is-online { color: var(--ok); }
.presence.is-online .presence-dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }

.status-pill.is-archived { background: var(--warn-soft); color: var(--warn); }

/* 三段进度条：缺口一眼可见，不用读「1/3 缺 信息卡、物理图」 */
.progress { display: inline-flex; align-items: center; gap: 8px; }
.progress-track { display: inline-flex; gap: 3px; }
.progress-track i { display: block; width: 14px; height: 4px; border-radius: 2px; background: var(--line); }
.progress-track i.is-on { background: var(--accent); }
.progress span:last-child { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- 操作列：一个主操作 + ⋯ 菜单（details，零 JS） ---- */
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.row-actions .primary { font-size: 12.5px; font-weight: 600; color: var(--accent); text-decoration: none; }
.row-actions .primary:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-more { position: relative; }
.row-more > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--card); color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
}
.row-more > summary::-webkit-details-marker { display: none; }
.row-more > summary:hover { border-color: var(--line-hover); color: var(--ink); }
.row-more[open] > summary { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.row-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 134px; padding: 6px; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg);
}
.row-more-menu a { display: block; padding: 5px 9px; border-radius: 5px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; }
.row-more-menu a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }

/* ---- 发布页两栏 ---- */
.pub-shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.pub-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pub-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; }

.pub-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.pub-card > h3 { margin: 0 0 .45rem; font-size: 11.5px; font-weight: 600; color: var(--muted-soft); }
.pub-card.is-danger { border-color: var(--danger-line); }
.pub-card.is-danger > h3 { color: var(--danger); }

.fact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 0; font-size: 12.5px;
}
.fact-row > span:first-child { color: var(--muted); flex: none; }
.fact-row > span:last-child { color: var(--ink); font-weight: 600; text-align: right; word-break: break-word; }
.fact-row form { margin: 0; }

.step-foot { justify-content: flex-end; }
.step-hint { margin-right: auto; font-size: 12.5px; color: var(--muted); }

/* 开关：用 submit 按钮实现，点击即提交，不需要 JS */
.switch {
  position: relative; width: 34px; height: 20px; flex: none; padding: 0;
  border: 0; border-radius: 999px; background: var(--line-strong);
  cursor: pointer; transition: background .15s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--card);
  transition: transform .15s ease;
}
.switch.is-on { background: var(--accent); }
.switch.is-on::after { transform: translateX(14px); }
.switch:hover { filter: brightness(.96); }

.btn-block { display: flex; width: 100%; justify-content: center; }
.pub-card form + form, .pub-card form + .btn-block, .pub-card .btn-block + .btn-block { margin-top: 8px; }

.btn-mini { padding: .12rem .5rem; font-size: 12px; border-radius: 5px; }

.feature-review { display: inline-flex; gap: 6px; }
.feature-apply { margin-top: .5rem; }
.feature-apply > summary { font-size: 12.5px; color: var(--accent); cursor: pointer; }
.feature-apply form { margin-top: .55rem; }
.feature-apply .secondary { margin-top: .5rem; }

/* ---- 解析结果：摘要条常驻 + 明细折叠 ---- */
.parse-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.parse-card > summary { list-style: none; cursor: pointer; }
.parse-card > summary::-webkit-details-marker { display: none; }
.parse-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 16px; font-size: 12.5px; color: var(--ink-2); }
.parse-strip strong { color: var(--muted); font-size: 12px; font-weight: 600; }
.parse-sum { flex: 1 1 auto; min-width: 0; }
.parse-more { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.parse-body { padding: 0 16px 14px; }
.parse-body table.kv { margin-top: .3rem; }

/* ---- 窄屏：侧栏横过来变成 chip 行 ---- */
@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 1fr; gap: 10px; }
  .admin-side {
    position: static; flex-direction: row; flex-wrap: wrap; gap: 6px;
    padding: 0 0 .7rem; border-bottom: 1px solid var(--line);
  }
  .admin-side-group { display: none; }
  .admin-side-item { height: 30px; border: 1px solid var(--line); }
  .pub-shell { grid-template-columns: 1fr; gap: 16px; }
  .pub-side { position: static; }
  .labtable { table-layout: auto; }
  .col-hide-sm { display: none; }
  /* <col> 不支持 display:none：只隐藏 th/td 时列宽仍然占位，390 下整张表溢出。
     窄屏把 colgroup 的固定宽度全部作废，交给 auto 布局。 */
  .labtable col { width: auto !important; }
}

/* 窄屏（≤640px）：表格只剩 实验 / 状态 / 操作，徽标与操作列不许逐字断行 */
@media (max-width: 640px) {
  .col-hide-xs { display: none; }
  /* 表格切到 auto 布局后，标题列的最小内容宽度会把整张表顶出视口（390 下 407px）。
     窄屏允许标题折行，表格才能压到容器宽度以内。 */
  .labtable .t-title a, .labtable .t-title > span { white-space: normal; overflow-wrap: anywhere; }
  .labtable .t-slug { white-space: normal; }
  .labtable .status-pill { white-space: nowrap; }
  .labtable .row-actions { gap: 8px; }
  .labtable .row-actions .primary { white-space: nowrap; }
  .labtable th { font-size: 11px; }
}

/* ---- 对齐设计稿（2026-11-17 第二轮）：计数 chip / 排序 / 面包屑 / 灰字状态 / 红色归档 ---- */
.admin-chip .chip-count { margin-left: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-chip.is-active .chip-count { color: var(--accent); }
.admin-sort { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.admin-sort select { height: 32px; font-size: 12.5px; padding: 0 8px; }

.crumb { margin: 0 0 .55rem; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb-sep { color: var(--line-strong); }

.title-status { font-size: 12.5px; font-weight: 500; color: var(--muted); }

button.btn-block.is-danger, a.btn-block.is-danger {
  border-color: var(--danger-line); color: var(--danger);
}
button.btn-block.is-danger:hover, a.btn-block.is-danger:hover {
  border-color: var(--danger); color: var(--danger); background: var(--danger-soft);
}

/* ---- 对齐设计稿（2026-11-17 第二轮）：计数 chip / 排序 / 面包屑 / 灰字状态 / 红色归档 ---- */
.admin-chip .chip-count { margin-left: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-chip.is-active .chip-count { color: var(--accent); }
.admin-sort { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.admin-sort select { height: 32px; font-size: 12.5px; padding: 0 8px; }

.crumb { margin: 0 0 .55rem; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb-sep { color: var(--line-strong); }

.title-status { font-size: 12.5px; font-weight: 500; color: var(--muted); }

button.btn-block.is-danger, a.btn-block.is-danger {
  border-color: var(--danger-line); color: var(--danger);
}
button.btn-block.is-danger:hover, a.btn-block.is-danger:hover {
  border-color: var(--danger); color: var(--danger); background: var(--danger-soft);
}
.labtable .t-devices { white-space: nowrap; }

/* 步骤序号：设计稿是细描边圆圈（完成=绿实心勾），不是灰底胶囊 */
.step-mark { background: transparent; border: 1.5px solid var(--line-strong); color: var(--muted); }
.step.is-done .step-mark { background: var(--ok); border-color: var(--ok); color: var(--ink-invert); }
.labtable .t-devices { white-space: nowrap; }

/* 步骤序号：设计稿是细描边圆圈（完成=绿实心勾），不是灰底胶囊 */
.step-mark { background: transparent; border: 1.5px solid var(--line-strong); color: var(--muted); }
.step.is-done .step-mark { background: var(--ok); border-color: var(--ok); color: var(--ink-invert); }

/* ---- 第二批：审计 / 会话两页（2026-11-17）---- */
.labtable.is-compact td { height: 56px; }
.labtable.is-medium td { height: 64px; }
.labtable code { font-size: 12px; }
.t-ellipsis, .labtable td.t-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-clamp span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 自适应列数：登录状态页有 4 张指标卡，别让第 4 张单独掉到第二行 */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
}
.metric span { font-size: 12px; color: var(--muted); }
.metric strong { font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .metric-grid { grid-template-columns: 1fr; }
}

/* ---- 发布后 5 秒可撤销（问题清单 08）---- */
.undo-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--ink); font-size: 13px; position: relative; overflow: hidden;
}
.undo-bar[hidden] { display: none; }
.undo-bar .undo-text { flex: 1 1 auto; }
.undo-bar button { flex: none; }
.undo-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: transparent; }
.undo-timer i { display: block; height: 100%; width: 0; background: var(--accent); }
.undo-bar.is-on .undo-timer i { animation: undo-countdown 5s linear forwards; }
@keyframes undo-countdown { from { width: 100%; } to { width: 0; } }

/* 后台页脚：放「使用说明」这类不占侧栏的入口 */
.admin-foot { margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.admin-foot a { color: var(--muted); text-decoration: none; }
.admin-foot a:hover { color: var(--accent); }
.admin-foot-dim { color: var(--muted-soft); }

/* 账号页「新建账号」行内字段 */
.field-inline { display: inline-flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.field-inline input, .field-inline select { height: 34px; font-size: 13px; }

/* ⋯ 菜单空间不够时向上展开（脚本按视口剩余高度决定加不加 is-up） */
.row-more.is-up .row-more-menu { top: auto; bottom: calc(100% + 6px); }

/* ---- 前台列表页对齐设计稿（2026-11-17 第三轮）---- */

/* 卡片左上角的「置顶」旗标（设计稿用黄底小块，不再用标题前的 📌） */
.lab-card { position: relative; }
.lab-card-flag {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  padding: 1px 8px; border-radius: 6px;
  background: var(--warn-soft); color: var(--warn-strong);
  border: 1px solid var(--warn-line); font-size: 11.5px; font-weight: 600;
}

/* 标题下面那行：官方/社区 · 作者 + 场景 */
.lab-card-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: 0; font-size: 12px; color: var(--muted); }
.lab-card-meta .tag { white-space: nowrap; }
.lab-card-scene { color: var(--muted-soft); }

/* 指标改成三格：设备 / 资源 / 许可，值不再居中堆成四小块 */
.lab-card-stats { grid-template-columns: 1.1fr 1.6fr 1fr; gap: .4rem; }
.lab-card-stats div { text-align: left; }
.lab-card-stats dt { margin-bottom: 1px; }
.lab-card-stats dd { font-size: 13px; font-weight: 600; white-space: nowrap; }
.lab-card-stats dd.tier-freemium { color: var(--ok); }
.lab-card-stats dd.tier-base { color: var(--warn); }

/* 底部：点赞在左、下载数靠右、蓝色下载按钮最右 */
.lab-card-foot { display: flex; align-items: center; gap: .55rem; }
.lab-card-foot .lab-card-dl { margin-left: auto; }
/* 生效的是这一条（detail.css 最后加载）；labs.css 里不要再写一份 */
.lab-card-foot .btn.cta { margin-left: auto; flex: 0 0 auto; white-space: nowrap; }

/* ---- 前台详情页对齐设计稿（2026-11-17 第三轮）---- */
.detail-head { margin: 0 0 1rem; }
/* 三级信息的垂直节奏：标题 → 身份行 8px、身份行 → 版本行 6px（原来 7px / 3px，第二三行贴在一起） */
.detail-head h1 { margin: 0 0 8px; }
.detail-meta { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: 0; font-size: 13px; color: var(--muted); }
.detail-meta a { color: var(--muted); }
.detail-meta .tag { white-space: nowrap; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }

.section-title { font-size: 1rem; margin: 0 0 .5rem; }
.section-lead { margin: 0 0 1rem; color: var(--ink-2); font-size: 14px; line-height: 1.7; }


/* 窄屏：右栏取消吸顶、信息卡改单列。这里原来丢了 @media 头，
   两条规则变成全局生效——详情页右栏不吸顶、信息卡全被压成单列（2026-11-19 修） */
@media (max-width: 900px) {
  .detail-side { position: static; }
  .fact-line { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- 前台详情页对齐设计稿（2026-11-17 第三轮）---- */
.detail-head { margin: 0 0 1rem; }
.detail-head h1 { margin: 0 0 .45rem; }
.detail-meta { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; margin: 0; font-size: 13px; color: var(--muted); }
.detail-meta a { color: var(--muted); }
.detail-meta .tag { white-space: nowrap; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 12px; }

.section-title { font-size: 1rem; margin: 0 0 .5rem; }
.section-lead { margin: 0 0 1rem; color: var(--ink-2); font-size: 14px; line-height: 1.7; }

/* 信息卡的四行事实卡：左标签右值，浅底整块 */
.fact-list { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; }
.fact-line { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--surface-2); }
.fact-line:last-child { border-bottom: 0; }
.fact-key { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.fact-val { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; color: var(--ink-2); }

/* 右栏快速事实 */
.fact-panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.fact-panel h3 { margin: 0 0 .55rem; font-size: 11.5px; font-weight: 600; color: var(--muted-soft); }
.fact-table { margin: 0; }
.fact-table > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 5px 0; }
.fact-table dt { color: var(--muted); font-size: 12.5px; }
.fact-table dd { margin: 0; font-weight: 650; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fact-table dd.tier-base { color: var(--warn); }
.fact-table dd.tier-freemium { color: var(--ok); }

/* 右栏说明文字：11.5px + muted-soft 在浅底上几乎看不见（2026-11-19 反馈），
   提到 12.5px / --muted，行高放宽一点 */
.side-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--muted); text-align: center; }
.side-social { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 2px; }

/* ---- 复制实验链接（2026-11-17）---- */
/* 右栏动作组里的次级按钮：主按钮是「下载原始导出包」，它不抢戏 */
.copy-lab { display: flex; flex-direction: column; gap: 6px; }
.copy-lab-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.copy-ico { width: 14px; height: 14px; flex: 0 0 auto; }
/* 复制成功：按钮临时转绿，1.5 秒后 JS 摘掉 is-done */
.copy-lab-btn.is-done { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.copy-lab-btn.is-done:hover { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
/* 成功显示对勾、平时显示复制图标；失败转成警示色，别用「成功」的绿 */
.copy-ico-check { display: none; }
.copy-lab-btn.is-done .copy-ico { display: none; }
.copy-lab-btn.is-done .copy-ico-check { display: inline-block; }
.copy-lab-btn.is-warn { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
.copy-lab-btn.is-warn:hover { border-color: var(--warn-line); background: var(--warn-soft); color: var(--warn); }
/* 兜底输入框：浏览器不给复制时才展开，平时 hidden */
.copy-lab-fallback { width: 100%; padding: 5px 8px; font-size: 12px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 6px; }

/* 窄屏的图标按钮：右栏在 980px 就开始堆到内容下方，所以这里也一起出现 */
.copy-lab-mini { display: none; }
@media (max-width: 980px) {
  .detail-head { position: relative; padding-right: 46px; }
  .copy-lab-mini { display: block; position: absolute; top: 0; right: 0; }
  .copy-lab-mini .copy-lab-btn { padding: 5px 9px; }
  .copy-lab-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; width: min(280px, 70vw); background: var(--card); }
}

@media (max-width: 980px) {
  .detail-grid { grid-template-columns: 1fr; gap: 16px; }
  .detail-side { position: static; }
  .fact-line { grid-template-columns: 1fr; gap: 4px; }
}

/* ---- 前台细节（2026-11-17 第四轮）---- */
/* 顶栏「上传实验」按钮：与 nav 文字同一行，但用按钮形态区分主操作 */
.topbar nav a.nav-cta {
  padding: 3px 12px; border: 1px solid var(--accent-line); border-radius: 7px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px;
}
.topbar nav a.nav-cta:hover { background: var(--accent); border-color: var(--accent); color: var(--ink-invert); }

/* 详情页「实验所需镜像」表：模板 / 镜像目录 / 节点数 */
.img-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 .5rem; }
.img-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 10px; background: var(--surface-2); }
.img-table td { padding: 8px 10px; border-bottom: 1px solid var(--surface-2); }
.img-table tr:last-child td { border-bottom: 0; }

/* 两栏布局下工作簿别再套 680 的行宽限制：左栏本身就只有 780 左右，
   再限宽会左右不对称，看起来跟信息卡两套排版（用户报的「割裂」） */
.detail-main .workbook-card { max-width: none; }
.detail-main .workbook { max-width: none; }
@media (max-width: 980px) {
  .detail-main .workbook-card,
  .detail-main .workbook-card.with-toc { grid-template-columns: 1fr; }
  .detail-main .workbook-card.with-toc > .workbook { grid-column: 1; }
  .detail-main .workbook-card .toc {
    position: static; max-height: none; overflow: visible;
    border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 10px;
  }
}
/* 目录回到左侧，并且滚动时钉住（sticky）：详情页宽版下左栏 1070，
   目录 190 + 正文 858，比铺满 1030 更好读 */
.detail-main .workbook-card,
.detail-main .workbook-card.with-toc { grid-template-columns: 190px minmax(0, 1fr); }
.detail-main .workbook-card .toc {
  position: sticky; top: 74px; align-self: start;
  max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain;
  border-right: 1px solid var(--line); padding: 0 14px 0 0; margin: 0;
}
.detail-main .workbook { max-width: none; }
.detail-main .workbook-card .toc li.toc-l2,
.detail-main .workbook-card .toc li.toc-l3 { padding-left: 0; }

/* 回收站的操作列：恢复 + 抄 slug + 彻底删除，窄屏允许换行，别把按钮裁掉 */
.labtable .row-actions { flex-wrap: wrap; row-gap: 6px; }
.purge-form { display: inline-flex; align-items: center; gap: 6px; }
.purge-form input { height: 30px; font-size: 12.5px; flex: none; width: 10rem; }
.slug-copy { cursor: pointer; user-select: all; }

/* 后台空状态：带标题 + 说明 + 出口，比一句灰字有用 */
.empty-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 40px 24px; text-align: center;
}
.empty-card strong { display: block; font-size: 15px; margin-bottom: 6px; }
.empty-card p { margin: 0 auto 14px; max-width: 34rem; color: var(--muted); font-size: 13px; line-height: 1.7; }

/* 列表里「缺一句话描述」的提示标：小、黄、不抢标题 */
.t-title .t-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.t-title .t-line > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.todo-dot {
  flex: none; font-size: 10.5px; line-height: 1.6; padding: 0 .35rem;
  color: var(--warn-strong); background: var(--warn-soft); border: 1px solid var(--warn-line);
  border-radius: 4px; cursor: help;
}

/* 信息卡页：保存栏吸底（页面一长就不用滚到底才能存） */
.form-foot-sticky {
  position: sticky; bottom: 12px; z-index: 3;
  background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(6px);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-top: 8px; box-shadow: var(--shadow-lg);
}
/* 吸底栏会盖住最后一块的底部，给表单留一点余量 */
form:has(.form-foot-sticky) { padding-bottom: 6px; }

/* ---- 配置面板浅色化后的层次修正（2026-11-17）----
   深色时靠"越深越靠后"分层，换浅色后这些层次会糊在一起，单独补几条：
   行号列与正文分开、代码区用卡片白、toast 用深底反白（浅站里更醒目）。 */
.cfg-code { background: var(--bg); }
.cfg-gutter {
  background: transparent; color: var(--muted-soft);
  border-right: 1px solid var(--line);
}
.cfg-text { font-size: 13px; }
.cfg-text { padding-left: 14px; }
.cfg-nodes input[type="search"] { background: var(--card); }
.cfg-toast {
  background: var(--ink); color: var(--ink-invert); border-color: var(--ink);
  box-shadow: var(--shadow-lg);
}

/* ---- IaC 面板左侧栏：与「配置」面板同密度（2026-11-17）----
   IaC 页用的是 .cfg-node-head / .cfg-stat，这两个类之前没定义，
   字号直接继承 body 的 15px，比配置面板的小标题大一圈。 */
.cfg-node-head {
  padding: 10px 12px 4px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--muted-soft); text-transform: uppercase;
}
.cfg-nodes ul { list-style: none; margin: 0 0 6px; padding: 0; }
.cfg-nodes .cfg-stat {
  padding: 5px 12px; font-size: 13px; color: var(--ink-2);
}
.cfg-nodes .cfg-stat strong { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
/* 节点多时左栏自己滚，别把整块面板顶长 */
.cfg-nodes { overflow: auto; }

/* ---- 配置 / IaC 面板：头部与工具条钉住，只有代码区滚（2026-11-17）----
   面板在 iframe 里（高度固定），原来整块跟着 body 滚，滚两屏就看不到
   「复制 / 下载」这些按钮。改成 flex 列 + 内部滚动，头部天然常驻。 */
.cfg-app { display: flex; flex-direction: column; }
.cfg-app.is-embed { height: 100vh; border-radius: 0; border: 0; }
.cfg-head, .cfg-sets { flex: none; }
.cfg-body { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.cfg-pane { min-height: 0; }
.cfg-nodes { min-height: 0; }
.cfg-code { min-height: 0; }

/* 独立页（非嵌入）没有固定高度，用 sticky 让头部常驻 */
.cfg-app:not(.is-embed) .cfg-head {
  position: sticky; top: 0; z-index: 4;
  background: var(--cfg-toolbar);
}

/* ---- 站点文案（2026-11-17）---- */
/* 每行：标签 + 状态徽标 + key/上限，下面一个输入框，再下面灰字给默认值 */
.text-field { padding: 12px 0; border-top: 1px solid var(--surface-2); }
.text-field:first-of-type { border-top: 0; padding-top: 4px; }
.text-field-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.text-field-head label { font-size: 13px; font-weight: 600; color: var(--ink); }
.text-field-head .meta { font-size: 11.5px; }
.text-field input[type="text"], .text-field textarea {
  width: 100%; padding: 8px 10px; font-size: 13.5px; line-height: 1.65;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: 8px;
}
.text-field textarea { resize: vertical; min-height: 62px; }
.text-field input[type="text"]:focus, .text-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.text-default { margin: 6px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted-soft); }
/* 可配文案允许换行（后台是 textarea）：只在这三处开 pre-line，
   别全站开——正文里多余的换行会把版面撑散 */
footer p, .fact-val span { white-space: pre-line; }
.badge.is-custom { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

/* ---- 搜索关键字回显（2026-11-17）---- */
/* 「免授权」「精选」不是标题里的字，被翻译成筛选条件后在这里亮一下 */
.kw-hits { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.kw-chip {
  padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}

/* ---- 友链 / 公告 / 赞助（2026-11-17）---- */
/* 列表页顶部那行友链：右对齐，弱化到辅助信息级别 */
.link-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: flex-end; margin: 0;
  padding: 7px 0 6px;
  font-size: 12.5px; color: var(--muted);
}
.link-row-label { color: var(--muted-soft); }
.link-row a { color: var(--accent); text-decoration: none; }
.link-row a:hover { text-decoration: underline; }
.link-row-apply { margin-left: 4px; color: var(--muted) !important; }
.link-row-apply:hover { color: var(--accent) !important; }

/* 列表页顶部吸附带：友链 + 公告 + 搜索栏整块吸在顶栏（52px）下面。
   高度会随公告展开/收起变化，所以左栏的 sticky top 用 --head-h 动态算。 */
.sticky-head {
  position: sticky; top: 52px; z-index: 4;
  background: var(--bg);
  padding-top: 6px;
  border-bottom: 1px solid var(--line);
}
.sticky-head .notice-card { margin: 0 0 .5rem; }
.sticky-head .browse-toolbar { margin: 0 0 .5rem; }

/* 公告卡：details 自带折叠，不写 JS */
.notice-card {
  margin: 0 0 1.1rem; padding: 12px 16px 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
}
.notice-card > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink);
  list-style: none; margin-bottom: .35rem;
}
.notice-card > summary::-webkit-details-marker { display: none; }
.notice-card > summary::after { content: "收起"; float: right; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.notice-card:not([open]) > summary::after { content: "展开"; }
.notice-card ul { margin: 0 0 .7rem; padding-left: 1.05rem; }
.notice-card li { font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }

/* 赞助页与友链页共用的窄栏布局 */
.page-narrow { max-width: 660px; margin: 0 auto; }
.page-h1 { font-size: 1.4rem; margin: 0 0 .5rem; }
.page-lead { margin: 0 0 1.2rem; color: var(--ink-2); font-size: 14px; line-height: 1.75; white-space: pre-line; }
.page-hint { margin: 1.2rem 0 0; font-size: 12px; color: var(--muted-soft); }

/* 打赏码 */
.qr-grid { display: flex; gap: 18px; flex-wrap: wrap; }
.qr-card { margin: 0; text-align: center; }
.qr-card img {
  width: 200px; height: 200px; object-fit: contain;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
}
.qr-card figcaption { margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* 友链页 */
.friend-list { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.friend-list li {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--surface-2);
}
.friend-list a { font-size: 14px; }
.friend-note { font-size: 12.5px; color: var(--muted); }
.friend-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; }
.friend-form .field input { width: 100%; }
.friend-form .btn { align-self: flex-start; }

/* 后台：打赏码两栏 */
.qr-admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 10px; }
.qr-slot { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.qr-slot h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.qr-preview {
  display: flex; align-items: center; justify-content: center;
  height: 180px; margin: 10px 0; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2);
}
.qr-preview img { max-width: 100%; max-height: 168px; object-fit: contain; }
.qr-preview.is-empty { color: var(--muted-soft); font-size: 12.5px; }
/* 「我的资料」里两个槽位并排：预览框按二维码比例收成正方形，
   否则空白态会横向铺满整张卡片（2026-11-19） */
.tip-slots .qr-preview { width: 180px; height: 180px; }
.qr-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qr-form input[type="file"] { font-size: 12.5px; max-width: 100%; }
.qr-del { margin-top: 10px; }

/* 后台：操作列与行内表单 */
/* table-layout:fixed 下写 1% 会被压成十几像素，按钮直接被裁掉——给固定宽度 */
.col-actions { width: 156px; white-space: nowrap; }
.inline-form { display: inline; }
.inline-form + .inline-form { margin-left: 6px; }
.reject-list { list-style: none; margin: 0; padding: 0; }
.reject-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--surface-2); font-size: 12.5px; }
.reject-list li:last-child { border-bottom: 0; }
.reject-list .mono { color: var(--muted); }

/* 顶栏「赞助」：描边小按钮，不与「上传实验」的主色抢 */
.nav-right a.nav-sponsor {
  padding: 3px 10px; border: 1px solid var(--warn-line); border-radius: 7px;
  color: var(--warn) !important; background: var(--warn-soft);
}
.nav-right a.nav-sponsor:hover { border-color: var(--warn); }

/* ---- 右侧悬浮栏：QQ / 微信 / 回顶部（2026-11-17）---- */
.contact-rail {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%);
  z-index: 7; display: flex; flex-direction: column; gap: 8px;
}
/* 左侧「加入我们」栏：与右侧同构，位置镜像、弹层朝右 */
.contact-rail.is-left { left: 14px; right: auto; }
.contact-rail.is-left .rail-pop { right: auto; left: calc(100% + 10px); }
.contact-rail.is-left .rail-pop::after {
  right: auto; left: -5px;
  border-right: 0; border-top: 0;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rail-btn.is-ima { background: var(--brand-ima); }
.rail-btn.is-wxmp { background: var(--brand-wxmp); }
.rail-btn.is-qqch { background: var(--brand-qqch); }
.rail-pop-sub { color: var(--muted); font-size: 11.5px; }

.rail-item { position: relative; }
.rail-btn {
  width: 46px; height: 46px; padding: 0; border: 0; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.rail-btn svg { width: 24px; height: 24px; }
.rail-btn.is-qq { background: var(--brand-qq); }
/* 官方企鹅轮廓是 448×512 的竖长比例，宽度收一点才与微信那颗视觉等大 */
.rail-btn.is-qq svg { width: 21px; height: 24px; }
.rail-btn.is-wechat { background: var(--brand-wechat); }
.rail-btn:hover { filter: brightness(1.06); }

/* 回顶部：与二维码按钮区分开（主色实心 + 文字），没滚动时隐藏 */
.rail-top { background: var(--accent); color: var(--ink-invert); flex-direction: column; gap: 1px; }
.rail-top span { font-size: 9.5px; letter-spacing: .04em; line-height: 1; }
.rail-top svg { width: 15px; height: 15px; }

/* 弹出二维码：hover 与键盘聚焦都触发 */
.rail-pop {
  position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  width: 208px; padding: 10px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity .12s ease, visibility .12s;
}
.rail-item:hover .rail-pop, .rail-item:focus-within .rail-pop { opacity: 1; visibility: visible; }
.rail-pop img { display: block; width: 180px; height: 180px; margin: 0 auto; object-fit: contain; }
.rail-pop p { margin: 7px 0 0; font-size: 12px; color: var(--ink-2); }
.rail-pop::after {
  content: ""; position: absolute; right: -5px; top: 50%; margin-top: -5px;
  width: 9px; height: 9px; background: var(--card);
  border-right: 1px solid var(--line); border-top: 1px solid var(--line);
  transform: rotate(45deg);
}

/* 窄屏没有 hover，也不该挡住内容：整条栏收起来。
   1024 及以下也一并收起——那时浮轨只会吃掉两侧边距（2026-11-19 走查）。 */
@media (max-width: 1100px) {
  .contact-rail { display: none; }
}

/* 悬浮栏是 fixed 的，而 .wide 页面容器能撑到 1560px —— 1024/1280/1440 实测都会压住
   右侧的「下载原始导出包」按钮（46px 栏 + 14px 边距）。这一段把正文让出来；
   超过 1680px 时容器已居中，不存在重叠，不必牺牲宽度。 */
@media (min-width: 1101px) and (max-width: 1680px) {
  /* 左右两条悬浮栏（各 46px + 14px 边距）都会压住正文，两侧一起让；
     ≤1100 时浮轨已隐藏，正文不必再让 */
  main { padding-right: 92px; padding-left: 92px; }
}

/* 窄屏上「友链 + 公告 + 搜索栏」会折成半屏高（实测 390px 下 357px），
   粘住就没地方看卡片了：这里取消吸附，只让顶栏保持粘住 */
@media (max-width: 900px) {
  .sticky-head { position: static; border-bottom: 0; }
}

/* 821–900px 这一档还没有抽屉（抽屉从 ≤820 起），只需要取消 sticky。
   注意别写成 `max-width: 900px`：那会盖掉 ≤820 的 `position: fixed`，
   筛选栏就退回文档流、占掉 330px 把卡片整体压下去（2026-11-19 实测）。 */
@media (min-width: 821px) and (max-width: 900px) {
  .facets { position: static; }
}

/* ============================================================
   窄屏收起「友链行」与「三步引导」
   这两块的基础样式（display: flex）定义在文件更靠后的位置，同权重下后者胜出，
   所以这条必须放在文件最后，并用 !important 兜底。
   友链在 /links 与页脚仍有入口；引导内容在侧栏与帮助页都有。
   ============================================================ */
@media (max-width: 720px) {
  .onboard, .link-row { display: none !important; }
}

/* ---------------- /help 目录页（2026-11-19） ---------------- */
.help-shell { max-width: 960px; margin: 0 auto; padding: 2rem 1.2rem 3rem; }
.help-shell h1 { margin: 0 0 .4rem; font-size: 1.5rem; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.help-card {
  display: grid; gap: .45rem; padding: 1.1rem 1.2rem 1rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); text-decoration: none; color: inherit;
  transition: border-color .12s ease, transform .12s ease;
}
.help-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.help-card h2 { margin: 0; font-size: 1rem; }
.help-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.help-card-go { color: var(--accent); font-size: 13px; }

/* 空态卡片里的图标与标题（.empty-card 本体样式早已存在） */
.empty-card-icon { font-size: 1.6rem; color: var(--muted); line-height: 1; }
.empty-card h3 { margin: .2rem 0 0; font-size: 1rem; }

/* ---------------- 点按目标：窄屏把文字链接撑到 ≥24px 高（2026-11-19 走查） ---------------- */
@media (max-width: 900px) {
  .topbar nav a { display: inline-block; padding: .42rem .34rem; }
  .topbar nav a.nav-cta { padding: .42rem .7rem; }
}
/* 「新窗口打开」这类行内小链接：给它一点可点高度，不改变视觉密度 */
.topology-figure figcaption a,
.dpanel .meta a,
.comments a { display: inline-block; padding-block: .18rem; }

/* ---------------- 404 页：搜索 + 入口卡片 ---------------- */
.nf { max-width: 760px; margin: 8vh auto 0; padding: 0 1.2rem; text-align: center; }
.nf h1 { margin: 0 0 .5rem; font-size: 1.6rem; }
.nf-search { display: flex; gap: .5rem; margin: 1.4rem auto .2rem; max-width: 520px; }
.nf-search input {
  flex: 1; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--ink); font-size: 14px; font-family: inherit;
}
.nf-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nf-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; margin-top: 1.6rem; text-align: left; }
.nf-link {
  display: grid; gap: .2rem; padding: .85rem 1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); text-decoration: none; color: inherit;
}
.nf-link:hover { border-color: var(--accent); }
.nf-link strong { font-size: 14px; }
.nf-link span { color: var(--muted); font-size: 12.5px; }

/* 右栏「用 EID 一键导入」引导（2026-11-19，配合 001 的图文教程） */
.eid-hint {
  display: grid; gap: .35rem; padding: .75rem .85rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2);
}
.eid-hint strong { font-size: 13px; }
.eid-hint ol { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.eid-hint li { margin: 0; }
.eid-hint p { margin: .15rem 0 0; }

/* 右栏内容变多（快速事实 + 下载 + 复制链接 + EID 三步）后，矮屏上最后一个链接会被裁掉：
   给一档内部滚动。1280×900 用不到，14 寸屏 / 125% 缩放时需要。 */
@media (min-width: 901px) and (min-height: 600px) {
  .detail-side { max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; }
}

/* 登录页的「扫码开通贡献者账号」：直接摊开右侧栏那两个码（2026-11-19） */
.login-contact { margin: 0 0 1rem; font-size: 13.5px; }
.login-contact summary { cursor: pointer; color: var(--accent); width: fit-content; }
.login-contact summary:hover { text-decoration: underline; }
.login-qrs { display: flex; gap: 1rem; margin: .8rem 0 .4rem; flex-wrap: wrap; }
.login-qrs figure { margin: 0; display: grid; justify-items: center; gap: .3rem; }
.login-qrs img { border: 1px solid var(--line); border-radius: 8px; background: var(--card); padding: 4px; }
.login-qrs figcaption { font-size: 12px; color: var(--muted); }

/* 详情页标题：第二行（版本 / 更新时间 / 全部版本）淡一档，别和身份行抢（2026-11-19） */
.detail-submeta {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin: 6px 0 .6rem; color: var(--muted); font-size: 12.5px;
}
/* 版本号做纯文字：不再是一颗只有「v1」的胶囊 */
.detail-version { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.detail-submeta a { color: var(--muted); }
.detail-submeta a:hover { color: var(--accent); }
.detail-facts { color: var(--ink-2); }

/* 评论表单折叠：0 条评论时只露一行「还没有评论，来说第一句」 */
.comments-write { margin: .4rem 0 .2rem; }
.comments-write > summary {
  cursor: pointer; width: fit-content; padding: .45rem .8rem;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card);
  color: var(--ink-2); font-size: 13.5px;
}
.comments-write > summary:hover { border-color: var(--accent); color: var(--accent); }
.comments-write[open] > summary { margin-bottom: .7rem; }

/* 标题 + 两行 meta 的文本列（.detail-head 是 flex，复制按钮在右侧） */
.detail-head-text { flex: 1 1 auto; min-width: 0; }
