/* cresteregaini — 照源站 mypetchicken.com 独立重建：深色橄榄报头条 + 分栏 hero + 药丸分类 + 圆角竖卡 */
:root {
  --olive: #3f4a2e;
  --olive-dark: #2c3420;
  --olive-soft: #e8ebdf;
  --straw: #f4efe1;
  --clay: #b4552f;
  --ink: #22251d;
  --ink-soft: #5c6153;
  --line: #dcd8c6;
  --paper: #fffdf7;
  --radius: 14px;
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1140px, 100% - 2.5rem); margin: 0 auto; }

a { color: var(--clay); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--olive); color: #fff; padding: .6rem 1rem; z-index: 20;
}
.skip-link:focus { left: 1rem; top: .5rem; }

/* ── 报头：深色橄榄横条，左品牌 + 右侧单行导航（≤1024px 折叠为汉堡抽屉） ── */
.masthead { background: var(--olive); color: #fff; position: relative; }
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.1rem 0; flex-wrap: nowrap;
}
.brand { display: flex; flex-direction: column; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-name {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  letter-spacing: .01em; line-height: 1.1; white-space: nowrap;
}
.brand-tag { font-size: .8rem; color: #cfd6be; margin-top: .15rem; white-space: nowrap; }

.menu {
  list-style: none; display: flex; gap: .8rem; margin: 0; padding: 0;
  flex-wrap: nowrap; align-items: center;
}
.menu a {
  color: #eef1e6; font-size: .88rem; font-weight: 500; white-space: nowrap;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.menu a:hover { border-bottom-color: #cfd6be; text-decoration: none; }
.menu a.is-active { border-bottom-color: #e8b44a; color: #fff; }

/* 汉堡按钮：桌面隐藏 */
.nav-toggle {
  display: none; margin-left: auto; flex: 0 0 auto;
  width: 44px; height: 40px; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid #6d7a56; border-radius: 10px;
  align-items: center; justify-content: center;
}
.nav-toggle:hover { background: rgba(255, 255, 255, .08); }
.nav-toggle:focus-visible { outline: 2px solid #e8b44a; outline-offset: 2px; }
.nav-toggle-box { display: block; width: 20px; }
.nav-toggle-box span {
  display: block; height: 2px; background: #eef1e6; border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle-box span + span { margin-top: 4px; }
.masthead.is-open .nav-toggle-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.masthead.is-open .nav-toggle-box span:nth-child(2) { opacity: 0; }
.masthead.is-open .nav-toggle-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── 首页：分栏 hero ── */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.2rem;
  align-items: center; padding: 3rem 0 2rem;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.1; margin: 0 0 .9rem; color: var(--olive-dark);
}
.hero-lead { font-size: 1.12rem; color: var(--ink); margin: 0 0 .9rem; }
.hero-note {
  margin: 0; color: var(--ink-soft); font-size: .95rem;
  border-left: 3px solid var(--line); padding-left: .9rem;
}
.hero-media img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); box-shadow: 0 10px 26px rgba(44, 52, 32, .16);
  aspect-ratio: 3 / 2; object-fit: cover;
}

.section { padding: 1.6rem 0 2.4rem; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .5rem; margin-bottom: 1.3rem;
}
.section-head h2 {
  font-family: var(--serif); font-size: 1.5rem; margin: 0; color: var(--olive-dark);
}
.section-head p { margin: 0; font-size: .92rem; }
.text-link { font-weight: 500; }

/* 分类「药丸」行 */
.pill-row {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .8rem;
}
.pill a {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--olive-soft); color: var(--olive-dark);
  border: 1px solid #cfd6be; border-radius: 999px;
  padding: .55rem 1.1rem; font-weight: 500;
}
.pill a:hover { background: var(--straw); text-decoration: none; }
.pill-count {
  background: var(--olive); color: #fff; font-size: .75rem;
  border-radius: 999px; min-width: 1.3rem; text-align: center; padding: 0 .35rem;
}

/* ── 卡片：竖排圆角投影 ── */
.card-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem;
}
.grid-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 2px 10px rgba(44, 52, 32, .09);
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.grid-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(44, 52, 32, .14); }
.card-thumb { display: block; }
.card-thumb img {
  width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--straw);
}
.card-body { padding: 1rem 1.1rem 1.25rem; }
.card-meta {
  margin: 0 0 .35rem; font-size: .74rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--clay); font-weight: 600;
}
.card-title {
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.3;
  margin: 0 0 .5rem; color: var(--olive-dark);
}
.card-title a { color: inherit; }
.card-excerpt { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* ── 页面 ── */
.page-head { padding: 2.2rem 0 1.2rem; max-width: 45rem; }
.page-head h1 {
  font-family: var(--serif); font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  margin: 0 0 .7rem; color: var(--olive-dark);
}
.page-lead { font-size: 1.08rem; margin: 0 0 .8rem; }
.page-note { color: var(--ink-soft); font-size: .96rem; margin: 0; }
.page-body { max-width: 45rem; padding-bottom: 1rem; }
.page-body p { margin: 0 0 1rem; }

.crumbs { font-size: .86rem; color: var(--ink-soft); padding: 1.2rem 0 0; }
.crumbs a { color: var(--ink-soft); }

/* ── 文章 ── */
.article { max-width: 46rem; padding-bottom: 1rem; }
.article-meta {
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--clay); font-weight: 600; margin: 0 0 .5rem;
}
.article h1 {
  font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.18; margin: 0 0 .8rem; color: var(--olive-dark);
}
.article-lead { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 1.2rem; }
.article-figure { margin: 0 0 1.6rem; }
.article-figure img {
  width: 100%; height: auto; display: block; border-radius: var(--radius);
  aspect-ratio: 4 / 3; object-fit: cover;
}
.article-body h2 {
  font-family: var(--serif); font-size: 1.35rem; color: var(--olive-dark);
  margin: 2rem 0 .7rem; padding-top: .4rem;
}
.article-body p { margin: 0 0 1rem; }
.article-body ul { margin: 0 0 1.2rem; padding-left: 1.2rem; }
.article-body li { margin-bottom: .45rem; }

