/* 中文首页：朱红与金色、宣纸底色、宋体标题、印章标志、回纹边饰 */
:root {
  --bg: #fbf6ec;
  --card: #fffdf8;
  --text: #2a1d17;
  --muted: #7a6a5c;
  --line: #ecdcc4;
  --red: #b8231b;
  --gold: #c99a2e;
  --accent: var(--red);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1210;
    --card: #241a16;
    --text: #f3e9dc;
    --muted: #b8a796;
    --line: #3d2d24;
    --accent: #ef6b5d;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1210;
  --card: #241a16;
  --text: #f3e9dc;
  --muted: #b8a796;
  --line: #3d2d24;
  --accent: #ef6b5d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* 回纹边饰 */
.huiwen {
  height: 14px;
  background-color: var(--red);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M1 13V1h12v9H5V5h4' fill='none' stroke='%23e9c46a' stroke-width='1.6'/%3E%3Cpath d='M15 13V1h12v9h-8V5h4' fill='none' stroke='%23e9c46a' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
}

.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  font-size: 0.85rem;
}
.topbar a { color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--accent); text-decoration: underline; }

.hero {
  text-align: center;
  padding: 26px 0 30px;
}
.seal { width: 84px; height: 84px; display: block; margin: 0 auto 16px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  letter-spacing: 0.12em;
  margin: 0;
}
.hero .brand-latin {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 8px 0 0;
  font-weight: 600;
}
.hero .lead {
  font-family: var(--serif);
  color: var(--muted);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  margin: 14px 0 0;
}
.yunwen {
  margin: 20px auto 0;
  width: 180px;
  height: 14px;
  color: var(--gold);
}

.section { margin-top: 34px; }
.section h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin: 0 0 14px;
}
.section h2 .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--red);
  color: #fff7e6;
  border-radius: 4px;
  font-size: 1rem;
  letter-spacing: 0;
  flex: none;
}
.section h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.tool {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tool:hover {
  border-color: var(--red);
  box-shadow: 0 6px 18px rgba(184, 35, 27, 0.12);
}
.tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tool-icon {
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--gold);
}
.tool-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tool-title { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; letter-spacing: 0.04em; }
.tool-desc { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.blog {
  margin-top: 40px;
  padding: 20px 22px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
}
.blog h2 { font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.1em; margin: 0 0 6px; }
.blog p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.blog a { color: var(--accent); font-weight: 600; }

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 40px;
  line-height: 1.9;
}
.footer a { color: inherit; }
