/* 基础变量与重置 */
:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-soft: #f0f4ef;
  --surface-tint: #e9f5ed;
  --ink: #1b2620;
  --ink-2: #56665b;
  --ink-3: #8b9a90;
  --line: #e1e9e1;
  --line-strong: #cfdbd1;
  --green: #08a854;
  --green-deep: #07763c;
  --green-soft: #e7f6ec;
  --gold: #b28942;
  --shadow-sm: 0 2px 10px rgba(24, 52, 34, 0.045);
  --shadow-md: 0 12px 32px rgba(24, 52, 34, 0.09);
  --radius: 16px;
  --radius-sm: 10px;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid rgba(8, 168, 84, 0.45); outline-offset: 3px; }

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--green-deep); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* 顶部导航 */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #0bb85d, #068a43);
  color: #fff; font-family: var(--serif); font-size: 21px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(8, 168, 84, 0.24);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: 0.02em; }
.brand-text small { font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }

.primary-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.primary-nav a {
  position: relative; padding: 8px 13px; border-radius: 9px;
  font-size: 14px; color: var(--ink-2); transition: color .2s, background .2s;
  white-space: nowrap;
}
.primary-nav a:hover { color: var(--green-deep); background: var(--surface-soft); }
.primary-nav a.is-active { color: var(--green-deep); font-weight: 600; background: var(--green-soft); }
.header-cta {
  flex-shrink: 0; padding: 9px 18px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(8, 168, 84, 0.2); transition: transform .2s, background .2s;
}
.header-cta:hover { background: var(--green-deep); transform: translateY(-1px); }
.nav-toggle {
  display: none; margin-left: auto; width: 40px; height: 38px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 0; place-items: center; gap: 4px; align-content: center;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 通用元件 */
.eyebrow {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--green-deep); font-weight: 700; margin-bottom: 8px;
}
.section { padding: 40px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { font-family: var(--serif); font-size: 25px; font-weight: 700; letter-spacing: 0.01em; }
.section-head p { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.text-link { color: var(--green-deep); font-size: 13px; font-weight: 600; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 18px rgba(8, 168, 84, 0.22); }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-2px); }
.btn-outline { border-color: var(--line-strong); background: var(--surface); color: var(--ink); }
.btn-outline:hover { border-color: var(--green); color: var(--green-deep); transform: translateY(-2px); }
.ghost-btn {
  padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface); font-size: 12px; color: var(--ink-2);
}
.ghost-btn:hover { border-color: var(--green); color: var(--green-deep); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; background: var(--green-soft); color: var(--green-deep);
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.tag-neutral { background: var(--surface-soft); color: var(--ink-2); }
.empty-state {
  padding: 46px 24px; text-align: center; color: var(--ink-2);
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface);
}
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 15px; }
.note-line {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--surface-soft); color: var(--ink-2); font-size: 12.5px; line-height: 1.7;
}
.note-line .note-icon { flex-shrink: 0; color: var(--gold); font-weight: 700; }
.loading-state { padding: 90px 20px; text-align: center; color: var(--ink-2); }
.loading-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--green); margin-bottom: 12px; animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }

