/* 墨城公文写作 skill 三件套 · 官网样式
   配色取自技能图标：朱红 / 深棕 / 纸白 / 米白 */

:root {
  --red: #c0392b;
  --red-dark: #96281d;
  --brown: #3d2b1f;
  --ink: #2c231b;
  --paper: #ffffff;
  --cream: #f7f2ea;
  --cream-dark: #efe6d8;
  --line: #e3d9c8;
  --muted: #8a7a68;
  --ok: #2e7d32;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
}

/* ---------- 导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 3px solid var(--red);
}
[id] { scroll-margin-top: 72px; }
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); }
.brand-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--brown);
}
.brand-name small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 1px;
}
.nav { margin-left: auto; display: flex; gap: 4px; }
.menu-btn {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--brown); border-radius: 1px; transition: transform 0.18s ease, opacity 0.15s ease; }
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-btn:active { background: var(--cream); }
.nav a {
  padding: 7px 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
  border-radius: 4px;
}
.nav a:hover { background: var(--cream); color: var(--red); }
.nav a.active { background: var(--red); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 64px 24px 56px;
}
.hero-inner { max-width: 1080px; margin: 0 auto; }
.err-code {
  font-size: 84px;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
  letter-spacing: 3px;
  margin: 6px 0 8px;
}
.hero-tag {
  display: inline-block;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--red-dark);
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 40px;
  line-height: 1.3;
  color: var(--brown);
  font-weight: 800;
  margin-bottom: 16px;
}
.hero h1 em {
  font-style: normal;
  color: var(--red);
  border-bottom: 6px solid var(--cream-dark);
}
.hero p.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 640px;
  margin-bottom: 28px;
}
.about-intro p.lead { margin-bottom: 12px; }
.about-intro p.lead:last-child { margin-bottom: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn-ghost:hover { background: var(--cream-dark); }

/* ---------- 数字条 ---------- */
.stats-band {
  max-width: 1080px;
  margin: -34px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}
.stats-grid {
  background: var(--brown);
  color: #fff;
  border-radius: 6px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 22px 10px;
}
.stat { text-align: center; padding: 4px 10px; }
.stat b {
  display: block;
  font-size: 26px;
  color: #fff;
  line-height: 1.3;
}
.stat b i { font-style: normal; color: #e8a49c; font-size: 15px; margin-left: 2px; }
.stat span { font-size: 13px; color: #cfc3b3; }

/* ---------- 通用区块 ---------- */
section.block { max-width: 1080px; margin: 0 auto; padding: 56px 24px 8px; }
.block-head { margin-bottom: 30px; }
.block-head h2 {
  font-size: 26px;
  color: var(--brown);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}
.block-head h2::before {
  content: "";
  width: 8px;
  height: 26px;
  background: var(--red);
  border-radius: 2px;
  flex: none;
}
.block-head p { color: var(--muted); margin-top: 6px; font-size: 15px; }

/* ---------- 三件套卡片 ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(61,43,31,.10); transform: translateY(-2px); }
.card .role {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 8px;
}
.card .role img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  letter-spacing: 0;
}
.card h3 { font-size: 20px; color: var(--brown); margin-bottom: 4px; }
.card .ver {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 14px;
}
.card .ver b { color: var(--red-dark); }
.card p { font-size: 14.5px; color: var(--ink); flex: 1; }
.card ul { margin: 14px 0 18px; padding-left: 18px; font-size: 13.5px; color: var(--muted); }
.card ul li { margin: 4px 0; }
.card .card-link { font-size: 14px; color: var(--red); text-decoration: none; font-weight: 600; }
.card .card-link:hover { text-decoration: underline; }

/* ---------- 工作流 ---------- */
.flow { display: grid; grid-template-columns: 1fr 44px 1fr 44px 1fr; align-items: stretch; gap: 0; }
.flow-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
}
.flow-step .no {
  width: 34px; height: 34px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  line-height: 34px;
  margin: 0 auto 10px;
}
.flow-step h4 { color: var(--brown); font-size: 17px; margin-bottom: 6px; }
.flow-step p { font-size: 13.5px; color: var(--muted); }
.flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--red); font-size: 22px; font-weight: 700; }

