/* =====================================================================
   Craft 系列国产系统适配 · 统一样式（升级版 / 2026-10-23）
   设计语言：暖米白底 + 黄铜金强调 + 近黑墨色，柔和阴影分层、克制留白
   ===================================================================== */

:root {
  --ink: #1f1d1a;
  --ink-2: #57534d;
  --ink-3: #8a8580;
  --line: #e8e4dc;
  --line-2: #d8d3c8;
  --paper: #f7f5f0;
  --card: #ffffff;
  --accent: #a07e34;
  --accent-deep: #7c6224;
  --accent-soft: #f6efe1;
  --accent-line: #e7dcc4;
  --ok: #1f7d3f;
  --ok-bg: #eef6f0;
  --warn: #9a6a14;
  --warn-bg: #faf3e4;
  --mono: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --accent-grad: linear-gradient(135deg, #b8924a 0%, #8a6d28 100%);
  --ink-grad: linear-gradient(180deg, #2c2a27 0%, #141312 100%);
  --shadow-sm: 0 1px 2px rgba(31,29,26,.04), 0 1px 3px rgba(31,29,26,.06);
  --shadow-md: 0 2px 4px rgba(31,29,26,.05), 0 10px 24px -12px rgba(31,29,26,.22);
  --shadow-lg: 0 10px 18px -8px rgba(31,29,26,.16), 0 22px 44px -18px rgba(31,29,26,.26);
  --maxw: 52rem;
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background-color: var(--paper);
  background-image: radial-gradient(1200px 560px at 50% -10%, #fffdf7 0%, rgba(255,253,247,0) 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  font-size: 16px;
  overflow-x: clip;
}

::selection { background: rgba(160,126,52,.22); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: border-color .15s, color .15s;
}
a:hover { border-bottom-color: var(--accent-deep); color: var(--accent); }

/* ---------- 页眉 ---------- */
header {
  border-bottom: 1px solid var(--line);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, #b8924a, #e6c878, #8a6d28) 1;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
}
.head-left { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }
.brand { font-size: 1.0625rem; font-weight: 700; letter-spacing: .01em; }
.brand .dot { color: var(--accent); }
.back-home { font-size: .8125rem; color: var(--ink-3); border-bottom: none; }
.back-home:hover { color: var(--ink); }
.head-meta { font-size: .8125rem; color: var(--ink-3); font-family: var(--mono); letter-spacing: .02em; }

/* ---------- 首屏 ---------- */
.hero { padding: 3.5rem 0 4rem; text-align: center; }
.hero .tag {
  display: inline-block;
  font-size: .8125rem;
  color: var(--accent-deep);
  font-family: var(--mono);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: .28rem .8rem;
  border-radius: 99px;
  letter-spacing: .04em;
  margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: .25rem auto 1.4rem;
  max-width: 44rem;
}
.hero p { max-width: 40rem; margin-left: auto; margin-right: auto; color: var(--ink-2); }
.hero .lead { margin-bottom: .85rem; font-size: 1.0625rem; }

.num-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem 2.25rem;
  margin-top: 2.5rem;
  font-size: .8125rem;
  color: var(--ink-3);
  font-family: var(--mono);
}
.num-line b { color: var(--ink); font-weight: 700; font-size: 1.05rem; }

.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem; margin-top: 2.5rem; }

.btn-primary {
  display: inline-block;
  background: var(--ink-grad);
  color: #fff;
  padding: .85rem 2.1rem;
  border-radius: 9px;
  border: none;
  font-size: 1rem;
  letter-spacing: .04em;
  box-shadow: var(--shadow-md);
  transition: transform .18s ease, box-shadow .18s ease, background .18s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; border-bottom: none; }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--ink-2);
  padding: .85rem .25rem;
  border-bottom: none;
  font-size: .9375rem;
  transition: color .15s;
}
.btn-ghost:hover { color: var(--ink); }

.meta-line { margin-top: 1.5rem; font-size: .8125rem; color: var(--ink-3); font-family: var(--mono); text-align: center; }

/* ---------- 章节通用 ---------- */
section { border-top: 1px solid var(--line); padding: 3.5rem 0; }
.sec-head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.9rem; }
.sec-head .no {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 99px;
  padding: .22rem .7rem;
  flex: none;
}
.sec-head h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: .01em; }

.note {
  border-left: 3px solid var(--accent-line);
  padding: .4rem 0 .4rem 1.15rem;
  color: var(--ink-2);
  font-size: .875rem;
  margin-top: 1.6rem;
  line-height: 1.8;
}

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: .75rem; }
.card p, .card li { color: var(--ink-2); font-size: .9375rem; }
.card p + p { margin-top: .5rem; }