/* 首页 Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 62px 0 54px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 58% 70% at 88% 12%, rgba(8, 168, 84, 0.10), transparent 68%),
    radial-gradient(ellipse 50% 60% at 4% 92%, rgba(178, 137, 66, 0.07), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 52px; align-items: center; }
.hero h1 {
  font-family: var(--serif); font-size: clamp(30px, 4vw, 46px);
  line-height: 1.35; font-weight: 700; letter-spacing: 0.01em; margin: 12px 0 16px;
}
.hero h1 .hero-title-sub {
  display: block; font-family: var(--sans); font-size: .55em; font-weight: 500;
  color: var(--green-deep); letter-spacing: .06em; margin-top: 8px; line-height: 1.5;
}
.hero-lead { font-size: 15.5px; color: var(--ink-2); max-width: 620px; line-height: 1.9; }
.hero-slogan {
  margin-top: 18px; padding-left: 16px; border-left: 3px solid var(--green);
  font-family: var(--serif); font-size: 16px; color: var(--ink); line-height: 1.8;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-source {
  margin-top: 20px; font-size: 11.5px; color: var(--ink-3); line-height: 1.7;
}
.hero-source a { color: var(--green-deep); text-decoration: underline; text-underline-offset: 2px; }

.qr-card { padding: 26px 24px 22px; text-align: center; box-shadow: var(--shadow-md); }
.qr-card h2 { font-size: 15px; font-weight: 700; }
.qr-card .qr-sub { font-size: 12px; color: var(--ink-3); margin: 4px 0 18px; }
.qr-frame {
  width: 176px; height: 176px; margin: 0 auto; border-radius: 12px;
  border: 1px dashed var(--line-strong); background: var(--surface-soft);
  display: grid; place-items: center; padding: 14px; overflow: hidden;
}
.qr-frame img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.qr-placeholder { color: var(--ink-3); }
.qr-placeholder .qr-glyph {
  width: 52px; height: 52px; margin: 0 auto 10px; border: 2px solid var(--line-strong);
  border-radius: 10px; position: relative;
}
.qr-placeholder .qr-glyph::before,
.qr-placeholder .qr-glyph::after {
  content: ''; position: absolute; width: 9px; height: 9px; border: 2px solid var(--line-strong); border-radius: 2px;
}
.qr-placeholder .qr-glyph::before { top: 8px; left: 8px; }
.qr-placeholder .qr-glyph::after { bottom: 8px; right: 8px; }
.qr-placeholder strong { display: block; color: var(--ink-2); font-size: 12.5px; }
.qr-placeholder span { display: block; font-size: 11px; margin-top: 4px; line-height: 1.6; }
.qr-card .qr-foot { margin-top: 16px; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }
.qr-card .qr-foot code { background: var(--surface-soft); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* 数据条 */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; margin-top: -26px; position: relative;
  box-shadow: var(--shadow-md);
}
.stat { background: var(--surface); padding: 20px 18px; text-align: center; }
.stat strong { display: block; font-family: var(--serif); font-size: 28px; color: var(--green-deep); line-height: 1.2; }
.stat span { font-size: 12px; color: var(--ink-2); }
.stat small { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }

/* 栏目卡片 */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.category-card {
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.category-card .cat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-index { font-family: var(--serif); font-size: 12px; color: var(--gold); letter-spacing: .08em; }
.cat-icon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft);
  color: var(--green-deep); display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.category-card h3 { font-family: var(--serif); font-size: 17px; }
.category-card p { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.category-card .cat-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--ink-3); }

/* 文章列表 */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
  padding: 16px; margin-bottom: 18px;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 12.5px; color: var(--ink-2); transition: all .18s;
}
.chip:hover { border-color: var(--green); color: var(--green-deep); }
.chip.is-active { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.search-box { position: relative; margin-left: auto; min-width: 220px; flex: 0 1 280px; }
.search-box input {
  width: 100%; padding: 9px 14px 9px 34px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--surface); font-size: 13px;
}
.search-box input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(8, 168, 84, .12); }
.search-box .search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 13px; }
.result-count { font-size: 12px; color: var(--ink-3); }

