/* 我的库（mylib.html）专用样式
   ------------------------------------------------------------------
   只服务这一页；文章页那一枚「加入清单」按钮的样式在 styles.css 的 .read-mark 段。
   配色沿用全站变量（styles.css 的 :root），不新造色板。 */

.ml-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 4px 0 10px;
}
.ml-card {
  background: #fff;
  border: 1px solid var(--line, #d2d2d7);
  border-radius: 14px;
  padding: 16px 16px 14px;
}
.ml-k { font-size: 12px; color: var(--muted, #6e6e73); }
.ml-v {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--ink, #1d1d1f);
  font-variant-numeric: tabular-nums;
}
.ml-v small { font-size: 12px; font-weight: 400; color: var(--muted, #6e6e73); margin-left: 3px; }
.ml-v-warn { color: #d92b25; }

.ml-empty {
  padding: 18px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted, #6e6e73);
  background: #fff;
  border: 1px dashed var(--line, #d2d2d7);
  border-radius: 14px;
}
.ml-empty a { color: var(--blue, #0071e3); }

.ml-hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted, #6e6e73);
}
.ml-h3 {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted, #6e6e73);
}
.ml-h3:first-child { margin-top: 4px; }

/* 分组条形 */
.ml-bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 168px) 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--ink, #1d1d1f);
}
.ml-bar-k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-bar-track {
  height: 8px;
  background: #eceff3;
  border-radius: 999px;
  overflow: hidden;
}
.ml-bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8cc6ff, var(--blue, #0071e3));
}
.ml-bar-row b { font-variant-numeric: tabular-nums; }
.ml-bar-row em { font-style: normal; font-size: 12px; color: #d92b25; }

/* 季度 */
.ml-q-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline, rgba(0, 0, 0, .07));
  font-size: 13.5px;
  color: var(--ink, #1d1d1f);
}
.ml-q-row:last-child { border-bottom: 0; }
.ml-q-row span { color: var(--muted, #6e6e73); font-size: 12.5px; }
.ml-q-rate { font-variant-numeric: tabular-nums; color: var(--muted, #6e6e73); }
.ml-q-rate.is-high { color: #d92b25; font-weight: 600; }

/* 列表（记录 / 清单 / 分类浏览共用） */
.ml-list { max-height: 420px; overflow: auto; }
.ml-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--hairline, rgba(0, 0, 0, .07));
  font-size: 13.5px;
  color: var(--ink, #1d1d1f);
}
.ml-row:last-child { border-bottom: 0; }
.ml-row-d { flex: 0 0 62px; color: var(--muted, #6e6e73); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ml-row-l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-row-l.is-bad { color: #d92b25; }
.ml-row-l.is-warn { color: #b26a00; }
.ml-row-m {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted, #6e6e73);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ml-row-a {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--blue, #0071e3);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ml-row-a:hover { text-decoration: underline; }
.ml-del, .ml-done, .ml-add {
  flex: 0 0 auto;
  font: inherit;
  font-size: 12.5px;
  color: var(--muted, #6e6e73);
  background: #fff;
  border: 1px solid var(--line, #d2d2d7);
  border-radius: 999px;
  padding: 3px 11px;
  cursor: pointer;
}
.ml-del { padding: 2px 9px; line-height: 1.4; }
.ml-del:hover { color: #d92b25; border-color: #d92b25; }
.ml-add:hover, .ml-done:hover { color: var(--blue, #0071e3); border-color: var(--blue, #0071e3); }

/* 按钮组 */
.ml-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.ml-btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  background: var(--blue, #0071e3);
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}
.ml-btn:hover { background: #0077ed; }
.ml-btn-quiet {
  color: var(--ink, #1d1d1f);
  background: #fff;
  border: 1px solid var(--line, #d2d2d7);
}
.ml-btn-quiet:hover { background: #f5f5f7; }

/* 分享卡预览 */
.ml-preview { margin-top: 18px; }
.ml-preview img {
  display: block;
  width: 100%;
  max-width: 300px;
  border-radius: 14px;
  border: 1px solid var(--line, #d2d2d7);
}

/* 分类浏览 */
.ml-browse { margin-top: 16px; }
.ml-browse > summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--blue, #0071e3);
}
.ml-phase { margin-top: 10px; }
.ml-phase > summary {
  cursor: pointer;
  font-size: 13.5px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline, rgba(0, 0, 0, .07));
}
.ml-phase > summary span { float: right; color: var(--muted, #6e6e73); font-size: 12.5px; }

.ml-hide { display: none !important; }

@media (max-width: 640px) {
  .ml-cards { grid-template-columns: repeat(2, 1fr); }
  .ml-v { font-size: 22px; }
  .ml-bar-row { grid-template-columns: minmax(80px, 40%) 1fr auto; }
  .ml-bar-row em { display: none; }
  .ml-row-d { flex-basis: 54px; }
  .ml-row-m { display: none; }
}
