/* 辐射陆龟物种科普知识 · 首页与内页共用样式 */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-weight: 700; line-height: 1.25; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  padding: 10px 16px;
  background: var(--green-900);
  color: var(--ink-invert);
  border-radius: 6px;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- M0 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--green-900);
  color: var(--ink-invert);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 75px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding-right: 28px;
  border-right: 1px solid rgba(246, 244, 237, 0.32);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand svg { width: 38px; height: 38px; flex: none; color: var(--brass-bright); }
.nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.7vw, 28px);
  flex: 1;
}
.nav a {
  position: relative;
  padding: 6px 0;
  font-size: 16px;
  color: rgba(246, 244, 237, 0.9);
  white-space: nowrap;
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] {
  color: var(--brass-bright);
  font-weight: 600;
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--brass-bright);
}
.nav-toggle {
  display: none;
  margin-left: auto;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid rgba(246, 244, 237, 0.4);
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* ---------- M1 首屏 ---------- */
.hero {
  position: relative;
  height: 384px;
  overflow: hidden;
  background: var(--green-900);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 45%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 26, 14, .8) 0%, rgba(18, 26, 14, .66) 30%, rgba(18, 26, 14, .28) 58%, rgba(18, 26, 14, 0) 80%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  padding-bottom: 8px;
}
.hero-copy { max-width: 650px; color: #fff; }
.hero h1 {
  font-size: clamp(48px, 6vw, 86px);
  line-height: 1.06;
  letter-spacing: .015em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .28);
}
.hero-lead {
  margin-top: 20px;
  max-width: 580px;
  font-size: 19px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .93);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .4);
}

/* ---------- M2 核心数据条 ---------- */
.facts {
  background: var(--bg);
  padding: 4px 0 0;
}
.facts-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 33px 28px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  border-left: 1px solid var(--line);
}
.fact:first-child { border-left: 0; padding-left: 0; }
.fact svg { width: 46px; height: 46px; flex: none; color: var(--green-800); }
.fact-label {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--green-900);
}
.fact-value {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ---------- 区块标题通用 ---------- */
.section-head {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.section-title {
  position: relative;
  padding-left: 16px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--green-900);
}
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  border-radius: 2px;
  background: var(--green-900);
}
.section-note {
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--ink);
}

/* ---------- M3 分类索引 ---------- */
.index { padding: 10px 0 14px; }
.index .section-note { max-width: 960px; }
.index-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.index-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 80px;
  padding: 12px 6px;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: border-color .18s ease, background .18s ease;
}
.index-tile:hover { border-color: var(--green-900); background: #f3f1e3; }
.index-tile svg { width: 38px; height: 38px; color: var(--green-800); }
.index-tile span { font-size: 16px; font-weight: 600; color: var(--green-900); }

/* ---------- M4 物种档案 ---------- */
.featured { padding: 0 0 16px; }
.featured-card {
  display: grid;
  grid-template-columns: 520px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.featured-media {
  margin: 0;
  aspect-ratio: 520 / 270;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body .section-title { margin-bottom: 18px; }
.featured-text {
  font-size: 21px;
  line-height: 1.9;
  color: var(--ink);
}
.featured-text em { font-style: italic; }
.featured-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-900);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}

/* ---------- M5 饲养三步 ---------- */
.care {
  padding: 10px 0;
  background: var(--bg);
}
.care .wrap {
  max-width: 1372px;
  padding: 37px 26px 39px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.care-head { margin-bottom: 26px; }
.care-grid {
  counter-reset: care;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.care-step {
  position: relative;
  padding: 2px 32px 0;
  border-left: 1px solid var(--line);
}
.care-step:first-child { border-left: 0; padding-left: 0; }
.care-step:last-child { padding-right: 0; }
.care-step-art {
  position: absolute;
  right: 18px;
  bottom: -4px;
  width: 76px;
  height: 76px;
  color: var(--green-900);
  opacity: .22;
}
.care-step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--green-900);
}
.care-step h3::before {
  counter-increment: care;
  content: counter(care);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: none;
  border: 1px solid var(--green-900);
  border-radius: 50%;
  font-size: 12.5px;
  font-weight: 700;
}
.care-step p {
  margin-top: 10px;
  max-width: 300px;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink);
}

