/* style.css — anggrek（照源站 epicgardening.com 独立重建）
   页头：左置品牌 + 其下深绿横向菜单条；首页：左文案 / 右整幅图分栏 hero；
   卡片：竖卡网格，缩略图在上、圆角、浅灰底。深绿主色 #1f5c3f，正文 Source Serif + Nunito Sans。 */
:root {
  --green: #1f5c3f;
  --green-dark: #16452f;
  --green-soft: #e7f0e9;
  --ink: #1f2622;
  --ink-soft: #55605a;
  --line: #dfe4e0;
  --paper: #ffffff;
  --wash: #f5f7f5;
  --radius: 10px;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", 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.7;
}
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 22px; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--green); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; z-index: 20; }

/* ── 页头：左品牌 + 菜单条 ── */
.site-header { border-bottom: 3px solid var(--green); background: var(--paper); }
.header-inner { display: block; padding-top: 20px; }
.brand { display: block; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--green); font-size: 26px; margin-right: 8px; vertical-align: -3px; }
.brand-name { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -0.4px; }
.brand-tag { display: block; color: var(--ink-soft); font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; margin: 2px 0 14px 34px; }
.nav-primary { background: var(--green); margin: 0 -22px; }
.menu {
  list-style: none; display: flex; flex-wrap: wrap; gap: 2px;
  margin: 0; padding: 0 22px;
}
.menu > li > a {
  display: block; padding: 12px 14px; color: #eaf3ec; font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.02em;
}
.menu > li > a:hover { background: var(--green-dark); text-decoration: none; }
.menu > li > a.is-active { background: var(--green-dark); color: #fff; }

/* ── hero：左右分栏 ── */
.hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center;
  padding: 40px 0 34px; border-bottom: 1px solid var(--line);
}
.hero-eyebrow { color: var(--green); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em; margin: 0 0 10px; }
.hero h1 { font-family: var(--serif); font-size: 40px; line-height: 1.18; margin: 0 0 16px;
  letter-spacing: -0.6px; }
.hero-lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 12px; }
.hero-note { font-size: 15.5px; color: var(--ink-soft); margin: 0 0 20px; }
.hero-media img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.btn {
  display: inline-block; background: var(--green); color: #fff; padding: 11px 20px;
  border-radius: var(--radius); font-weight: 700; font-size: 15px;
}
.btn:hover { background: var(--green-dark); text-decoration: none; }

