/* 烘焙工具 · 全局样式（首页 + 内页共享） */

:root {
  --bg: #f5ede3;
  --panel: #f2e8db;
  --box: #f0e5d6;
  --panel-deep: #eadcc7;
  --card: #fbf6ee;
  --ink: #1b1f1c;
  --body: #33342c;
  --muted: #6f6a5c;
  --accent: #8c392e;
  --accent-soft: #a9553f;
  --green: #12281c;
  --line: #e2d6c4;
  --line-strong: #d3c4ae;
  --wrap: 1364px;
  --serif: 'Songti SC',SimSun,'Noto Serif SC',Georgia,serif;
  --sans: 'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  --radius: 5px;
}

*, *::before, *::after { box-sizing: border-box; }

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

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 700; color: var(--ink); }
time { font-variant-numeric: tabular-nums; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 12px; top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(var(--wrap), calc(100% - 76px)); margin: 0 auto; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 237, 227, .94);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid rgba(27, 31, 28, .07);
}
.header-inner { display: flex; align-items: center; gap: 30px; height: 56px; }
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-size: 23px; font-weight: 700;
  color: var(--ink); letter-spacing: .02em; white-space: nowrap;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); flex: none; }
.site-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 26px; }
.nav-list a {
  display: inline-block; font-size: 13px; color: #33322a;
  padding: 17px 0; border-bottom: 2px solid transparent;
}
.nav-list a:hover { color: var(--accent); }
.nav-list a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* 导航下拉 */
.nav-list { position: relative; }
.nav-list .dropdown { position: relative; }
.nav-list .dropdown > a { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.nav-list .caret {
  display: inline-block; width: 5px; height: 5px; margin-top: -3px;
  border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor;
  transform: rotate(45deg); transition: transform .24s ease;
}
.nav-list .dropdown:hover .caret { transform: translateY(2px) rotate(225deg); }
.dropdown-menu {
  display: none; position: absolute; left: -14px; top: 100%; z-index: 60;
  min-width: 200px; max-height: 340px; overflow-y: auto;
  padding: 8px 6px; margin: 0; list-style: none;
  background: #fbf6ee; border: 1px solid var(--line-strong); border-radius: 4px;
  box-shadow: 0 14px 30px rgba(27, 31, 28, .12);
}
.nav-list .dropdown:hover > .dropdown-menu { display: block; }
.dropdown-menu li { display: block; }
.dropdown-menu a {
  display: block; padding: 7px 11px; border-bottom: 0;
  font-size: 12.8px; line-height: 1.5; color: #3c3a30; white-space: normal;
}
.dropdown-menu a:hover { background: var(--panel); color: var(--accent); }

.menu-toggle {
  display: none; margin-left: auto; width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: 4px; color: var(--ink); cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- hero ---------- */
.hero { position: relative; height: 409px; overflow: hidden; }
.hero-media {
  position: absolute; inset: 0 0 0 auto; width: 58.7%; height: 100%;
  background: url("../images/hero-counter.jpg") center right / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.6) 9%, #000 20%);
  mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.6) 9%, #000 20%);
}
.hero-inner { position: relative; padding-top: 54px; }
.eyebrow {
  font-size: 12px; letter-spacing: .16em; color: var(--accent);
  text-transform: uppercase; margin-bottom: 6px;
}
.hero h1 {
  font-size: 46px; line-height: 1.24; letter-spacing: .01em;
  max-width: 640px; color: #15241b;
}
.hero-lede {
  margin-top: 14px; max-width: 570px;
  font-size: 16px; line-height: 2.02; color: #4b4539;
}
.hero-actions { margin-top: 20px; }
.hero-cta {
  display: inline-flex; align-items: center;
  background: var(--accent); border-radius: 3px; overflow: hidden;
  font-size: 13.5px;
}
.hero-cta a { color: #fdf3e8; padding: 11px 20px; }
.cta-main { font-weight: 600; }
.cta-sub { border-left: 1px solid rgba(255, 255, 255, .28); color: #f2d9cd; display: inline-flex; gap: 8px; align-items: center; }
.cta-sub::after { content: "›"; font-size: 15px; line-height: 1; }
.hero-cta a:hover { background: rgba(0, 0, 0, .12); }
.hero-chips { display: flex; align-items: center; margin-top: 15px; }
.hero-chips li { border-right: 1px solid #c9b9a3; padding: 0 14px; line-height: 1; }
.hero-chips li:first-child { padding-left: 0; }
.hero-chips li:last-child { border-right: 0; }
.hero-chips a { font-size: 12.5px; color: #4d4638; }
.hero-chips a:hover { color: var(--accent); }

/* ---------- facts ---------- */
.facts { background: var(--panel); }
.facts-inner {
  display: grid; grid-template-columns: 208px 1fr; gap: 34px;
  padding: 30px 0 92px;
}
.facts-title {
  font-size: 27px; line-height: 1.42; color: #23301f; letter-spacing: .01em;
}
.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 2px 26px; border-left: 1px solid #ddcdb6; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact-label {
  font-size: 13.5px; color: var(--accent); font-weight: 700;
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px;
}
.fact-num { font-family: var(--serif); font-size: 17px; }
.fact-text { font-size: 12.8px; line-height: 1.8; color: #4a4437; }

/* ---------- generic section ---------- */
.section { padding-top: 46px; }
.section--cats { padding-top: 40px; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 18px; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 22px; letter-spacing: .01em; color: #1e2a20;
}
.bar { width: 4px; height: 19px; background: var(--accent); display: inline-block; flex: none; }
.section-lede { font-size: 13px; color: var(--muted); }
.section-updated { font-size: 12px; color: var(--muted); margin-left: auto; }

/* ---------- category index ---------- */
.idx-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.idx-card { background: var(--card); border-radius: 4px; overflow: hidden; }
.idx-link { display: flex; flex-direction: column; height: 100%; }
.idx-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.idx-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.idx-card:hover .idx-media img { transform: scale(1.03); }
.idx-body { display: block; padding: 10px 12px 12px; }
.idx-name { display: block; font-family: var(--serif); font-size: 16.5px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.idx-desc { display: block; margin-top: 4px; font-size: 11.2px; line-height: 1.5; color: #57513f; min-height: 0; }
.idx-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.idx-tags span {
  font-size: 10.5px; line-height: 1.45; color: #5b5344;
  border: 1px solid var(--line-strong); border-radius: 2px; padding: 0 5px;
}

/* ---------- featured ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat-card { background: var(--card); border-radius: 4px; overflow: hidden; }
.feat-link { display: flex; height: 100%; }
.feat-media { width: 39%; flex: none; aspect-ratio: 15 / 16; overflow: hidden; }
.feat-media img { width: 100%; height: 100%; object-fit: cover; }
.feat-body { display: flex; flex-direction: column; padding: 12px 14px 12px 13px; }
.feat-title { font-family: var(--serif); font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--ink); }
.feat-text { margin-top: 6px; font-size: 11.8px; line-height: 1.72; color: #57513f; }
.feat-meta { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.feat-meta time { font-size: 10.5px; color: var(--muted); }
.tag {
  display: inline-block; font-size: 10.5px; line-height: 1.6; color: var(--accent);
  background: #f4e4d8; border-radius: 2px; padding: 1px 6px;
}

/* ---------- metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.metric { background: var(--box); border-radius: 4px; padding: 14px 16px 16px; text-align: center; }
.metric-label { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }
.metric-num {
  display: block; font-family: var(--serif); font-size: 40px; line-height: 1.3;
  color: var(--green); font-weight: 700; letter-spacing: .01em;
}
.metric-text { display: block; font-size: 11.5px; line-height: 1.7; color: #4d4839; }

/* ---------- rules ---------- */
.section--rules { padding-top: 15px; }
.section--feat { padding-top: 54px; }
.section--metrics { padding-top: 60px; }
.rules { background: var(--panel-deep); border-radius: var(--radius); padding: 22px 26px 24px; }
.rules-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 16px; }
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.rule { display: flex; gap: 12px; align-items: flex-start; }
.rule-icon { width: 30px; height: 30px; flex: none; color: var(--accent); margin-top: 2px; }
.rule-text { font-size: 12.5px; line-height: 1.8; color: #46402f; }
.rule-text strong { color: var(--ink); }

/* ---------- notes ---------- */
.section--notes { padding-top: 12px; padding-bottom: 42px; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.notes-main { padding-right: 44px; border-right: 1px solid var(--line-strong); }
.notes-updates { padding-left: 44px; }
.notes-title { font-size: 23px; color: #1e2a20; }
.notes-sub { margin-top: 6px; font-size: 13px; font-weight: 700; color: #3a372c; }
.notes-dl { margin-top: 10px; }
.notes-dl > div { display: flex; gap: 10px; padding: 3px 0; }
.notes-dl dt { flex: none; font-size: 12.5px; font-weight: 700; color: #3a372c; }
.notes-dl dd { margin: 0; font-size: 12.5px; color: #4c4638; }
.update-list { margin-top: 12px; }
.update-list li {
  display: flex; align-items: baseline; gap: 16px; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.update-list li + li { border-top: 1px solid rgba(211, 196, 174, .6); }
.update-list a { font-size: 12.8px; color: #33322a; }
.update-list a:hover { color: var(--accent); }
.update-list time { font-size: 12px; color: var(--muted); flex: none; }

/* ---------- footer ---------- */
.site-footer { background: #2d3b30; color: #e8e2d5; }
.footer-top {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 30px 40px;
  padding: 52px 0 34px;
}
.footer-col { flex: 1 1 180px; min-width: 170px; }
.footer-col--brand { flex: 2 1 300px; max-width: 380px; }
.footer-col--about { flex: 1 1 200px; }
.footer-col-title {
  display: block; margin-bottom: 10px; font-size: 11.5px;
  letter-spacing: .16em; color: #a9a495;
}
.footer-col--about ul { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.brand--footer { color: #f4ecdf; font-size: 21px; }
.brand--footer .brand-mark { color: #d9c3a8; }
.footer-tagline { font-size: 12px; color: #c9c2b2; }
.footer-nav ul { display: flex; flex-direction: column; gap: 7px; }
.footer-nav a, .footer-about a { font-size: 12px; color: #ddd6c7; }
.footer-nav a:hover, .footer-about a:hover { color: #fff; }
.footer-about { display: flex; align-items: center; gap: 14px; padding-left: 22px; border-left: 1px solid rgba(232, 226, 213, .28); }
.footer-about-label { font-size: 12px; color: #a9a495; }
.footer-about ul { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-bottom { border-top: 1px solid rgba(232, 226, 213, .16); padding: 16px 0 25px; text-align: center; }
.footer-bottom p { font-size: 11.5px; color: #b7b1a2; }

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
.pager a, .pager .pager-current, .pager .pager-gap {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 34px; padding: 4px 11px;
  border: 1px solid var(--line-strong); border-radius: 3px;
  background: var(--card); font-size: 12.5px; color: #45402f;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .pager-current { background: var(--accent); border-color: var(--accent); color: #fdf3e8; }
.pager .pager-gap { border: 0; background: transparent; color: var(--muted); }

/* ---------- 列表卡片截断 ---------- */
.list-card h3, .list-card p, .feat-title, .feat-text, .deep-item h4 {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}
.list-card h3 { -webkit-line-clamp: 2; }
.list-card p { -webkit-line-clamp: 3; }
.feat-title { -webkit-line-clamp: 3; }
.feat-text { -webkit-line-clamp: 3; }

/* ---------- 首页：分类卡与精选卡（数据化后） ---------- */
.idx-count { display: block; margin-top: 6px; font-size: 10.8px; color: var(--muted); }
.update-list img { width: 72px; height: 54px; object-fit: cover; border-radius: 2px; flex: none; }
.update-list li { align-items: center; gap: 12px; }
.update-list .u-body { display: flex; align-items: center; gap: 12px; min-width: 0; }
.update-list a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* ---------- 分类深读（图文左右交替） ---------- */
.deep-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line-strong); }
.deep-head h3 { font-size: 19px; }
.deep-count { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.deep { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 28px; align-items: start; padding-top: 15px; }
.deep--flip .deep-lead { order: 2; }
.deep--flip .deep-side { order: 1; }
.deep-lead { display: block; }
.deep-lead .thumb { display: block; overflow: hidden; border-radius: 4px; background: var(--panel); }
.deep-lead .thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .5s ease; }
.deep-lead:hover .thumb img { transform: scale(1.03); }
.deep-lead h3 { margin-top: 9px; font-size: 19px; line-height: 1.48; }
.deep-lead:hover h3 { color: var(--accent); }
.deep-lead p { margin-top: 6px; font-size: 12.5px; line-height: 1.8; color: #57513f; }
.deep-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(211, 196, 174, .6); }
.deep-item .thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 3px; background: var(--panel); }
.deep-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.deep-item h4 { font-family: var(--serif); font-size: 14.5px; line-height: 1.5; -webkit-line-clamp: 2; }
.deep-item:hover h4 { color: var(--accent); }
.deep-item .meta { display: block; margin-top: 3px; font-size: 10.8px; color: var(--muted); }
.deep-more { display: inline-block; margin-top: 11px; font-size: 12.5px; color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .idx-grid { grid-template-columns: repeat(3, 1fr); }
  .idx-desc { min-height: 0; }
  .nav-list { gap: 18px; }
}

@media (max-width: 1040px) {
  .wrap { width: calc(100% - 48px); }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #f8f1e7; border-bottom: 1px solid var(--line-strong);
    padding: 8px 24px 18px; display: none;
    box-shadow: 0 14px 30px rgba(27, 31, 28, .08);
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a { padding: 12px 0; font-size: 14px; border-bottom: 1px solid rgba(211,196,174,.5); }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--accent); }
  .hero { height: 372px; }
  .hero h1 { font-size: 38px; }
  .hero-media { width: 62%; opacity: .55; }
  .facts-inner { grid-template-columns: 1fr; gap: 18px; padding: 26px 0; }
  .facts-title { font-size: 24px; }
  .fact-grid { grid-template-columns: 1fr; }
  .fact { border-left: 0; padding: 12px 0 0; border-top: 1px solid #ddcdb6; }
  .fact:first-child { border-top: 0; padding-top: 0; }
  .feat-grid { grid-template-columns: 1fr; }
  .deep { grid-template-columns: 1fr; }
  .deep--flip .deep-lead, .deep--flip .deep-side { order: 0; }
  .feat-link { align-items: stretch; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .rule-grid { grid-template-columns: 1fr; gap: 14px; }
  .notes-grid { grid-template-columns: 1fr; }
  .notes-main { padding-right: 0; border-right: 0; padding-bottom: 22px; border-bottom: 1px solid var(--line-strong); }
  .notes-updates { padding-left: 0; padding-top: 22px; }
  .footer-top { flex-wrap: wrap; }
}

@media (max-width: 620px) {
  .wrap { width: calc(100% - 32px); }
  .hero { height: auto; padding-bottom: 28px; }
  .hero-media { width: 100%; opacity: .18; }
  .hero-inner { padding-top: 28px; }
  .hero h1 { font-size: 29px; max-width: none; }
  .hero-lede { font-size: 14px; max-width: none; }
  .hero-cta { display: flex; flex-direction: column; text-align: center; }
  .cta-sub { border-left: 0; border-top: 1px solid rgba(255,255,255,.28); }
  .hero-chips { flex-wrap: wrap; row-gap: 8px; }
  .section { padding-top: 34px; }
  .section-head { flex-direction: column; gap: 4px; }
  .section-title { font-size: 19px; }
  .idx-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .idx-name { font-size: 16px; }
  .metrics { grid-template-columns: 1fr; }
  .metric-num { font-size: 34px; }
  .rules { padding: 18px; }
  .rules-head { flex-direction: column; gap: 2px; }
  .notes-title { font-size: 21px; }
  .update-list li { flex-direction: column; gap: 2px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-col, .footer-col--brand, .footer-col--about { flex: 1 1 auto; max-width: none; width: 100%; }
}

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