/* ---------- M6 / M7 原生地与保护 ---------- */
.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 7px 0;
}
.duo-card {
  padding: 15px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.duo-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.duo-head svg { width: 22px; height: 22px; color: var(--brass); }
.duo-head h3 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--green-900);
}
.duo-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: start;
}
.duo-body--text { grid-template-columns: minmax(0, 1fr); }
.duo-media {
  margin: 0;
  aspect-ratio: 190 / 104;
  overflow: hidden;
  border-radius: 6px;
}
.duo-media img { width: 100%; height: 100%; object-fit: cover; }
.duo-card p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink);
}
.duo-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green-900);
  border-bottom: 1px solid var(--brass);
}

/* ---------- M8 精选条目 ---------- */
.notes { padding: 2px 0 8px; }
.notes-head {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 20px;
}
.notes-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.notes-all:hover { color: var(--green-900); }
.notes-lede {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.notes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 16px;
}
.note-card {
  display: block;
  background: transparent;
  border-radius: var(--radius-sm);
  transition: transform .18s ease;
}
.note-card:hover { transform: translateY(-2px); }
.note-thumb {
  margin: 0;
  aspect-ratio: 240 / 116;
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.note-thumb img { width: 100%; height: 100%; object-fit: cover; }
.note-card h3 {
  margin-top: 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--green-900);
}

/* ---------- M9 内容边界 ---------- */
.scope { padding: 0 0 22px; }
.scope-card {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 31px 30px;
  background: var(--bg-scope);
  border-radius: var(--radius);
}
.scope-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scope-head svg { width: 26px; height: 26px; color: var(--green-900); }
.scope-head h3 {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--green-900);
}
.scope-card p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}

/* ---------- M10 页脚 ---------- */
.site-footer {
  background: var(--green-900);
  color: rgba(246, 244, 237, 0.86);
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 186px;
  padding: 30px 0;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.footer-brand svg { width: 30px; height: 30px; color: var(--brass-bright); }
.footer-mid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 14.5px;
  flex: 1;
}
.footer-mid a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-note {
  max-width: 250px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(246, 244, 237, 0.7);
}
.footer-sep { color: rgba(246, 244, 237, 0.4); }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .hero { height: 340px; }
  .hero-lead { font-size: 17px; max-width: 540px; }
  .featured-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .index-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 18px;
    background: var(--green-900);
    border-top: 1px solid rgba(246, 244, 237, 0.2);
  }
  .nav.is-open a { width: 100%; padding: 10px 0; border-bottom: 1px solid rgba(246, 244, 237, 0.12); }
  .nav-toggle { display: inline-flex; background: transparent; color: var(--ink-invert); }
  .hero { height: auto; }
  .hero::after { background: linear-gradient(180deg, rgba(22, 30, 18, .35) 0%, rgba(22, 30, 18, .8) 78%); }
  .hero-inner { align-items: flex-end; padding-top: 260px; padding-bottom: 30px; }
  .hero h1 { font-size: 46px; }
  .hero-lead { font-size: 16px; }
  .facts-inner { grid-template-columns: repeat(2, 1fr); gap: 18px 0; padding: 24px 0; }
  .fact { border-left: 0; padding: 0; }
  .facts-inner .fact:nth-child(5) { grid-column: span 2; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .featured-card { grid-template-columns: 1fr; gap: 20px; }
  .care-grid { grid-template-columns: 1fr; gap: 20px; }
  .care-step { border-left: 0; padding: 0; }
  .care-step + .care-step { border-top: 1px solid var(--line); padding-top: 20px; }
  .care-step-art { display: none; }
  .duo { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: repeat(2, 1fr); }
  .scope-card { grid-template-columns: 1fr; gap: 12px; }
  .notes-head { grid-template-columns: 1fr; gap: 10px; }
  .notes-lede { font-size: 14px; }
  .notes-all { justify-self: start; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; min-height: 0; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .brand { font-size: 17px; padding-right: 16px; }
  .brand svg { width: 28px; height: 28px; }
  .nav-toggle { display: inline-flex; }
  .hero-inner { padding-top: 220px; }
  .hero-lead { font-size: 15px; }
  .facts-inner { grid-template-columns: 1fr; gap: 14px; }
  .facts-inner .fact:nth-child(5) { grid-column: auto; }
  .index-grid { grid-template-columns: repeat(2, 1fr); }
  .duo-body { grid-template-columns: 1fr; }
  .duo-media { aspect-ratio: 16 / 9; }
  .notes-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 键盘焦点可见 ---------- */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
.chip:focus-visible,
.index-tile:focus-visible,
.note-card:focus-visible {
  outline: 2px solid var(--green-900);
  outline-offset: 3px;
}
.nav a:focus-visible { outline-offset: 4px; }

/* ================================================================
   数据化补充（v1.1）· 列表页 chips / 分页 / 分类模块 / 正文配图
   ================================================================ */

/* 导航：12 项时可横向滚动，不撑破头部 */
.header-inner { min-width: 0; }
.nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: none; }

/* chips 用 <a> 渲染时的形态 */
.chip { display: inline-flex; align-items: center; text-decoration: none; }
.chip.is-active { color: var(--ink-invert); }

/* 分类索引块里的文章数 */
.index-tile-count {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-2);
  font-style: normal;
  color: var(--ink-soft);
}

