/* parzeniekawy · 配色：浓缩棕 + 赭橙，咖啡馆气质（从 appliancesweb 派生，令牌已差异化） */

:root {
  /* 主色：钢蓝 */
  --leaf: #6f4e37;
  --leaf-dark: #523a29;
  --leaf-tint: #f3ece4;

  /* 强调：铜橙 */
  --beet: #c1502e;
  --beet-dark: #93391d;
  --beet-tint: #faece5;

  /* 中性 */
  --ink: #241c16;
  --ink-soft: #4a4038;
  --muted: #6b5f54;
  --bg: #ffffff;
  --bg-soft: #f8f4ef;
  --border: #e5ddd2;
  --border-strong: #ccc0b0;

  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', 'Segoe UI', Arial, sans-serif;

  --wrap: 1180px;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(36,28,22, .05);
  --shadow-hover: 0 8px 26px rgba(36,28,22, .12);
}

/* ── 基础 ─────────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
}

.site-inner { display: block; padding: 34px 0 58px; }

/* ── 跳转链接 ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--leaf);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ── 页头：两行式（品牌居中 / 导航在下）──────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.header-inner {
  position: relative;      /* 遮罩挂这里：z-index:auto，不生成层叠上下文 */
  z-index: auto;
  padding-top: 25px;
}

.brand { text-align: center; }

.site-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.015em;
}
.site-title a { color: var(--ink); text-decoration: none; }
.site-title a:hover { color: var(--leaf); }

.site-tagline {
  margin: 7px 0 0;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: .01em;
}

/* ── 导航（桌面：品牌下方水平居中）────────────────────────── */
.nav-primary { border-top: 1px solid var(--border); margin-top: 21px; }

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 26px;
}
.menu li { margin: 0; }
.menu a {
  display: block;
  padding: 13px 2px 12px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}
.menu a:hover { color: var(--leaf); }
.menu a.is-active,
.menu a[aria-current="page"] {
  color: var(--leaf);
  border-bottom-color: var(--beet);
}

/* ── 汉堡按钮：桌面隐藏 ───────────────────────────────────── */
.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.menu-toggle-label { display: none; }

/* ── 正文排版 ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.26;
  letter-spacing: -.01em;
}
h1 { font-size: 34px; margin: 0 0 16px; font-weight: 700; }
h2 { font-size: 25px; margin: 44px 0 14px; font-weight: 600; }
h3 { font-size: 19px; margin: 0 0 8px; font-weight: 600; }
h4 { font-size: 16px; margin: 0 0 10px; font-weight: 600; }

p { margin: 0 0 18px; }

a { color: var(--leaf); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--beet); }

ul, ol { margin: 0 0 20px; padding-left: 23px; }
li { margin-bottom: 8px; }

strong { font-weight: 600; }

.page-intro {
  font-size: 19px;
  line-height: 1.66;
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 68ch;
}

.crumbs {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0 0 16px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--leaf); text-decoration: underline; }

.updated { font-size: 13.5px; color: var(--muted); margin-top: 34px; }

/* ── Hero 与配图（3:2）───────────────────────────────────── */
.hero { margin: 0 0 12px; }

.hero-figure { margin: 0 0 30px; }
.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.hero-figure figcaption {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 9px;
}

/* ── 卡片网格 ─────────────────────────────────────────────── */
.entry-grid {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 26px;
}

.entry-card {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.entry-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.entry-card > a { display: block; }
.entry-card img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--bg-soft);
}

.entry-card__body { padding: 17px 19px 20px; flex: 1 1 auto; }

.entry-card__meta {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--beet);
  background: var(--beet-tint);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 11px;
}

.entry-card h3 { margin: 0 0 7px; font-size: 18.5px; }
.entry-card h3 a { color: var(--ink); text-decoration: none; }
.entry-card:hover h3 a { color: var(--leaf); }
.entry-card p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* ── 参数表（作物页）─────────────────────────────────────── */
.meta-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 0 0 28px;
}
.meta-row__item { background: var(--bg-soft); padding: 15px 17px; }
.meta-row__label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--leaf);
  margin-bottom: 5px;
}
.meta-row__value { display: block; font-size: 15px; color: var(--ink); line-height: 1.5; }

/* ── 分节列表 / 要点框 / 相关阅读 ─────────────────────────── */
.step-list { padding-left: 23px; }
.step-list > li { margin-bottom: 14px; }

.note-box {
  background: var(--leaf-tint);
  border-left: 4px solid var(--leaf);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 17px 21px;
  margin: 30px 0;
}
.note-box p { margin: 0; font-size: 16px; }
.note-box strong { color: var(--leaf-dark); }

.related {
  margin-top: 44px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}
.related h2 { margin-top: 0; font-size: 21px; }
.related-list { list-style: none; padding: 0; }
.related-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15.5px;
  color: var(--muted);
}
.related-list li:last-child { border-bottom: 0; }
.related-list a { font-weight: 500; }

/* ── 联系卡片 / 法律页 ───────────────────────────────────── */
.contact-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 23px;
  margin: 0 0 18px;
}
.contact-card h2 { margin: 0 0 9px; font-size: 19px; }
.contact-card p { margin: 0; font-size: 16px; }

.legal-page { max-width: 74ch; }
.legal-page h2 { font-size: 22px; margin-top: 38px; }
.legal-page p { font-size: 16px; color: var(--ink-soft); }