.article-list { display: grid; gap: 12px; }
.article-item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: start;
  padding: 20px 22px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.article-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.article-no {
  font-family: var(--serif); font-size: 22px; color: var(--line-strong);
  line-height: 1.3; text-align: center; padding-top: 2px;
}
.article-body h3 { font-family: var(--serif); font-size: 16.5px; line-height: 1.6; margin-bottom: 6px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 11.5px; color: var(--ink-3); margin-bottom: 8px; }
.article-body p { font-size: 13px; color: var(--ink-2); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-go {
  align-self: center; padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 12px; color: var(--green-deep); white-space: nowrap;
}
.article-go:hover { background: var(--green-soft); border-color: var(--green); }

/* 归档 */
.archive-group { margin-bottom: 12px; overflow: hidden; }
.archive-head {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  background: var(--surface); border: none; text-align: left; border-bottom: 1px solid var(--line);
}
.archive-head:hover { background: var(--surface-soft); }
.archive-head .cat-icon { width: 34px; height: 34px; font-size: 11px; }
.archive-head h3 { font-family: var(--serif); font-size: 16px; }
.archive-head .archive-count { font-size: 12px; color: var(--ink-3); margin-left: 4px; }
.archive-head .chevron { margin-left: auto; color: var(--ink-3); font-size: 13px; transition: transform .2s; }
.archive-head[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.archive-body { padding: 8px 20px 16px; background: var(--surface); }
.archive-entry {
  display: flex; align-items: baseline; gap: 14px; padding: 10px 0;
  border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.archive-entry:last-child { border-bottom: none; }
.archive-entry .entry-no { font-family: var(--serif); color: var(--gold); font-size: 12px; min-width: 42px; }
.archive-entry a { flex: 1; line-height: 1.7; }
.archive-entry a:hover { color: var(--green-deep); text-decoration: underline; text-underline-offset: 3px; }
.archive-entry .entry-date { font-size: 11px; color: var(--ink-3); white-space: nowrap; }

/* 作品 */
.works-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: 26px; margin-bottom: 20px;
  background: linear-gradient(120deg, #ffffff, var(--surface-tint));
}
.works-hero h3 { font-family: var(--serif); font-size: 21px; margin: 6px 0 8px; }
.works-hero p { font-size: 13px; color: var(--ink-2); max-width: 640px; line-height: 1.8; }
.works-hero .works-actions { display: flex; flex-direction: column; gap: 8px; }
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.work-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s, box-shadow .2s; }
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.work-card .work-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.port-badge { font-family: var(--serif); font-size: 12px; color: var(--gold); }
.status-badge { font-size: 10.5px; color: var(--green-deep); background: var(--green-soft); padding: 2px 8px; border-radius: 999px; }
.work-card h3 { font-family: var(--serif); font-size: 15px; line-height: 1.6; }
.work-card .work-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--green-deep); display: flex; justify-content: space-between; }

