/* 1. 页面基础：每一条规则都是“选择谁，再改什么”。 */
:root {
  --paper: #f7f6ee;
  --ink: #244b3d;
  --muted: #626d63;
  --line: #d9dfd3;
  --accent: #ebbf69;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  line-height: 1.8;
}
a { color: inherit; text-underline-offset: 5px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0 0 16px; }
h1, h2, h3 { line-height: 1.3; }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
:focus-visible { outline: 3px solid #9a6116; outline-offset: 4px; }
[hidden] { display: none !important; }
/* 第二阶段先使用桌面宽度，下一阶段专门解决手机布局。 */
.container { width: 1040px; margin: 0 auto; }
.eyebrow { font-size: 12px; letter-spacing: 2px; font-weight: 700; }
.muted, .meta, .stage-note { color: var(--muted); }
.stage-note { font-size: 14px; }
.skip { position: absolute; left: 16px; top: -80px; }
.skip:focus { top: 12px; background: white; padding: 8px; }

/* 2. 页头和首屏：用 Flex 与 Grid 安排区域。 */
.site-header { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; border-bottom: 1px solid var(--line); }
.brand { font-size: 25px; font-weight: 800; text-decoration: none; }
nav { display: flex; gap: 28px; }
nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 72px 0; }
.hero h1 { font-size: 62px; letter-spacing: -2px; }
.intro { color: var(--muted); font-size: 18px; }
.button { display: inline-block; padding: 11px 22px; border-radius: 8px; background: var(--ink); color: white; text-decoration: none; }
.hero .stage-note { margin-top: 18px; }
.garden { width: 100%; border-radius: 24px; }

/* 3. 精选文章和卡片列表。 */
.featured { background: #e9eee4; padding: 32px 36px; border-radius: 18px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.featured h2 { margin-bottom: 0; }
.featured p:last-child { margin-bottom: 0; }
.notes { padding: 64px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; }
.toolbar { display: flex; justify-content: space-between; gap: 24px; margin: 20px 0; }
.filters { display: flex; align-items: center; gap: 8px; }
.filters button, .reset { border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 7px; padding: 7px 12px; }
.filters button[aria-pressed="true"] { background: var(--ink); color: white; }
.search { display: grid; gap: 4px; font-size: 13px; }
.search input { width: 220px; border: 1px solid var(--line); border-radius: 7px; padding: 8px 12px; background: white; color: var(--ink); }
.result { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.result p { margin-bottom: 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: #fffef8; }
.post-number { display: block; color: #72836b; font-size: 42px; line-height: 1; margin-bottom: 30px; }
.meta { font-size: 12px; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card p { color: var(--muted); font-size: 15px; }
.text-link { font-weight: 700; }
.empty { padding: 36px; text-align: center; background: #e9eee4; border-radius: 12px; }

/* 4. 关于与页脚：用一致的边距让页面更整齐。 */
.about { border-top: 1px solid var(--line); padding: 48px 0; max-width: 760px; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; }

/* 5. 响应式：同一份内容，随可用宽度改变排法。 */
.container { width: min(1040px, calc(100% - 40px)); }
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; gap: 14px; padding: 20px 0; }
  nav { gap: 20px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 40px 0; }
  .hero h1 { font-size: 44px; }
  .garden { max-width: 500px; }
  .featured { grid-template-columns: 1fr; gap: 20px; padding: 26px; }
  .notes { padding: 40px 0; }
  .section-heading, .toolbar, .site-footer { flex-direction: column; align-items: stretch; }
  .toolbar { gap: 16px; }
  .filters { flex-wrap: wrap; }
  .search input { width: 100%; }
  .post-grid { grid-template-columns: 1fr; }
  .post-number { margin-bottom: 20px; }
  .result { gap: 14px; }
}