/* ── 页脚 ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--leaf-dark);
  color: #e8ecdf;
  margin-top: 20px;
  padding: 42px 0 30px;
  font-size: 15px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}
.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer p { color: #ccd4be; margin: 0; font-size: 14.5px; line-height: 1.65; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #ccd4be; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  margin: 32px 0 0;
  padding-top: 21px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: 13.5px;
  color: #aeb99c;
}

/* ══════════════════════════════════════════════════════════════
   移动端：抽屉菜单
   ⚠️ 三条硬前提（改动版式时必须复核）
     ① input/label 必须是 .nav-primary 的兄弟（~ 只选后继兄弟）
     ② 遮罩不能挂 .nav-primary 自身（其 transform + overflow 会裁剪 fixed 后代）
     ③ 遮罩也不能挂 body（.site-header 有 z-index 即成独立层叠上下文，会把浮层整体反压）
     正解：挂在 .header-inner（position:relative + z-index:auto，不生成上下文）上，
           在同一上下文内比较：遮罩 100 < 抽屉 110 < 按钮 120
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .header-inner { padding: 15px 0 0; }

  .brand { text-align: left; padding-right: 58px; }
  .site-title { font-size: 25px; }
  .site-tagline { margin-top: 4px; font-size: 12.5px; }

  /* 汉堡 */
  .menu-toggle-label {
    display: block;
    position: absolute;
    top: 13px;
    right: 22px;
    width: 42px;
    height: 38px;
    z-index: 120;
    cursor: pointer;
    padding: 8px 7px;
    border-radius: var(--radius);
  }
  .menu-toggle-label span {
    display: block;
    height: 2.5px;
    background: var(--ink);
    border-radius: 2px;
    margin-bottom: 5px;
    transition: transform .18s ease, opacity .18s ease;
  }
  .menu-toggle-label span:last-child { margin-bottom: 0; }

  /* 抽屉 */
  .nav-primary {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: min(310px, 84vw);
    height: 100%;
    background: var(--bg);
    border-top: 0;
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 34px rgba(30, 33, 25, .16);
    margin: 0;
    padding: 72px 26px 26px;
    transform: translateX(101%);
    transition: transform .22s ease;
    z-index: 110;
    overflow-y: auto;
  }

  .menu { display: block; }
  .menu li { border-bottom: 1px solid var(--border); }
  .menu li:last-child { border-bottom: 0; }
  .menu a {
    padding: 14px 2px;
    font-size: 16px;
    border-bottom: 0;
  }
  .menu a.is-active,
  .menu a[aria-current="page"] { color: var(--beet); }

  /* 打开状态：遮罩 + 抽屉 + 按钮变叉 */
  .menu-toggle:checked ~ .nav-primary { transform: translateX(0); }

  .header-inner:has(.menu-toggle:checked)::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(30, 33, 25, .42);
    z-index: 100;
  }
  .menu-toggle:checked ~ .menu-toggle-label span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-toggle:checked ~ .menu-toggle-label span:nth-child(2) { opacity: 0; }
  .menu-toggle:checked ~ .menu-toggle-label span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .footer-cols { grid-template-columns: 1fr; gap: 26px; }

  h1 { font-size: 27px; }
  h2 { font-size: 21px; margin-top: 36px; }
  .page-intro { font-size: 17.5px; }
  .entry-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 17px; }
  .entry-grid { grid-template-columns: 1fr; }
  .meta-row { grid-template-columns: 1fr 1fr; }
}

/* ═══ 移动端与等比补丁（全站通用） ═══ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.credits-table { min-width: 660px; }
img { max-width: 100%; }
@media (max-width: 520px) {
  .meta-row { grid-template-columns: 1fr; }
  .crumbs { font-size: 12px; overflow-wrap: anywhere; }
  h1 { font-size: 24px; }
  .entry-card__body { padding: 12px 14px 14px; }
  .contact-card { padding: 14px 16px; }
  .footer-cols { gap: 20px; }
  .note-box { padding: 14px 16px; }
}

/* ═══ 结构变体 v2：杂志编辑风 ═══ */
@media (min-width: 901px) {
  .site-header { border-bottom: none; }
  .header-inner { display: flex; flex-direction: column; align-items: center; padding-top: 30px; }
  .brand { text-align: center; }
  .site-title { font-size: 34px; font-family: var(--font-heading); }
  .site-tagline { font-style: italic; font-size: 14.5px; margin-top: 7px; }
  .nav-primary { border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong);
    width: 100%; margin-top: 20px; }
  .menu { justify-content: center; gap: 30px; }
  .menu a { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 12px 0 11px; }
  .menu .is-active a { color: var(--beet); box-shadow: 0 2px 0 var(--beet); }
  .hero { text-align: center; margin-top: 32px; }
  .hero .page-intro { max-width: 660px; margin: 0 auto 28px; font-size: 17.5px; font-family: var(--font-heading); }
  .entry-card--lead { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 0 30px;
    border: none; border-bottom: 1px solid var(--border-strong); border-radius: 0; background: transparent; }
  .entry-card--lead > a:first-child { display: block; }
  .entry-card--lead img { border-radius: 0; }
  .entry-card--lead .entry-card__body { padding: 4px 0 0; align-self: center; }
  .entry-card--lead h3 { font-size: 25px; }
  .entry-grid .entry-card:not(.entry-card--lead) { border: none; border-top: 1px solid var(--border);
    border-radius: 0; background: transparent; }
  .entry-card h3 { font-family: var(--font-heading); font-style: italic; }
  .entry-grid--plain { grid-template-columns: 1fr; gap: 0; }
  .entry-grid--plain .entry-card { padding: 12px 0 13px; }
  .entry-grid--plain .entry-card p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; }
}
@media (max-width: 900px) {
  .entry-card--lead { display: block; }
}
