/* ═══════════════ 走路机器族谱(tree.html, 10-20 本机草稿) ═══════════════
   手机竖屏优先: 内容最宽 680px, 正文 16px; 不横向滚动(网格一律 minmax(0,1fr) / auto-fill, 长代号可断行);
   没有浮在内容上面的半透明层(语言按钮在页头里, 不 fixed)。
   颜色照 calm.css 的灰白 + 一个蓝: 外壳中性灰, 状态只当小圆点; 模型图本身是最彩的东西。 */

:root {
  --wt-bg: #f6f7f8;
  --wt-card: #ffffff;
  --wt-ink: #23272e;
  --wt-mut: #5f6670;
  --wt-line: #dcdfe4;
  --wt-line2: #b9bec6;
  --wt-rail: #c6cbd2;
  --wt-acc: #0b6ec5;
  --wt-acc-t: #e8f1fb;
  --wt-red: #d23f31;
  --wt-amb: #c98612;
  --wt-grn: #2f8a46;
  --wt-gray: #8a9099;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.wt {
  margin: 0; background: var(--wt-bg); color: var(--wt-ink);
  font: 400 16px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html:lang(en) body.wt { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.wt [hidden] { display: none !important; }
.wt-main { max-width: 680px; margin: 0 auto; padding: 14px 16px 56px; }
.wt-fail { color: var(--wt-red); }

/* ---------- 页头 ---------- */
.wt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wt-brand { display: flex; align-items: center; gap: 8px; color: var(--wt-mut); font-size: 15px; }
.wt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wt-acc); }
.wt-lang {
  min-width: 52px; height: 38px; padding: 0 14px; border-radius: 19px;
  background: var(--wt-card); border: 1px solid var(--wt-line); color: var(--wt-mut);
  font: 600 15px/1 inherit; cursor: pointer;
}
.wt-lang:hover { color: var(--wt-ink); border-color: var(--wt-line2); }
.wt-title { margin: 18px 0 4px; font-size: clamp(28px, 7vw, 38px); line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.wt-headline { margin: 0 0 8px; font-size: clamp(20px, 5.2vw, 26px); line-height: 1.35; font-weight: 700; color: var(--wt-acc); }
.wt-sub { margin: 0 0 12px; color: var(--wt-mut); font-size: 16px; }
.wt-ranks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 15px; color: var(--wt-mut); }
.wt-ranks b { color: var(--wt-ink); font-weight: 600; margin-right: 2px; }
.wt-ranks span { padding: 1px 9px; border: 1px solid var(--wt-line); border-radius: 12px; background: var(--wt-card); color: var(--wt-ink); }
.wt-ranks i { font-style: normal; color: var(--wt-gray); }
.wt-count { margin: 0; font-size: 15px; color: var(--wt-mut); }

.wt-h2 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }

/* ---------- 两条路 ---------- */
.wt-routes { margin: 18px 0 0; }
.wt-route { background: var(--wt-card); border: 1px solid var(--wt-line); border-radius: 14px; padding: 12px; margin-top: 8px; }
.wt-route h3 { margin: 0 0 8px; font-size: 17px; }
/* 一条路 = 一串小图卡(编号 + 代表图 + 多了什么), 手机一行四张, 自己折行, 不横向滚 */
.wt-rchain { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .wt-rchain { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }
.wt-rs {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid var(--wt-line); border-radius: 10px; background: var(--wt-bg); color: var(--wt-ink); text-decoration: none;
}
.wt-rs:hover { border-color: var(--wt-acc); }
.wt-rs.empty { border: 2px dashed var(--wt-line2); background: transparent; color: var(--wt-mut); }
.wt-rs.empty .wt-glyph { stroke: var(--wt-line2); }
.wt-rs.empty .wt-glyph .m { fill: var(--wt-line2); }
.wt-rs-pic { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--wt-card); }
.wt-rs.empty .wt-rs-pic { background: transparent; }
.wt-rs-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wt-rs-t { padding: 5px 6px 7px; font-size: 14px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere; }
.wt-rs-n {
  position: absolute; top: 4px; left: 4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--wt-acc); color: #fff; font: 700 13px/22px inherit; text-align: center;
}
.wt-rs.empty .wt-rs-n { background: var(--wt-gray); }
.wt-also { margin: 10px 0 6px; font-size: 15px; color: var(--wt-mut); }

/* ---------- 图例 ---------- */
.wt-legend { margin: 18px 0 4px; }
.wt-leg-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; }

/* 状态 = 小圆点 + 一个短语(不做大块底色) */
.wt-st { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; line-height: 1.35; color: var(--wt-mut); }
.wt-st i { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--wt-gray)); }
.s-real { --c: var(--wt-grn); }
.s-real .wt-st i, .wt-st.s-real i { box-shadow: 0 0 0 2px var(--wt-card), 0 0 0 3.5px var(--wt-grn); }
.s-judge { --c: var(--wt-grn); }
.s-wait { --c: var(--wt-amb); }
.s-sim { --c: var(--wt-acc); }
.s-doing { --c: var(--wt-gray); }
.s-fail { --c: var(--wt-red); }
.s-idea { --c: transparent; }
.s-idea .wt-st i, .wt-st.s-idea i, .wt-st.s-dash i { background: transparent; border: 1.5px dashed var(--wt-gray); }
.wt-st.s-dash i { border-radius: 3px; width: 14px; flex-basis: 14px; }