/* 列表卡片：标签行时间 + 标题摘要截断，保证等高 */
.tag--time { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.list-card h2,
.list-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.list-card h2 { -webkit-line-clamp: 3; }
.list-card p { -webkit-line-clamp: 3; }

/* 分页 */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 30px 0 6px;
}
.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  font-size: 14px;
  color: var(--green-900);
  background: #fff;
}
.pager-btn:hover { border-color: var(--green-900); }
.pager-btn.is-active {
  background: var(--green-900);
  border-color: var(--green-900);
  color: var(--ink-invert);
  font-weight: 600;
}
.pager-gap { padding: 0 4px; color: var(--ink-soft); }
.pager-info { margin-left: auto; font-size: 13.5px; color: var(--ink-soft); }

/* 首页分类内容模块 */
.cat-modules { display: flex; flex-direction: column; gap: 20px; margin-top: 22px; }
.cat-module {
  padding: 20px 22px 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
}
.cat-module-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.cat-module-head h3 { font-size: var(--fs-10); }
.cat-module-head h3 a { color: var(--green-900); }
.cat-module-head h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cat-module-count { font-size: var(--fs-2); color: var(--ink-soft); }
.cat-module-more { margin-left: auto; font-size: var(--fs-3); color: var(--brass); }
.cat-module-more:hover { color: var(--green-900); }

.mod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mod-grid li { min-width: 0; }
.mod-card {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  transition: border-color .18s ease, transform .18s ease;
}
.mod-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.mod-thumb {
  margin: 0;
  aspect-ratio: 152 / 100;
  overflow: hidden;
  border-radius: var(--r-1);
  background: var(--bg-alt);
}
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-body { min-width: 0; }
.mod-card h4 {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--green-900);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}
.mod-card:hover h4 { color: var(--brass); }
.mod-card p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

/* 详情页正文内插图片 */
.article-inline-media {
  margin: 22px 0 26px;
  overflow: hidden;
  border-radius: var(--r-1);
  border: 1px solid var(--line);
}
.article-inline-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* 详情页导语 */
.article-lede {
  margin-top: 12px;
  font-size: var(--fs-9);
  line-height: 1.9;
  color: var(--ink-soft);
}

@media (max-width: 1180px) {
  .mod-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .nav { max-height: 62vh; overflow-y: auto; }
  .pager-info { margin-left: 0; }
}

@media (max-width: 620px) {
  .chips { width: 100%; }
  .chip { font-size: 13px; padding: 6px 11px; }
  .pager-btn { min-width: 34px; padding: 6px 10px; font-size: 13px; }
  .article-inline-media img { aspect-ratio: 4 / 3; }
  .cat-module { padding: 16px 14px 18px; }
  .mod-card { grid-template-columns: 108px minmax(0, 1fr); gap: 10px; padding: 8px; }
  .mod-thumb { aspect-ratio: 1 / 1; }
  .mod-card h4 { font-size: 13.5px; -webkit-line-clamp: 2; }
  .mod-card p { display: none; }
}