.disclaimer {
  margin: 2rem 0 0; padding: .9rem 1rem; background: var(--straw);
  border-left: 4px solid var(--clay); font-size: .9rem; color: var(--ink-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.related {
  max-width: 46rem; margin: 2.4rem 0 0; padding: 1.3rem 1.4rem;
  background: var(--olive-soft); border-radius: var(--radius);
}
.related h2 { font-family: var(--serif); font-size: 1.15rem; margin: 0 0 .7rem; color: var(--olive-dark); }
.related ul { margin: 0; padding-left: 1.1rem; }
.related li { margin-bottom: .5rem; font-size: .95rem; }

.next-link { max-width: 46rem; margin: 1.6rem 0 2rem; font-weight: 500; }

.karta { max-width: 46rem; padding-bottom: 2rem; }
.karta li { margin-bottom: .35rem; }
.karta ul { margin: .3rem 0 .8rem; }

/* ── 页脚 ── */
.site-footer { background: var(--olive-dark); color: #dfe4d4; margin-top: 3rem; }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 2.6rem 0 1.8rem;
}
.footer-title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 .6rem; color: #fff; }
.footer-lead p { margin: 0; font-size: .93rem; color: #c3cbb3; }
.footer-col h3 {
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: #a9b295; margin: 0 0 .7rem; font-weight: 600;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .4rem; }
.footer-col a { color: #dfe4d4; font-size: .93rem; }
.footer-bottom { border-top: 1px solid #46503a; padding: 1rem 0; }
.footer-bottom p { margin: 0; font-size: .85rem; color: #a9b295; }

/* ── 响应式：≤1024px 折叠为汉堡抽屉（无 JS 时退回换行，保证可达） ── */
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; }

  .js .nav-primary {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%; z-index: 30;
    padding: 0 1.25rem;
    background: var(--olive-dark);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
    max-height: calc(100vh - 4rem);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .js .masthead.is-open .nav-primary { display: block; }
  .js .menu { flex-wrap: wrap; gap: 0; padding: .3rem 0; }
  .js .menu li { width: 100%; border-top: 1px solid #46503a; }
  .js .menu li:first-child { border-top: 0; }
  .js .menu a {
    display: block; width: 100%; padding: .8rem 0;
    font-size: .95rem; border-bottom: 0;
  }
  .js .menu a.is-active { color: #e8b44a; }

  /* 无 JS 兜底：菜单始终可达，仅换行排布 */
  html:not(.js) .menu { flex-wrap: wrap; gap: .45rem 1rem; padding-bottom: .3rem; }

  .hero { grid-template-columns: 1fr; padding-top: 2rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .masthead-inner { gap: .5rem; padding: .7rem 0; }
  .brand-name { font-size: 1.25rem; }
  .brand-tag { display: none; }
  .js .menu a { padding: .75rem 0; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; padding-top: 1.6rem; }
  .hero-media img { aspect-ratio: 16 / 9; }
}

/* == 整卡可点补丁 v1 (2026-09-23) == */
/* 正文卡片：原本只有「图片锚点 + 标题锚点」两个并列链接，卡片其余区域点不动。
   把标题链接拉伸成整卡大小的透明面（stretched link），整卡可点。
   z-index 取 1，低于页头(90)/遮罩(100)/抽屉(110)，不干扰移动端导航。 */
li.grid-card { position: relative; }
li.grid-card h3.card-title > a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
li.grid-card:focus-within { outline: 2px solid currentColor; outline-offset: 3px; }
/* == /整卡可点补丁 v1 == */