/* ---------- 树 ---------- */
.wt-tree { margin-top: 14px; }
.wt-node { position: relative; margin-top: 12px; }
.wt-card { background: var(--wt-card); border: 1px solid var(--wt-line); border-radius: 14px; padding: 12px; min-width: 0; }
.wt-node.root > .wt-card { border-width: 2px; border-color: var(--wt-ink); text-align: center; }
.wt-node.empty > .wt-card { border: 2px dashed var(--wt-line2); background: transparent; }
.wt-node.hl > .wt-card { box-shadow: 0 0 0 3px var(--wt-acc); }
.wt-rank { margin: 0; font-size: 14px; color: var(--wt-mut); }
.wt-trait { margin: 2px 0 4px; font-size: 21px; line-height: 1.3; font-weight: 800; overflow-wrap: anywhere; }
.wt-node.root .wt-trait { font-size: 25px; }
.wt-trait .plus { color: var(--wt-acc); }
.wt-line { margin: 0 0 6px; font-size: 16px; }
.wt-leg { margin: 0 0 4px; font-size: 15px; color: var(--wt-mut); }
.wt-rootpic { width: 150px; margin: 4px auto 0; }

/* 孩子往右缩一点, 左边一根竖线连起来;每个孩子一根短横线接到竖线上 */
.wt-kids { margin-left: 4px; padding-left: 8px; border-left: 2px solid var(--wt-rail); }
.wt-kids > .wt-node::before {
  content: ""; position: absolute; left: -10px; top: 28px; width: 10px; border-top: 2px solid var(--wt-rail);
}
.wt-kids > .wt-node.empty::before { border-top-style: dashed; }
@media (min-width: 560px) {
  .wt-kids { margin-left: 10px; padding-left: 14px; }
  .wt-kids > .wt-node::before { left: -16px; width: 16px; }
}

/* 「还没有」 */
.wt-none { margin: 8px 0 0; padding: 10px 12px; border: 2px dashed var(--wt-line2); border-radius: 10px; color: var(--wt-mut); font-size: 15px; }
.wt-none b { color: var(--wt-ink); }

/* ---------- 机型卡 ---------- */
/* 两列为主(窄到放不下才一列);一列时卡片别撑满, 图别变成半屏大 */
.wt-ms { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; margin-top: 10px; }
.wt-ms > .wt-m { max-width: 230px; }
.wt-m {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--wt-card); border: 1px solid var(--wt-line); border-radius: 10px; color: inherit; text-decoration: none;
}
a.wt-m:hover { border-color: var(--wt-acc); }
a.wt-m:focus-visible { outline: 3px solid var(--wt-acc); outline-offset: 1px; }
.wt-m.s-idea { border-style: dashed; border-width: 2px; background: transparent; }
.wt-pic { display: block; aspect-ratio: 4 / 3; background: var(--wt-bg); overflow: hidden; border-bottom: 1px solid var(--wt-line); }
.wt-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wt-m.s-idea .wt-pic { background: transparent; border-bottom-style: dashed; }
.wt-mt { display: flex; flex-direction: column; gap: 3px; padding: 8px 9px 10px; min-width: 0; }
.wt-mn { font-size: 15px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.wt-code { font: 12.5px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--wt-mut); overflow-wrap: anywhere; }
.wt-mk { font-size: 15px; line-height: 1.45; }
.wt-why { font-size: 14px; line-height: 1.4; color: var(--wt-red); }
.wt-note { font-size: 14px; line-height: 1.4; color: var(--wt-mut); }
.wt-from { font-size: 13px; color: var(--wt-mut); }
.wt-go { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--wt-acc); }
.wt-more {
  margin-top: 8px; padding: 6px 14px; border: 1px solid var(--wt-line); border-radius: 16px;
  background: var(--wt-card); color: var(--wt-mut); font: 500 15px/1.3 inherit; cursor: pointer;
}
.wt-more:hover { color: var(--wt-ink); border-color: var(--wt-line2); }

/* 简笔(没有图的卡 / 根) */
.wt-glyph { display: block; width: 100%; height: 100%; fill: none; stroke: var(--wt-mut); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wt-glyph rect { fill: var(--wt-card); }
.wt-glyph .m { fill: var(--wt-acc); stroke: none; }
.wt-glyph.big { height: auto; }

/* ---------- 页尾 ---------- */
.wt-foot { margin-top: 28px; font-size: 14px; color: var(--wt-mut); overflow-wrap: anywhere; }
.wt-src summary { cursor: pointer; font-size: 15px; color: var(--wt-ink); }
.wt-src ul { padding-left: 18px; }
.wt-src li { margin: 6px 0; }
.wt-src code { font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
