/* ---------- 使用教程（2026-11-17 重做；已合并为单一 /tutorial，不再分快速/详细） ----------
   只作用于 /tutorial；复用 site.css 里的设计 token（--paper/--ink/--rule/--accent…）。
   目标：截图是主角，文字是编号注解；一屏内能完成"看一步、照着做”。 */

.tut-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding: 34px 0 6px;
}

.tut-kicker {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .12em;
    color: var(--accent-ink);
    text-transform: uppercase;
}

.tut-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3.6vw, 38px);
    line-height: 1.2;
    letter-spacing: -.02em;
    font-weight: 600;
}

.tut-hero .lead { margin-bottom: 18px; }

.tut-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.tut-meta span {
    padding: 4px 11px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--card);
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-2);
    white-space: nowrap;
}

/* 右侧步骤目录：当前步高亮，未补的步骤弱化 */
.tut-toc {
    border-top: 1px solid var(--ink);
    padding-top: 12px;
}

.tut-toc-hd {
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: .1em;
    color: var(--ink-3);
    text-transform: uppercase;
}

.tut-toc-item {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 13.5px;
    color: var(--ink-2);
    text-decoration: none;
}

.tut-toc-item .no {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-3);
}

.tut-toc-item.on { color: var(--ink); font-weight: 600; }
.tut-toc-item.on .no { color: var(--accent); }
.tut-toc-item.dim { color: var(--ink-3); }

.tut-toc-tip {
    margin: 12px 0 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--ink-3);
}

/* 步骤内的两个小节：先认识面板 / 怎么创建 */
.tut-subhd {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 28px 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.tut-subhd::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rule-soft);
}

/* 面板功能图例：截图上的红圈数字 → 每个按钮/字段干什么。比 tut-calls 更紧凑（第 4 步有 31 条）。 */
.tut-legend {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 20px 0 0;
    padding: 0;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
}

.tut-legend li {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    padding: 9px 13px;
    background: var(--card);
    font-size: 12.5px;
    line-height: 1.65;
    color: var(--ink-2);
}

.tut-legend .n {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 0;
    border-radius: 50%;
    background: #C62828;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10.5px;
}

.tut-legend b { color: var(--ink); font-weight: 600; }

.tut-legend-note {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--ink-3);
}

.tut-step {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--ink);
}

/* 同一页连续放多个步骤：留足分隔，避免下一条细线贴着上一条的「注意」框 */
.tut-step + .tut-step { margin-top: 58px; }

.tut-step-hd {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin: 0 0 12px;
}

.tut-step-hd .no {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent-ink);
}

.tut-step-hd h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
}

.tut-step .notes { margin-top: 0; }

/* 截图：白底 + 细框；点开看原图（原图是 2469 宽，页面里必然缩小） */
.tut-figure {
    margin: 22px 0 4px;
}

.tut-figure a {
    display: block;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.tut-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.tut-figure figcaption {
    margin-top: 9px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--ink-3);
}

.tut-figure + .tut-figure { margin-top: 26px; }

/* 整页截图信息量大：允许它比正文宽（最大 1480，窄屏自动收），字体/数字才看得清；
   对话框局部图不用那么宽，限制在 920 内保证清晰。 */
.tut-figure--wide {
    width: min(1480px, calc(100vw - 48px));
    margin-left: 50%;
    transform: translateX(-50%);
}

.tut-figure--dialog { max-width: 920px; }

/* 编号注解：与截图上的红圈数字一一对应 */
.tut-calls {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 24px 0 0;
    padding: 0;
    background: var(--rule);
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
}

.tut-calls li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    padding: 15px 18px;
    background: var(--card);
}

/* 奇数条时最后一条占满整行，不要留一个空白卡片格（第 3 步恰好 11 条） */
.tut-calls > li:last-child:nth-child(odd) { grid-column: 1 / -1; }

.tut-calls .n {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
}

.tut-calls h3 {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.tut-calls p {
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
    color: var(--ink-2);
}

.tut-calls code,
.tut-check code,
.tut-tip code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #EEECE7;
    font-family: var(--font-mono);
    font-size: 12.5px;
}

/* 做完怎么确认 */
.tut-check {
    margin-top: 24px;
    padding: 16px 20px;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    background: var(--card);
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink-2);
}

.tut-check b { color: var(--ink); }
.tut-check ul { margin: 8px 0 0; padding-left: 20px; }
.tut-check li + li { margin-top: 4px; }

/* 注意 / 下一步 */
.tut-tip {
    margin-top: 18px;
    padding: 16px 20px;
    border: 1px solid var(--warning-rule, var(--warn-rule));
    border-radius: 8px;
    background: var(--warn-bg);
    color: var(--warn-ink);
    font-size: 13.5px;
    line-height: 1.8;
}

.tut-tip b { font-weight: 600; }
.tut-tip ul { margin: 6px 0 0; padding-left: 20px; }
.tut-tip li + li { margin-top: 4px; }

.tut-next {
    margin-top: 30px;
    padding: 20px 24px;
    border: 1px dashed var(--rule);
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--ink-3);
}

.tut-next b { color: var(--ink-2); }
.tut-next a { color: var(--accent-ink); font-weight: 600; }

/* 响应式：窄屏单列，按钮/标签不挤压 */
@media (max-width: 900px) {
    .tut-hero { grid-template-columns: 1fr; gap: 28px; }
    .tut-calls { grid-template-columns: 1fr; }
    .tut-legend { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .tut-step { margin-top: 30px; }
    .tut-step-hd h2 { font-size: 21px; }
}
