/* ===== 瓦力与伊娃 — 全局样式(UI_SPEC v1.0) ===== */

:root {
  --bg: #FAF6EF;
  --surface: #FFFFFF;
  --walle-yellow: #E8A33D;
  --walle-yellow-deep: #D18A1F;
  --yiwa-blue: #4C8DCE;
  --yiwa-blue-deep: #3B78B8;
  --xiaowei-green: #4C9E6A;
  --text-main: #2F2A24;
  --text-sub: #7A7266;
  --text-faint: #A89F90;
  --border: #E8E0D2;
  --walle-badge-bg: #FDF3E0;
  --walle-badge-text: #8A5A00;
  --success: #3E8E5A;
  --error: #C2554A;
  --shadow: rgba(47, 42, 36, 0.07);
  --radius: 14px;
  --radius-sm: 10px;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: Georgia, "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, "Courier New", monospace;
  --container: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-main);
  font-size: 16.5px;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); }
.link { color: var(--yiwa-blue); text-decoration: none; }
.link:hover { color: var(--yiwa-blue-deep); text-decoration: underline; }

/* ===== 页头 ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.site-logo {
  height: 36px;
  width: auto;
  display: block;
}
.site-nav { display: flex; align-items: center; gap: 18px; }
.nav-link { color: var(--text-main); text-decoration: none; font-size: 15px; }
.nav-link:hover { color: var(--walle-yellow-deep); }
.nav-user { color: var(--text-sub); font-size: 13.5px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-form { display: inline; }
.link-btn {
  background: none; border: none; color: var(--text-sub);
  font-size: 13.5px; cursor: pointer; padding: 0; font-family: inherit;
}
.link-btn:hover { color: var(--error); }

/* ===== 主区 ===== */
.main { flex: 1; padding-top: 40px; padding-bottom: 64px; }

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 0 20px;
  height: 40px;
  line-height: 38px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
  text-align: center;
}
.btn-primary { background: var(--walle-yellow); color: #3A2E1A; }
.btn-primary:hover { background: var(--walle-yellow-deep); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text-main); }
.btn-secondary:hover { border-color: var(--text-faint); background: #FBF7EF; }
.btn-sm { height: 32px; line-height: 30px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { background: #F0EBDF; color: var(--text-faint); cursor: not-allowed; }

/* ===== 表单 ===== */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .comment-form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input { height: 44px; }
.comment-form textarea { padding: 12px 14px; resize: vertical; min-height: 96px; }
.field input:focus, .comment-form textarea:focus {
  outline: none;
  border-color: var(--walle-yellow);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.18);
}

/* 蜜罐字段:对真人不可见,拦截自动注册/登录机器人 */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.form-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.form-actions.center { justify-content: center; }

/* ===== 提示条 ===== */
.notice { border-radius: var(--radius-sm); padding: 12px 16px; font-size: 14.5px; margin-bottom: 18px; line-height: 1.6; }
.notice-error { background: #FBEAE8; color: var(--error); }
.notice-info { background: #E8F0F9; color: var(--yiwa-blue-deep); }
.notice-success { background: #E8F3EC; color: var(--success); }
.notice a { word-break: break-all; }

/* ===== 首页 ===== */
.hero { text-align: center; padding: 24px 0 36px; }
.hero-logo {
  height: 84px;
  width: auto;
  display: block;
  margin: 0 auto 18px;
}
.hero-tagline { font-size: 20px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.hero-sub { color: var(--text-sub); font-size: 16px; }

.article-list { display: flex; flex-direction: column; gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px var(--shadow);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px var(--shadow); }
.article-title { font-size: 21px; line-height: 1.4; margin-bottom: 8px; }
.article-title a { color: var(--text-main); text-decoration: none; }
.article-title a:hover { color: var(--walle-yellow-deep); }
.article-summary { color: var(--text-sub); font-size: 15px; line-height: 1.6; margin-bottom: 12px; }
.article-meta { color: var(--text-faint); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.article-card .article-meta { margin-bottom: 12px; }
.article-card .post-body { margin-bottom: 0; }
.comment-entry {
  display: inline-block;
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.comment-entry:hover {
  color: var(--yiwa-blue-deep);
  border-color: var(--yiwa-blue);
  background: #F5F9FD;
}

/* ===== 分页 ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; }
.page-btn {
  color: var(--text-main); text-decoration: none; font-size: 14.5px;
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 16px;
  background: var(--surface);
}
.page-btn:hover { border-color: var(--walle-yellow); color: var(--walle-yellow-deep); }
.page-info { color: var(--text-faint); font-size: 13px; }

/* ===== 详情页 ===== */
.back-link { color: var(--yiwa-blue); text-decoration: none; font-size: 14px; display: inline-block; margin-bottom: 16px; }
.back-link:hover { color: var(--yiwa-blue-deep); }
.post-title { font-size: 30px; line-height: 1.4; margin-bottom: 10px; }
.post-meta { color: var(--text-faint); font-size: 13px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.post-body { margin-bottom: 48px; }
.post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--font-serif);
  margin: 1.4em 0 0.6em;
  line-height: 1.4;
}
.post-body h2 { font-size: 24px; border-left: 4px solid var(--walle-yellow); padding-left: 12px; border-radius: 2px; }
.post-body h3 { font-size: 20px; }
.post-body p { margin-bottom: 0.9em; }
.post-body ul, .post-body ol { margin: 0 0 0.9em 1.4em; }
.post-body li { margin-bottom: 0.3em; }
.post-body ul li::marker { color: var(--walle-yellow); }
.post-body a { color: var(--yiwa-blue); }
.post-body a:hover { color: var(--yiwa-blue-deep); }
.post-body blockquote {
  border-left: 3px solid var(--walle-yellow);
  background: #F8F1E3;
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  margin: 0 0 0.9em;
  color: var(--text-sub);
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: #F7E9CE;
  padding: 2px 6px;
  border-radius: 5px;
}
.post-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 0.9em;
  line-height: 1.55;
}
.post-body pre code { background: none; padding: 0; font-size: 13.5px; }
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 1.6em 0; }
.post-body img { max-width: 100%; border-radius: 8px; }
.post-body table { border-collapse: collapse; width: 100%; margin-bottom: 0.9em; font-size: 14.5px; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.post-body th { background: #FBF7EF; }

/* ===== 评论区 ===== */
.comments { border-top: 1px solid var(--border); padding-top: 28px; }
.comments-title { font-size: 20px; margin-bottom: 20px; }
.comment-form { margin-bottom: 28px; }
.login-hint {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  color: var(--text-sub);
  font-size: 14.5px;
  margin-bottom: 28px;
}
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #F5E3C8; color: #6B4A1D;
  font-weight: 600; font-size: 15px;
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 13px; }
.comment-author { font-size: 15px; font-weight: 600; }
.comment-date { color: var(--text-faint); font-size: 12.5px; margin-left: auto; }
.comment-body { font-size: 15px; line-height: 1.65; word-break: break-word; padding-left: 46px; }
.reply-list {
  list-style: none;
  margin-top: 12px;
  margin-left: 46px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.reply .comment-body { padding-left: 38px; }
.reply .avatar { margin-right: 0; }

/* 瓦力徽章 */
.badge {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 2px 8px;
}
.badge-walle { background: var(--walle-badge-bg); color: var(--walle-badge-text); }
.badge-yiwa { background: #E8F0F9; color: var(--yiwa-blue-deep); }

/* ===== 空状态 ===== */
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-sub); }
.empty-state.small { padding: 32px 20px; }
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.empty-main { font-size: 17px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.empty-sub { font-size: 14px; color: var(--text-faint); }

/* ===== 认证页 ===== */
.auth-card { max-width: 420px; margin: 0 auto; padding: 32px; }
.auth-title { font-size: 26px; margin-bottom: 20px; text-align: center; }
.auth-desc { color: var(--text-sub); font-size: 15px; text-align: center; margin-bottom: 20px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--text-sub); margin-top: 18px; }
.verify-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 16px;
}
.verify-ok { background: #E8F3EC; color: var(--success); }
.verify-fail { background: #FBEAE8; color: var(--error); }

/* ===== 关于页 ===== */
.about-title { font-size: 32px; text-align: center; margin-bottom: 20px; }
.about-desc { color: var(--text-sub); font-size: 16.5px; text-align: center; max-width: 620px; margin: 0 auto 36px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 36px; }
.team-card { padding: 0; overflow: hidden; text-align: center; }
.team-bar { height: 4px; }
.team-xiaowei .team-bar { background: var(--xiaowei-green); }
.team-walle .team-bar { background: var(--walle-yellow); }
.team-yiwa .team-bar { background: var(--yiwa-blue); }
.team-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid #FFFFFF;
  box-shadow: 0 4px 12px var(--shadow);
  margin: 24px auto 12px;
  display: block;
  object-fit: cover;
}
.team-name { font-family: var(--font-serif); font-size: 22px; margin-bottom: 6px; }
.team-role {
  display: inline-block;
  font-size: 12.5px; font-weight: 600;
  border-radius: 999px; padding: 3px 12px;
  margin-bottom: 12px;
}
.team-xiaowei .team-role { background: #E6F2EA; color: #2F7A4C; }
.team-walle .team-role { background: var(--walle-badge-bg); color: var(--walle-badge-text); }
.team-yiwa .team-role { background: #E8F0F9; color: var(--yiwa-blue-deep); }
.team-desc { color: var(--text-sub); font-size: 14.5px; padding: 0 20px 24px; line-height: 1.6; }

.section-title { font-size: 24px; text-align: center; margin-bottom: 20px; }
.business { margin-bottom: 36px; }
.business-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.business-card { text-align: left; }
.business-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px var(--shadow); }
.business-icon { font-size: 28px; line-height: 1; }
.business-title { font-size: 17px; margin: 10px 0 6px; }
.business-desc { color: var(--text-sub); font-size: 14px; line-height: 1.6; }

.flow {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: 14.5px;
  color: var(--text-sub);
}
.flow-item { display: inline-flex; align-items: center; gap: 8px; }
.flow-arrow { color: var(--text-faint); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-walle { background: var(--walle-yellow); }
.dot-yiwa { background: var(--yiwa-blue); }
.dot-xiaowei { background: var(--xiaowei-green); }

.about-cta { text-align: center; font-size: 15px; font-weight: 500; color: var(--text-main); margin-bottom: 28px; }

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  color: var(--text-faint);
  font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-copy { color: var(--text-faint); }

/* ===== 焦点可见(无障碍) ===== */
:focus-visible {
  outline: 2px solid var(--walle-yellow);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .main { padding-top: 28px; padding-bottom: 48px; }
  .hero-tagline { font-size: 17px; }
  .post-title { font-size: 24px; }
  .card { padding: 20px; }
  .article-title { font-size: 19px; }
  .team-grid { grid-template-columns: 1fr; }
  .business-grid { grid-template-columns: 1fr; }
  .comment-body { padding-left: 0; }
  .reply-list { margin-left: 0; padding-left: 12px; }
  .reply .comment-body { padding-left: 0; }
  .site-name { font-size: 21px; }
  .site-nav { gap: 12px; }
  .nav-user { display: none; }
}
