/* 思路卡 · 思维链（docs/板块37_自助模拟面试开放思路卡.md「思路卡改成思维链」；标记由 public/card-chain.js 的 html 画）
   各处同一套：自助模拟面试的思路卡一栏、导师场次的手机思路卡、落地页首屏舞台、面试记录页和后台的「当时的思路卡」
   - 链竖着走：一步一个框，框和框之间一条带箭头的连线；并列步在同一行并排 2～3 个小框，上下各一道横线把它们分叉、合拢，序号挂在分叉的地方
   - 颜色只用令牌：青色（--pen）只标框边、序号和连线，最后一步（收尾）铺一层淡青；旧外壳的页面（后台）没有 v3 的令牌，退到旧令牌
   - 流式时新出来的一步带 is-new，升上来一下；「减少动态效果」时不动 */
.tc {
  --tc-pen: var(--pen, var(--primary));
  --tc-soft: var(--pen-soft, var(--primary-soft));
  --tc-ink: var(--ink, var(--text));
  --tc-ink-3: var(--ink-3, var(--text-3));
  --tc-bg: var(--sheet, var(--surface));
  --tc-line: color-mix(in srgb, var(--tc-pen) 42%, transparent);
  --tc-gap: 16px;   /* 步和步之间（连线的长度） */
  --tc-rail: 10px;  /* 并列步：横线到小框的距离 */
  --tc-col: 6px;    /* 并列的小框之间 */
  list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); text-align: center;
}
.tc-step { position: relative; margin: 0; padding: 0; list-style: none; }
.tc-step + .tc-step { margin-top: var(--tc-gap); }
/* 连线：上一步的底到这一步的顶；箭头落在这一步的框上 */
.tc-step + .tc-step::before { content: ""; position: absolute; left: 50%; top: calc(-1 * var(--tc-gap)); height: var(--tc-gap); border-left: 1.5px solid var(--tc-line); transform: translateX(-.75px); }
.tc-step + .tc-step::after { content: ""; position: absolute; left: 50%; top: -7.5px; width: 6px; height: 6px; border-right: 1.5px solid var(--tc-line); border-bottom: 1.5px solid var(--tc-line); transform: translateX(-50%) rotate(45deg); }
.tc-step + .tc-step--par::after { display: none; }
.tc-node { position: relative; display: block; min-width: 0; padding: 7px 12px 8px; border: 1px solid var(--tc-line); border-radius: 10px; background: var(--tc-bg); overflow-wrap: anywhere; }
.tc-node b { font-size: 14px; line-height: 1.45; font-weight: 620; letter-spacing: -.005em; color: var(--tc-ink); }
.tc-node small { display: block; margin-top: 1px; font-size: 12px; line-height: 1.45; font-weight: 400; color: var(--tc-ink-3); }
.tc-n { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 6px; border-radius: 50%; background: var(--tc-pen); color: var(--pen-fg, white); font: 600 10.5px/1 var(--mono, ui-monospace, monospace); font-style: normal; vertical-align: 1.5px; }
/* 最后一步是收尾：淡青底、青色实边 */
.tc-step--end .tc-node { border-color: var(--tc-pen); background: color-mix(in srgb, var(--tc-soft) 70%, var(--tc-bg)); }
/* 并列步：上面一道横线分叉、下面一道横线合拢，小框上下各一小段竖线接到横线上；序号压在分叉的那道线中间 */
.tc-fork { position: relative; display: grid; gap: var(--tc-col); padding: var(--tc-rail) 0; align-items: stretch; }
.tc-fork--2 { --tc-n: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tc-fork--3 { --tc-n: 3; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tc-fork::before, .tc-fork::after { content: ""; position: absolute; left: calc((100% - (var(--tc-n) - 1) * var(--tc-col)) / (2 * var(--tc-n))); right: calc((100% - (var(--tc-n) - 1) * var(--tc-col)) / (2 * var(--tc-n))); border-top: 1.5px solid var(--tc-line); }
.tc-fork::before { top: 0; }
.tc-fork::after { bottom: 0; }
.tc-fork .tc-node { padding: 6px 6px 7px; }
.tc-fork .tc-node b { font-size: 13px; }
.tc-fork .tc-node small { font-size: 11.5px; }
.tc-fork .tc-node::before, .tc-fork .tc-node::after { content: ""; position: absolute; left: 50%; height: var(--tc-rail); border-left: 1.5px solid var(--tc-line); transform: translateX(-.75px); }
.tc-fork .tc-node::before { top: calc(-1 * var(--tc-rail) - 1px); }
.tc-fork .tc-node::after { bottom: calc(-1 * var(--tc-rail) - 1px); }
.tc-step--par > .tc-n { position: absolute; z-index: 1; left: 50%; top: 0; margin: 0; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px var(--tc-bg); }
/* 并列步排在最后（提示词不让，万一出现）：下面不再合拢 */
.tc-step--par:last-child .tc-fork { padding-bottom: 0; }
.tc-step--par:last-child .tc-fork::after, .tc-step--par:last-child .tc-node::after { display: none; }
/* 旧卡退化成的链：节点是原来的结构或要点，字多，左对齐 */
.tc--legacy .tc-node { text-align: left; }
.tc--legacy .tc-node b { font-weight: 560; }
/* 流式：新出来的那一步升上来一下 */
.tc-step.is-new { animation: tc-in .34s var(--ease-out, ease-out) both; }
@keyframes tc-in { from { opacity: 0; transform: translateY(6px); } }

/* 导师场次的手机思路卡：字大一号 */
.m-card .tc { --tc-gap: 18px; --tc-rail: 11px; --tc-col: 8px; margin: 14px 0 4px; }
.m-card .tc-node { padding: 10px 14px 11px; border-radius: 12px; }
.m-card .tc-node b { font-size: 17px; }
.m-card .tc-node small { font-size: 14px; margin-top: 2px; }
.m-card .tc-n { width: 20px; height: 20px; font-size: 12px; margin-right: 8px; vertical-align: 2px; }
.m-card .tc-fork .tc-node { padding: 8px 6px 9px; }
.m-card .tc-fork .tc-node b { font-size: 15px; }
.m-card .tc-fork .tc-node small { font-size: 12.5px; }
/* 面试记录页、后台里缩小的那张 */
.m-rc ol.tc, .iv3-card ol.tc, .v3 .iv3-card ol.tc { max-width: 420px; margin: 10px 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  .tc-step.is-new { animation: none; }
}