/* 关注 */
.follow-grid { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.follow-steps { display: grid; gap: 12px; }
.step-card { display: flex; gap: 16px; padding: 18px 20px; }
.step-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--green-soft); color: var(--green-deep); display: grid; place-items: center;
  font-family: var(--serif); font-size: 14px; font-weight: 700;
}
.step-card h3 { font-size: 15px; margin-bottom: 4px; }
.step-card p { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; }
.follow-aside { padding: 24px; box-shadow: var(--shadow-md); }
.follow-aside .qr-frame { width: 200px; height: 200px; }
.follow-aside h2 { font-family: var(--serif); font-size: 18px; margin-bottom: 6px; }
.follow-aside > p { font-size: 12.5px; color: var(--ink-2); margin-bottom: 18px; }
.pending-list { display: grid; gap: 8px; margin-top: 16px; }
.pending-item { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--ink-2); line-height: 1.7; }
.pending-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 8px; flex-shrink: 0; }
.pending-item code { background: var(--surface-soft); padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* 留言 */
.message-grid { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; }
.message-form { padding: 22px; }
.message-form h2 { font-family: var(--serif); font-size: 18px; margin-bottom: 6px; }
.message-form > p { font-size: 12.5px; color: var(--ink-2); margin-bottom: 18px; line-height: 1.8; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(8, 168, 84, .12); }
.field .field-hint { font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.form-actions { display: flex; align-items: center; gap: 12px; }
.char-count { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.message-list { display: grid; gap: 12px; }
.message-item { padding: 18px 20px; }
.message-item .msg-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.msg-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green-soft); color: var(--green-deep); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.msg-name { font-size: 13px; font-weight: 600; }
.msg-time { font-size: 11px; color: var(--ink-3); margin-left: auto; }
.message-item p { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.message-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.message-toolbar h2 { font-family: var(--serif); font-size: 18px; }
.message-toolbar .ghost-btn { font-size: 12px; }

/* 页脚 */
.site-footer { margin-top: 46px; background: #fff; border-top: 1px solid var(--line); }
.footer-block { padding: 30px 0; border-bottom: 1px solid var(--line); }
.footer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-block h2 { font-family: var(--serif); font-size: 18px; }
.footer-note { font-size: 12.5px; color: var(--ink-2); margin: 10px 0 14px; max-width: 780px; line-height: 1.85; }
.config-table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 12.5px; }
.config-table th, .config-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.config-table th { color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.config-table code { background: var(--surface-soft); padding: 1px 6px; border-radius: 4px; font-size: 11.5px; }
.config-state { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #fff4e2; color: #96631d; white-space: nowrap; }
.config-state.is-set { background: var(--green-soft); color: var(--green-deep); }
.sources-list { display: grid; gap: 8px; margin-top: 4px; }
.source-line { font-size: 12px; color: var(--ink-2); line-height: 1.75; padding-left: 14px; position: relative; }
.source-line::before { content: ''; position: absolute; left: 0; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.source-line cite { font-style: italic; }
.source-line a { color: var(--green-deep); word-break: break-all; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 20px 0 28px; font-size: 11.5px; color: var(--ink-3); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 80;
  box-shadow: var(--shadow-md);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.error-state { padding: 60px 24px; text-align: center; color: var(--ink-2); }
.error-state strong { display: block; font-size: 17px; color: var(--ink); margin-bottom: 8px; }

/* 响应式 */
@media (max-width: 1024px) {
  .hero-grid { gap: 32px; grid-template-columns: 1.1fr .9fr; }
  .category-grid, .works-grid { grid-template-columns: repeat(2, 1fr); }
  .follow-grid { grid-template-columns: 1fr 320px; }
  .message-grid { grid-template-columns: 330px 1fr; }
  .primary-nav a { padding: 8px 9px; }
}

@media (max-width: 860px) {
  .header-inner { gap: 12px; min-height: 62px; flex-wrap: wrap; }
  .nav-toggle { display: grid; }
  .header-cta { display: none; }
  .primary-nav {
    order: 3; flex-basis: 100%; margin: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px 0 14px; border-top: 1px solid var(--line);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 10px 14px; border-radius: 8px; }
  .hero { padding: 40px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .qr-card { max-width: 420px; margin: 0 auto; width: 100%; }
  .follow-grid, .message-grid { grid-template-columns: 1fr; }
  .follow-aside { max-width: 420px; }
  .message-form { max-width: 100%; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  body { font-size: 14px; }
  .hero h1 { font-size: 29px; }
  .hero h1 .hero-title-sub { font-size: .54em; margin-top: 6px; }
  .hero-lead { font-size: 14px; }
  .hero-slogan { font-size: 14px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); margin-top: -20px; }
  .stat { padding: 16px 10px; }
  .stat strong { font-size: 24px; }
  .category-grid, .works-grid { grid-template-columns: 1fr; }
  .section { padding: 30px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section-head h2 { font-size: 22px; }
  .toolbar { padding: 14px; }
  .search-box { margin-left: 0; flex: 1 1 100%; min-width: 0; }
  .article-item { grid-template-columns: 38px 1fr; gap: 12px; padding: 16px; }
  .article-no { font-size: 17px; }
  .article-go { grid-column: 2; justify-self: start; }
  .works-hero { grid-template-columns: 1fr; padding: 20px; }
  .works-hero .works-actions { flex-direction: row; flex-wrap: wrap; }
  .archive-head { padding: 14px; gap: 10px; }
  .archive-body { padding: 6px 14px 14px; }
  .archive-entry { flex-wrap: wrap; gap: 8px; }
  .archive-entry .entry-date { width: 100%; }
  .config-table th, .config-table td { padding: 8px 6px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