.pill {
  display: inline-block;
  font-size: .75rem;
  padding: .12rem .6rem;
  border-radius: 99px;
  border: 1px solid currentColor;
  margin-left: .6rem;
  vertical-align: 2px;
  font-weight: 400;
}
.pill.gold { color: var(--accent); }

/* ---------- 列表 ---------- */
ul.plain { list-style: none; }
ul.plain li { padding-left: 1.15em; position: relative; color: var(--ink-2); font-size: .9375rem; }
ul.plain li::before {
  content: "";
  position: absolute;
  left: 0; top: .82em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
ul.plain li + li { margin-top: .4rem; }

/* ---------- 应用索引（主页） ---------- */
.app-list { display: flex; flex-direction: column; gap: 1rem; }
.app-card {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.app-mark {
  justify-self: center;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #faf7f0, #efeadf);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.app-mark svg { display: block; }
.app-body .app-name { font-size: 1.15rem; font-weight: 700; }
.app-body .app-name .arrow { color: var(--accent); font-family: var(--mono); margin-left: .35rem; }
.app-body p { font-size: .875rem; color: var(--ink-2); margin-top: .35rem; line-height: 1.75; }
.app-body .app-meta {
  font-size: .75rem;
  color: var(--ink-3);
  font-family: var(--mono);
  margin-top: .55rem;
}
.app-body .app-meta span + span::before { content: " · "; }
.app-state { text-align: right; white-space: nowrap; }
.app-state .mark { font-size: .8125rem; font-weight: 600; }
.app-state .mark.yes { color: var(--ok); }
.app-state .mark.todo { color: var(--warn); }
.app-state .sub { font-size: .75rem; color: var(--ink-3); margin-top: .25rem; }
.app-card.plain { opacity: .9; }
.app-card.plain .app-name { color: var(--ink-2); }

/* ---------- 表格 / 进度条 ---------- */
.table-scroll { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); font-size: .9375rem; vertical-align: top; }
th { background: linear-gradient(180deg, #f5f2eb, #efece4); font-weight: 700; white-space: nowrap; color: var(--ink); }
tr:last-child td { border-bottom: none; }
tbody tr:not(.ours):hover td { background: #fcfbf7; }
td .en { color: var(--ink-3); font-size: .8125rem; font-family: var(--mono); }
.pbar { display: flex; align-items: center; gap: .6rem; min-width: 9rem; }
.pbar .track { flex: 1; height: 6px; background: #ece9e2; border-radius: 3px; overflow: hidden; }
.pbar .fill { height: 100%; background: var(--accent-grad); border-radius: 3px; }
.pbar .num { font-size: .8125rem; color: var(--ink-2); font-family: var(--mono); white-space: nowrap; }
tr.ours td { background: #fbf8f1; }
tr.ours:hover td { background: #f7f1e3; }
tr.ours td:first-child { border-left: 3px solid var(--accent); }
.tag-mine {
  display: inline-block;
  font-size: .6875rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 99px;
  padding: 0 .5rem;
  margin-left: .45rem;
  vertical-align: 1px;
  white-space: nowrap;
  font-weight: 600;
}

/* ---------- 对标进度（子页） ---------- */
.base-note { font-size: .8125rem; color: var(--ink-3); margin-bottom: 1.5rem; line-height: 1.8; }
.status { white-space: nowrap; font-size: .8125rem; font-weight: 600; }
.status.yes { color: var(--ok); }
.status.no { color: var(--ink-3); }

/* ---------- 统计块 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.75rem; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat .v { font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: var(--ink); }
.stat .v small { font-size: .875rem; font-weight: 400; color: var(--ink-3); }
.stat .k { font-size: .8125rem; color: var(--ink-2); margin-top: .35rem; }
.stat .s { font-size: .75rem; color: var(--ink-3); margin-top: .15rem; font-family: var(--mono); }

/* ---------- 测试情况 ---------- */
.os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.os { border-radius: var(--radius); padding: 1.4rem 1.5rem; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
.os.ok { background: var(--ok-bg); border-color: #d3e6d8; border-left: 3px solid var(--ok); }
.os.todo { background: var(--warn-bg); border-color: #eadfc4; border-left: 3px solid var(--warn); }
.os .os-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.os h3 { font-size: 1rem; font-weight: 700; }
.os .mark { font-size: .8125rem; white-space: nowrap; font-weight: 600; }
.os.ok .mark { color: var(--ok); }
.os.todo .mark { color: var(--warn); }
.os ul { margin-top: .8rem; }
.os li { font-size: .875rem; color: var(--ink-2); }

/* ---------- 介绍双栏 ---------- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.intro-grid .card { margin-bottom: 0; }
.intro-grid .card h3 { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ---------- 下载 ---------- */
.dl-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.dl-guide { padding: 1.2rem 1.6rem; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); }
.dl-guide p { font-size: .875rem; color: var(--ink-2); line-height: 1.8; }
.dl-guide p + p { margin-top: .4rem; }
.dl-guide b { color: var(--ink); font-weight: 700; }
.dl-guide code { font-family: var(--mono); font-size: .8125rem; background: #fff; border: 1px solid var(--accent-line); padding: .04rem .4rem; border-radius: 4px; color: var(--accent-deep); }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.6rem; flex-wrap: wrap; }
.dl-row + .dl-row { border-top: 1px solid var(--line); }
.dl-row .t { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; font-size: 1.0625rem; font-weight: 700; }
.dl-row .d { font-size: .8125rem; color: var(--ink-3); margin-top: .5rem; font-family: var(--mono); }
.dl-row .arch-tag {
  flex: none;
  font-family: var(--mono);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: #fff;
  background: var(--ink);
  padding: .2rem .65rem;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.dl-row .arch-tag.arm { background: var(--accent-grad); }
.dl-row .arch-tag.wait { background: #b0ada7; }
.dl-row .hint { font-size: .875rem; color: var(--ink-2); margin-top: .35rem; }
.dl-row .hint b { font-weight: 700; color: var(--ink); }

.btn-dl {
  display: inline-block;
  background: var(--accent-grad);
  color: #fff;
  border: none;
  padding: .7rem 1.8rem;
  border-radius: 9px;
  font-size: .9375rem;
  letter-spacing: .04em;
  cursor: pointer;
  box-shadow: 0 2px 6px -2px rgba(138,109,40,.5), 0 8px 16px -8px rgba(138,109,40,.55);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn-dl:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 4px 10px -2px rgba(138,109,40,.55), 0 14px 24px -10px rgba(138,109,40,.7); border-bottom: none; color: #fff; }
.btn-dl:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn-dl[disabled] { background: #b9b6b0; box-shadow: none; cursor: not-allowed; transform: none; }

.dl-foot { padding: 1rem 1.6rem 1.3rem; border-top: 1px solid var(--line); background: #fbfaf8; }
.dl-foot p { font-size: .8125rem; color: var(--ink-3); line-height: 1.7; }
.dl-foot p + p { margin-top: .35rem; }

/* ---------- 版权 / 法律 ---------- */
.legal .card p { font-size: .875rem; }
.legal strong { color: var(--ink); font-weight: 700; }

/* ---------- 页脚 ---------- */
footer { border-top: 1px solid var(--line); padding: 3rem 0 3.5rem; margin-top: 1rem; }
footer .cols { display: flex; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap; }
footer .f-brand { font-weight: 700; font-size: .95rem; }
footer p, footer li { font-size: .8125rem; color: var(--ink-3); line-height: 1.7; }
footer ul { list-style: none; margin-top: .5rem; }
footer li + li { margin-top: .2rem; }
.copyright {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .8125rem;
  color: var(--ink-3);
  text-align: center;
  font-family: var(--mono);
}

/* ---------- 入场动效（克制） ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero .tag, .hero h1, .hero p, .hero .num-line, .hero .actions, .hero .meta-line {
  animation: rise .55s cubic-bezier(.2,.7,.3,1) both;
}
.hero h1 { animation-delay: .06s; }
.hero p { animation-delay: .12s; }
.hero .num-line, .hero .actions, .hero .meta-line { animation-delay: .18s; }

/* ---------- 响应式 ---------- */
@media (max-width: 680px) {
  .wrap { padding: 0 1.1rem; overflow-wrap: break-word; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .hero p { font-size: .9375rem; }
  section { padding: 2.75rem 0; }
  .sec-head { margin-bottom: 1.5rem; }
  .app-card { grid-template-columns: 1fr; gap: 1rem; padding: 1.3rem; }
  .app-mark { justify-self: start; }
  .app-state { text-align: left; white-space: normal; }
  .app-state .sub { white-space: normal; }
  .intro-grid, .os-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .num-line { gap: .5rem 1.5rem; font-size: .75rem; }
  th, td { padding: .7rem .75rem; }
  .actions { margin-top: 1.75rem; }
  .btn-primary { width: 100%; text-align: center; }
  .dl-row { align-items: flex-start; flex-direction: column; gap: .85rem; }
  .dl-row .btn-dl { width: 100%; text-align: center; }
}

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