/* 本篇专用样式。站点框架、配色、字体来自 ../../site.css，这里只补正文排版。
   规则：颜色一律用 site.css 的 CSS 变量（--ink / --muted / --line / --accent / --surface /
   --bg-tint / --accent-soft），不要写十六进制色值，否则深色模式下会变成一块白。 */

.note {
  padding-block: 8px 48px;
}

.note .hero,
.note .section {
  /* grid / flex 语境下子项默认 min-width:auto，会被 pre 里不换行的长代码行撑开整条轨道，
     导致手机端横向溢出；显式允许收缩，pre 的 overflow-x 才真正生效 */
  min-width: 0;
}

.note .hero {
  /* hero 不是 .section，自己画一条底线；后面的分隔线由 site.css 的 .section 负责 */
  margin-top: 26px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line-soft);
}


.note .eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.note h1 {
  margin: 0;
  font-size: clamp(1.7rem, 6vw, 2.3rem);
  line-height: 1.24;
  letter-spacing: -0.01em;
}

.note h2 {
  margin: 0 0 14px;
  font-size: clamp(1.15rem, 4.2vw, 1.4rem);
  line-height: 1.35;
}

.note h3 {
  margin: 22px 0 10px;
  font-size: 1rem;
}

.note p {
  margin: 0;
  color: var(--ink-soft);
}

.note .lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.02rem;
}

.note .meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.note .tldr {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.note .tldr strong {
  color: var(--accent);
}

.note .tldr ul {
  margin: 6px 0 0;
}

.note .section > * + * {
  margin-top: 16px;
}

.note .section > h2 + * {
  margin-top: 0;
}

.note ul,
.note ol {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.note li + li {
  margin-top: 8px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cards article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.cards h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

.cards p {
  color: var(--muted);
  font-size: 0.9rem;
}

.note pre {
  min-width: 0;
  overflow-x: auto;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-tint);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.65;
}

.note p code,
.note li code,
.note td code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-tint);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.86em;
}

.note figure {
  margin: 20px 0 0;
}

.note figure svg,
.note figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.note figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* 数据表：包一层 .table-wrap 让它在手机上横滑，而不是撑破页面 */
.table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.note table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.note th,
.note td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}

.note th {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.note td {
  color: var(--muted);
}

.note tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.note a {overflow-wrap:anywhere;}
.follow {margin-top:24px;}
.follow article p + p {margin-top:12px;}
.note li code {overflow-wrap:anywhere;}
