/* ===== /learn/ 研究笔记（body.learn） =====
   依赖 /css/style.css 的 :root 变量、.topbar、.container、.footer */

.learn .container { max-width: 760px; }

/* ---------- 索引页 ---------- */
.learn .learn-hero { padding: 8px 0 4px; }
.learn .learn-hero h1 { font-size: 27px; line-height: 1.32; letter-spacing: -.01em; margin-bottom: 12px; }
.learn .learn-hero .lead { font-size: 16px; color: #333c4d; }
.learn .learn-hero .lead b { color: var(--ink); }

.learn .callout {
  margin-top: 22px; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: 12px; padding: 18px 20px;
  font-size: 14.5px; color: #333c4d;
}
.learn .callout b { color: var(--ink); }
.learn .callout p { margin-top: 9px; }
.learn .callout p:first-child { margin-top: 0; }

.learn .post-list { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.learn .post-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 18px 20px; text-decoration: none; color: inherit;
  box-shadow: 0 2px 8px rgba(20,30,60,.035); transition: border-color .15s, transform .15s;
}
.learn .post-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.learn .post-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 9px;
  background: var(--chip); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.learn .post-body h2 { font-size: 16.5px; line-height: 1.42; margin-bottom: 6px; }
.learn .post-card:hover h2 { color: var(--brand); }
.learn .post-body p { font-size: 14px; color: var(--muted); line-height: 1.62; }
.learn .post-more {
  display: inline-block; margin-top: 9px; font-size: 13px; color: var(--brand); font-weight: 500;
}

/* ---------- 文章页 ---------- */
.learn .breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.learn .breadcrumb a { color: var(--muted); text-decoration: none; border-bottom: 1px dashed var(--line); }
.learn .breadcrumb a:hover { color: var(--brand); border-bottom-color: var(--brand); }
.learn .breadcrumb span:not(:last-child) { margin-right: 6px; }

.learn .art {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 34px 38px 38px; box-shadow: 0 2px 10px rgba(20,30,60,.04);
}
.learn .art h1 {
  font-size: 25px; line-height: 1.38; letter-spacing: -.01em; margin-bottom: 12px;
}
.learn .art-meta {
  font-size: 13px; color: var(--muted); padding-bottom: 20px;
  border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.learn .art h2 {
  font-size: 18.5px; line-height: 1.45; margin: 32px 0 12px;
  padding-left: 11px; border-left: 3px solid var(--brand);
}
.learn .art h3 { font-size: 16px; margin: 22px 0 9px; }
.learn .art p { font-size: 15.5px; line-height: 1.82; color: #2b3345; margin-bottom: 15px; }
.learn .art strong { color: var(--ink); font-weight: 600; }
.learn .art a { color: var(--brand); text-decoration: none; border-bottom: 1px solid rgba(45,108,223,.3); }
.learn .art a:hover { border-bottom-color: var(--brand); }
.learn .art ul, .learn .art ol { margin: 0 0 15px 22px; }
.learn .art li { font-size: 15px; line-height: 1.78; color: #2b3345; margin-bottom: 7px; }
.learn .art code {
  background: #f0f2f7; padding: 2px 6px; border-radius: 5px;
  font-size: 13.5px; font-family: ui-monospace, Consolas, monospace;
}

/* 表格：窄屏横向滚动，不撑破卡片 */
.learn .tbl-wrap {
  margin: 4px 0 20px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: 10px;
}
.learn table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 340px; }
.learn thead th {
  background: #f7f9fc; text-align: left; font-weight: 600; color: var(--ink);
  padding: 10px 13px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.learn tbody td {
  padding: 9px 13px; border-bottom: 1px solid #eef1f6; color: #2b3345;
  vertical-align: top; line-height: 1.6;
}
.learn tbody tr:last-child td { border-bottom: 0; }
.learn tbody tr:hover { background: #fafbfe; }
.learn tbody td:first-child { color: var(--ink); }

/* 提示块 */
.learn .art .callout {
  margin: 20px 0; background: #f7f9fc; border: 1px solid var(--line);
  border-left: 4px solid #9bb4e6; border-radius: 10px; padding: 15px 18px;
  font-size: 14.5px; line-height: 1.75; color: #333c4d;
}
.learn .art .callout b, .learn .art .callout strong { color: var(--ink); }

/* 上一篇 / 下一篇 */
.learn .pn-wrap {
  margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.learn .pn {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; text-decoration: none; color: var(--ink);
  font-size: 14px; line-height: 1.5; transition: border-color .15s;
}
.learn .pn:hover { border-color: var(--brand); color: var(--brand); }
.learn .pn.next { text-align: right; }
.learn .pn-l {
  display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 5px;
  letter-spacing: .04em; text-transform: uppercase;
}
.learn .pn:only-child { grid-column: 1 / -1; }

.learn .footer { text-align: center; padding: 20px; }
.learn .footer a { color: var(--muted); }

@media (max-width: 640px) {
  .learn .art { padding: 24px 20px 28px; border-radius: 12px; }
  .learn .art h1 { font-size: 21px; }
  .learn .art h2 { font-size: 17px; }
  .learn .art p, .learn .art li { font-size: 15px; }
  .learn .learn-hero h1 { font-size: 23px; }
  .learn .pn-wrap { grid-template-columns: 1fr; }
  .learn .pn.next { text-align: left; }
  .learn .post-card { padding: 15px 16px; gap: 12px; }
  .learn .post-num { width: 30px; height: 30px; font-size: 12.5px; }
}
