/* AI 入门 shared reading scale. Keep both essays on one measured rhythm. */
body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader-meta {
  font-size: 13px !important;
  line-height: 1.7 !important;
}

body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader-dek {
  font-size: 17px !important;
  line-height: 1.85 !important;
}

body:is([data-site-page="learn"], [data-site-page="learn-change"]) .article-body,
body:is([data-site-page="learn"], [data-site-page="learn-change"]) .article-body p {
  font-size: 17px !important;
  line-height: 1.95 !important;
}

body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader h1 {
  max-width: 100%;
  min-width: 0;
  line-height: 1.32 !important;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

/* Keep both AI 入门 essays on the same headline scale. The longer second
   title can wrap naturally without being reduced to a different visual tier. */
body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader h1 {
  font-size: clamp(32px, 4vw, 44px) !important;
  word-break: normal;
}

@media (max-width: 820px) {
  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader-meta {
    font-size: 12px !important;
    line-height: 1.65 !important;
  }

  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader-dek {
    font-size: 16px !important;
    line-height: 1.85 !important;
  }

  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .article-body,
  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .article-body p {
    font-size: 17px !important;
    line-height: 1.95 !important;
  }

  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader h1 {
    font-size: 24px !important;
    line-height: 1.38 !important;
  }

  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader h1 {
    font-size: 24px !important;
  }
}

@media (max-width: 359px) {
  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader h1 {
    font-size: 23px !important;
  }
}

/* Keep the publication directory identical on both essays and across tablet
   widths; only narrow phones need the smaller navigation scale. */
body:is([data-site-page="learn"], [data-site-page="learn-change"]) nav.edition-switch[aria-label] > a {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", SimSun, serif !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;
}

@media (max-width: 560px) {
  body:is([data-site-page="learn"], [data-site-page="learn-change"]) nav.edition-switch[aria-label] > a {
    font-size: 12px !important;
  }
}

@media (max-width: 360px) {
  body:is([data-site-page="learn"], [data-site-page="learn-change"]) nav.edition-switch[aria-label] > a {
    font-size: 11px !important;
  }
}

/* Shared AI 入门 article directory. State is represented only by aria-current. */
.learn-series {
  display: flex;
  align-items: center;
  gap: 0 20px;
  margin: 0 0 28px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.learn-series > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: var(--muted);
  white-space: nowrap;
}

.learn-series > a > span {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: .08em;
}

.learn-series > a::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 48px;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity .3s cubic-bezier(.22, 1, .36, 1);
}

.learn-series > a[aria-current="page"]::after {
  opacity: 1;
}

@media (max-width: 820px) {
  .learn-series {
    gap: 0 12px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    font-size: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .learn-series::-webkit-scrollbar {
    display: none;
  }

  .learn-series > a {
    min-height: 30px;
  }

  .learn-series > a::after {
    bottom: -8px;
  }
}

@media (max-width: 760px) {
  .learn-series {
    margin-bottom: 18px;
  }
}

/* 2026-09-28 参考资料：比正文小一号、浅一档（链接下划线和英文不两端对齐由统一排字层 liaoyuan-text 负责） */
body:is([data-site-page="learn"], [data-site-page="learn-change"]) .article-body section:has(> h2#references) p {
  font-size: 15px !important;
  line-height: 1.75 !important;
  color: var(--muted);
}

/* 2026-09-28 第二轮：手机上系列目录滑动后，被截断的那一头淡出（learn.js 按滚动位置加 is-cut-start / is-cut-end）；
   标题上方几段留白收紧一点（导航一层没删：刊物导航是用户要留的） */
@media (max-width: 820px) {
  .learn-series.is-cut-start { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36px); mask-image: linear-gradient(to right, transparent 0, #000 36px); }
  .learn-series.is-cut-end { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 36px); mask-image: linear-gradient(to left, transparent 0, #000 36px); }
  .learn-series.is-cut-start.is-cut-end { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%); }
}
@media (max-width: 760px) {
  .learn-series { margin-bottom: 12px; }
  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader-meta { padding-top: 11px !important; }
  body:is([data-site-page="learn"], [data-site-page="learn-change"]) .reader h1 { margin-top: 10px !important; }
}