/* ---------- 数据/特性 ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 6px;
  padding: 20px 22px;
}
.feat h4 { color: var(--brown); font-size: 16px; margin-bottom: 6px; }
.feat p { font-size: 14px; color: var(--muted); }
.feat p b { color: var(--ink); }
.feat-honest {
  background: var(--cream);
  border-color: #e3d6c2;
  border-left-color: var(--brown);
  box-shadow: 0 2px 10px rgba(61, 43, 31, 0.06);
}

/* ---------- 表格 ---------- */
table.tbl {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 14px;
}
.tbl th {
  background: var(--brown);
  color: #fff;
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
}
.tbl td { padding: 10px 14px; border-top: 1px solid var(--line); }
.tbl tr:nth-child(even) td { background: #fbf8f2; }

/* ---------- 代码 ---------- */
code, pre {
  font-family: Consolas, "JetBrains Mono", monospace;
  font-size: 13px;
}
code { background: var(--cream-dark); padding: 1px 6px; border-radius: 3px; color: var(--red-dark); }
pre {
  background: var(--brown);
  color: #f0e9df;
  padding: 16px 18px;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.6;
}
pre code { background: none; color: inherit; padding: 0; }

/* ---------- 提示框 ---------- */
.note {
  border: 1px solid var(--line);
  border-left: 5px solid #d9a441;
  background: #fdf7ea;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 14px;
  margin: 16px 0;
}
.note.danger { border-left-color: var(--red); background: #fbecea; }
.note.ok { border-left-color: var(--ok); background: #eef6ef; }
.note b:first-child { color: var(--brown); }
.note a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 对话示例 ---------- */

.chat {
  background: #fbf8f2;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 18px;
  margin: 14px 0;
}
.chat-line { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; }
.chat-line + .chat-line { border-top: 1px dashed var(--line); }
.chat-line .who {
  flex: none;
  width: 34px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.9;
  letter-spacing: 1px;
}
.chat-line.me .who { color: var(--red); }
.chat-line.ai .who { color: var(--muted); }
.chat-line .txt { flex: 1; font-size: 14.5px; line-height: 1.85; color: var(--ink); }
.chat-line.me .txt { color: var(--brown); font-weight: 600; }
.chat-line .txt code { font-size: 13px; }

.trio-tip { text-align: center; font-size: 13.5px; color: var(--muted); margin: -4px 0 6px; }
@media (max-width: 860px) { .trio-tip { text-align: left; } }

/* ---------- 教程截图 ---------- */

.shot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.shot {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(61, 43, 31, 0.08);
  background: var(--paper);
  cursor: zoom-in;
  transition: box-shadow 0.2s, transform 0.2s;
}
.shot:hover { box-shadow: 0 6px 20px rgba(61, 43, 31, 0.16); transform: translateY(-2px); }
.shot img { display: block; width: 100%; max-height: 300px; object-fit: cover; object-position: top center; }
.shot-pair .shot img { max-height: 230px; }
.shot figcaption {
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--cream);
  border-top: 1px solid var(--line);
}
.shot figcaption::after { content: "　·　点击图片可放大"; color: var(--red); opacity: 0.75; }
.shot-pair .shot { margin: 0; }
@media (max-width: 860px) { .shot-pair { grid-template-columns: 1fr; } }

/* ---------- 图片放大层 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 14, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 999;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.on { display: flex; }
.lightbox img {
  max-width: min(1280px, 94vw);
  max-height: 84vh;
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  background: var(--paper);
}
.lightbox .lb-cap { color: #f5ead8; margin-top: 12px; font-size: 14px; text-align: center; }
/* ---------- 关于我们 ---------- */
.about-head { display: flex; align-items: flex-start; gap: 28px; }
.avatar-lg {
  width: 132px;
  height: 132px;
  flex: 0 0 132px;
  border-radius: 50%;
  border: 3px solid var(--paper);
  box-shadow: 0 8px 26px rgba(61, 43, 31, 0.22);
  object-fit: cover;
  display: block;
}
.avatar-wrap { position: relative; flex: 0 0 132px; }
.badge-verified {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--paper);
  padding: 3px;
  box-shadow: 0 2px 8px rgba(61, 43, 31, 0.25);
}
.badge-verified img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.about-intro { flex: 1; min-width: 0; }
.about-intro h1 { margin: 6px 0 14px; }
.skill-lines { display: flex; flex-direction: column; gap: 10px; }
.skill-line {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.skill-line:hover { border-color: var(--red); box-shadow: 0 4px 16px rgba(61, 43, 31, 0.1); }
.skill-line img { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; }
.skill-line div { flex: 1; min-width: 0; }
.skill-line b { display: block; font-size: 15.5px; color: var(--brown); margin-bottom: 3px; }
.skill-line span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.skill-line em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-card {
  display: block;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.contact-card b { display: block; font-size: 13px; color: var(--red); letter-spacing: 0.5px; margin-bottom: 8px; }
.contact-card span { display: block; font-size: 18px; font-weight: 700; color: var(--brown); margin-bottom: 6px; word-break: break-all; user-select: all; }
.contact-card small { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
a.contact-card:hover { border-color: var(--red); }

/* 个人作品声明 */
.disclaimer {
  font-size: 13px;
  line-height: 1.9;
  color: #7a6552;
  background: var(--cream);
  border: 1px dashed #ddcdb6;
  border-radius: 6px;
  padding: 12px 16px;
}
@media (max-width: 860px) {
  .about-head { flex-direction: column; gap: 18px; align-items: center; text-align: center; }
  .avatar-wrap { flex-basis: 104px; }
  .avatar-lg { width: 104px; height: 104px; }
  .badge-verified { width: 30px; height: 30px; right: -5px; bottom: -5px; }
  .skill-line { flex-wrap: wrap; gap: 12px; }
  .skill-line em { margin-left: auto; }
  .contact-cards { grid-template-columns: 1fr; }
}

/* ---------- 更新日志 ---------- */
.log-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 28px;
  margin-bottom: 20px;
}
.log-item h3 {
  font-size: 19px;
  color: var(--brown);
  margin-bottom: 2px;
}
.log-item h3 .chip {
  display: inline-block;
  vertical-align: 3px;
  font-size: 12px;
  background: var(--red);
  color: #fff;
  border-radius: 4px;
  padding: 2px 10px;
  margin-left: 10px;
  font-weight: 600;
}
.log-item h3 .chip.gray { background: var(--muted); }
.log-date { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.log-item ul, .log-item ol { padding-left: 22px; font-size: 14.5px; margin: 8px 0; }
.log-item li { margin: 5px 0; }
.log-item h4 {
  font-size: 15px;
  color: var(--red-dark);
  margin: 14px 0 6px;
}

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 12px;
  padding: 16px 20px;
}
.faq-item h4 { color: var(--brown); font-size: 15.5px; margin-bottom: 6px; }
.faq-item p { font-size: 14px; color: var(--muted); }
.faq-item p b { color: var(--ink); }

/* ---------- 下载卡 ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.dl-card .icon { font-size: 34px; margin-bottom: 8px; }
.dl-card .icon img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.sec-title { display: flex; align-items: center; gap: 14px; }
.sec-title img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex: none;
}
.dl-card h4 { color: var(--brown); font-size: 17px; }
.dl-card .ver { color: var(--red-dark); font-weight: 700; font-size: 14px; margin: 4px 0 10px; }
.dl-card p { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.dl-card a {
  display: inline-block;
  background: var(--brown);
  color: #fff;
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}
.dl-card a:hover { background: var(--red); }
.dl-pending {
  display: inline-block;
  padding: 9px 18px;
  border: 1px dashed #c9b8a4;
  border-radius: 4px;
  background: var(--cream);
  color: #96836f;
  font-size: 13.5px;
  font-weight: 600;
  cursor: not-allowed;
  user-select: none;
}

/* ---------- 页脚 ---------- */
footer {
  margin-top: 70px;
  background: var(--brown);
  color: #cfc3b3;
  padding: 34px 24px;
  font-size: 13.5px;
}
.foot-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
}
.foot-brand { line-height: 1.75; }
.foot-brand span { color: #b5a390; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.foot-nav a {
  color: #e8a49c;
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 4px;
}
.foot-nav a:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.foot-meta { color: #a4927e; font-size: 12.5px; line-height: 1.9; }
.foot-safe {
  text-align: center;
  font-size: 12px;
  color: rgba(245, 234, 216, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 22px;
  padding: 14px 20px 0;
}
.to-top { color: #e8a49c; text-decoration: none; }
.to-top:hover { color: #fff; }
footer b { color: #fff; }
footer a { color: #e8a49c; text-decoration: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .trio, .dl-grid, .feat-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; padding: 20px 6px; }
  .stat { padding: 4px 6px; }
  .stat span { overflow-wrap: anywhere; }
  .topbar-inner { min-width: 0; }
  .brand { min-width: 0; }
  .brand-name { min-width: 0; overflow: hidden; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: 6px 0; }
  .hero h1 { font-size: 30px; }
  .err-code { font-size: 62px; }
  .menu-btn { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 18px rgba(61, 43, 31, 0.10);
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px 12px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 16px; }

  /* 手机版顶部 */
  .topbar-inner { padding: 0 16px; height: 58px; gap: 12px; }
  .brand img { width: 34px; height: 34px; }
  .brand-name { font-size: 15.5px; }
  .brand-name small { font-size: 9.5px; letter-spacing: 0.6px; }
  .menu-btn { width: 38px; height: 38px; }

  /* 手机版底部 */
  footer { margin-top: 46px; padding: 26px 20px 30px; font-size: 13px; }
  .foot-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .foot-brand { order: 1; }
  .foot-meta { order: 2; }
  .foot-nav {
    order: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding-top: 12px;
    margin-top: 2px;
  }
  .foot-nav a { padding: 10px 6px; font-size: 14px; }
}