/* ── 区块与卡片 ── */
.section { padding: 36px 0 8px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 2px solid var(--green-soft); padding-bottom: 8px; margin-bottom: 22px; }
.section-head h2 { font-family: var(--serif); font-size: 26px; margin: 0; }
.text-link { font-weight: 700; font-size: 15px; }
.card-grid { list-style: none; margin: 0 0 8px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card { background: var(--wash); border-radius: var(--radius); overflow: hidden; display: flex;
  flex-direction: column; }
.card__thumb { display: block; }
.card__thumb img { width: 100%; height: 190px; object-fit: cover; display: block; }
.card__body { display: block; padding: 16px 18px 20px; }
.card__meta { display: block; font-size: 12.5px; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px; }
.card__title { font-family: var(--serif); font-size: 19px; line-height: 1.35; margin: 0 0 8px; }
.card__excerpt { margin: 0; font-size: 15px; color: var(--ink-soft); }
.cat-list { list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cat-card { background: var(--green-soft); border-radius: var(--radius); padding: 20px 22px; }
.cat-card h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 8px; }
.cat-card p { margin: 0 0 6px; font-size: 15px; color: var(--ink-soft); }
.cat-card__count { font-weight: 700; color: var(--green-dark); font-size: 13.5px; }

/* ── 页面头与正文 ── */
.crumbs { font-size: 14px; color: var(--ink-soft); padding: 18px 0 0; }
.page-head { padding: 14px 0 26px; }
.page-head h1 { font-family: var(--serif); font-size: 34px; line-height: 1.22; margin: 0 0 12px; }
.page-lead { font-size: 18px; color: var(--ink-soft); margin: 0 0 8px; }
.page-note { font-size: 16px; color: var(--ink-soft); margin: 0; }
.page-body { max-width: 72ch; margin: 26px 0 34px; font-size: 17px; line-height: 1.75; }
.page-body p { margin: 0 0 16px; }
.article { max-width: 720px; padding-bottom: 10px; }
.article-meta { font-size: 13px; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 8px; }
.article-head h1 { font-family: var(--serif); font-size: 36px; line-height: 1.2; margin: 0 0 12px; }
.article-lead { font-size: 18.5px; color: var(--ink-soft); margin: 0 0 20px; }
.article-figure { margin: 0 0 24px; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.article-body { max-width: 720px; }
.article-body h2 { font-family: var(--serif); font-size: 25px; line-height: 1.3;
  margin: 30px 0 12px; padding-left: 14px; border-left: 4px solid var(--green); }
.article-body p { margin: 0 0 16px; }
.article-body ul { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 7px; }
.disclaimer { margin: 26px 0 0; padding: 14px 18px; background: var(--wash);
  border-left: 4px solid var(--line); font-size: 14.5px; color: var(--ink-soft); }
.related { max-width: 720px; margin: 34px 0 0; padding: 20px 22px;
  background: var(--green-soft); border-radius: var(--radius); }
.related h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 12px; }
.related ul { margin: 0; padding-left: 20px; }
.related li { margin-bottom: 10px; font-size: 15.5px; }
.next-link { max-width: 720px; font-weight: 700; margin: 22px 0 0; }
.karta { max-width: 760px; }
.karta li { margin-bottom: 8px; }

/* ── 页脚 ── */
.site-footer { margin-top: 46px; background: var(--green-dark); color: #dcebe0; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; padding: 34px 22px; }
.footer-title { font-family: var(--serif); font-size: 24px; color: #fff; margin: 0 0 10px; }
.footer-lead p { margin: 0 0 10px; font-size: 15px; }
.footer-mail a { color: #bfe0c8; }
.footer-col h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.1em;
  color: #9fc7ab; margin: 0 0 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 7px; font-size: 15px; }
.footer-col a { color: #dcebe0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.16); padding: 16px 22px; }
.footer-bottom p { margin: 0; font-size: 13.5px; color: #a9cbb4; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-list { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 27px; }
  .article-head h1 { font-size: 27px; }
}

/* ==== nav-fold v2 (移动端折叠导航) ==== */
/* 设计：<=760px 时页头压成单条吸顶栏（左品牌 + 右上汉堡），菜单收进全屏抽屉。
   规则放在文件最末尾 —— 媒体查询不参与权重，同权重比先后，
   移动端规则必须晚于桌面规则，否则会被反向覆盖。 */

.nav-top,
.nav-scrim { display: none; }

@media (max-width: 760px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    /* 有些站的页头自身带 padding/margin（如 bonsaidim `padding:18px 0 0`），
       会把顶栏撑到 79px+ → 统一清零，高度只由 .header-inner 决定。 */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
  }

  /* 顶栏：品牌 + 右侧按钮位
     ⚠ 品牌结构各站不同（.site-title / .brand / .brand-name / .nameplate），
       这里用通用选择器一次性拿下，避免逐站适配。 */
  .site-header .header-inner {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    min-height: 60px;
    max-height: 68px;                 /* 硬上限：任何内部元素都不许把顶栏撑高 */
    overflow: hidden;
    padding: 0 74px 0 20px !important;   /* 左右：0 起 / 给按钮留 74 */
    margin: 0 !important;
  }
  /* 品牌容器：占满剩余宽度、单行省略 */
  .site-header .header-inner > .site-title,
  .site-header .header-inner > .brand,
  .site-header .header-inner > .nameplate,
  .site-header .header-inner > .site-title > a,
  .site-header .header-inner > .brand {
    display: flex !important;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    text-align: left !important;
    overflow: hidden;
  }
  /* 品牌名：统一字号 + 单行省略（各站名为 .site-title/.brand-name/.brand 文本） */
  .site-header .header-inner > .site-title,
  .site-header .header-inner > .brand,
  .site-header .header-inner .brand-name {
    font-size: 22px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  /* 品牌副标题 / 装饰符 / tagline：手机上全部收起，不占顶栏 */
  .site-header .header-inner .brand-tag,
  .site-header .header-inner .site-tagline,
  .site-header .header-inner .brand-mark,
  .site-header .header-inner > .site-mark,
  .site-header .header-inner .site-title span { display: none !important; }

  /* 汉堡按钮：绝对定位钉在右上角 */
  .site-header .nav-top-label {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    z-index: 120;
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: var(--accent, var(--brand, var(--green, #7a5b32)));
  }
  .site-header .nav-top-label__text { display: none; }
  .site-header .nav-top-label__bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1px solid currentColor;
    border-radius: 3px;
  }
  .site-header .nav-top-label__bars i {
    display: block; width: 20px; height: 2px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav-top:checked + .nav-top-label .nav-top-label__bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-top:checked + .nav-top-label .nav-top-label__bars i:nth-child(2) { opacity: 0; }
  .nav-top:checked + .nav-top-label .nav-top-label__bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* 展开时按钮固定右上角、变白以便压在深色抽屉上 */
  .nav-top:checked + .nav-top-label {
    position: fixed;
    top: 12px;
    right: 18px;
    transform: none;
    color: #fff;
    z-index: 130;
  }
  .nav-top:checked + .nav-top-label .nav-top-label__bars { border-color: rgba(255,255,255,.6); }

  /* 抽屉：铺满视口；覆盖 nav 在 header-inner 内 / 外两种结构 */
  /* ⚠ 底色必须显式给深色实底，不能靠继承：
     浅色页头的站 --ink 就是正文深灰，若抽屉也用 --ink，会出现
     「文字色 == 底色」→ 菜单全隐形（gitaroteka 实测踩过）。
     这里统一用近黑深底 + 明确白字，任何配色下都可读。 */
  .site-header .nav-primary {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 110;
    margin: 0 !important;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 76px 22px 34px;
    background: #1c262c;
    color: #f2f5f4;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .40);
    transform: translateY(-102%);
    transition: transform .26s ease;
  }
  /* ⚠ visibility 不能省：抽屉在 .header-inner 内部时，下面「展开藏品牌」的规则
     会把它的祖先一起设成 hidden，抽屉继承后不可见、也不可点（cvorovi 实测）。 */
  .nav-top:checked ~ .nav-primary,
  .nav-top:checked ~ .header-inner .nav-primary { transform: translateY(0); visibility: visible; }

  /* 抽屉里的菜单：竖排、可点区大
     ⚠ 有些站的 nav 里还套了一层 .wrap（如 bataumhirda），会叠加左右 padding，
       导致抽屉内容比别的站多缩进 24px → 这里把内层 .wrap 的 padding 清零。 */
  .site-header .nav-primary .wrap { display: block !important; padding-left: 0 !important; padding-right: 0 !important; }
  .site-header .nav-primary .menu {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 0 !important;
    border-top: 0 !important;
    justify-content: flex-start !important;
  }
  .site-header .nav-primary .menu > li {
    display: block !important;
    margin: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, .16);
  }
  .site-header .nav-primary .menu > li:first-child { border-top: 0; }
  /* 提高权重压过各站原有的 `.menu a{color:...}`（0,2,1 / 0,3,1） */
  .site-header .nav-primary .menu a,
  .site-header .nav-primary .menu > li > a,
  .site-header .nav-primary .menu a.is-active {
    display: block !important;
    padding: 15px 2px !important;
    font-size: 16.5px !important;
    line-height: 1.4;
    text-align: left !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    white-space: normal !important;
    color: #f2f5f4 !important;
    text-decoration: none;
  }
  .site-header .nav-primary .menu a.is-active { color: #ffffff !important; font-weight: 600; }

  /* 遮罩 */
  .site-header .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(8, 16, 22, .52);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease;
  }
  .nav-top:checked ~ .nav-scrim { opacity: 1; visibility: visible; }

  /* 展开时把品牌整体藏掉，避免与抽屉内容重叠 */
  .nav-top:checked ~ .header-inner,
  .nav-top:checked ~ .header .header-inner { visibility: hidden; }
}

/* 桌面端：折叠零件隐藏（写在末尾，不覆盖上面的移动端规则） */
.nav-top-label,
.nav-scrim { display: none; }
/* ==== /nav-fold v2 ==== */

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

/* ==== nav-skin anggrek (每站抽屉皮肤 · 防站群 · 2026-09-24) ==== */
@media (max-width: 760px) {
  .site-header .nav-top-label { color: var(--green) !important; }
  .site-header .nav-primary { background: var(--green-dark) !important; color: #e7f0e9 !important; }
  .site-header .nav-primary .menu > li { border-top: 1px solid rgba(231, 240, 233, 0.18) !important; }
  .site-header .nav-primary .menu > li:first-child { border-top: 0 !important; }
  .site-header .nav-primary .menu a, .site-header .nav-primary .menu > li > a, .site-header .nav-primary .menu a.is-active { color: #e7f0e9 !important; }
  .site-header .nav-primary .menu a.is-active { color: #ffffff !important; }
  .nav-top:checked + .nav-top-label { color: #ffffff !important; }
  .site-header .nav-top-label { width: auto; height: auto; }
  .site-header .nav-top-label__bars { display: none !important; }
  {P} .nav-top-label__text {
    display: inline-block !important;
    font-size: 12.5px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; line-height: 1;
    padding: 9px 15px; border: 1.5px solid currentColor; border-radius: 999px;
  }
  .site-header .nav-primary { border-top: 3px solid #3e7a57; border-radius: 0 0 16px 16px; }
}
/* ==== /nav-skin anggrek ==== */
