/* 帧工坊「教程」栏目样式（前缀 gd-，与 sp- mt- sfx- px- tg- ap- ic- cm- rs- 都不冲突）
 *
 * 全部走 style.css 那套主题令牌（--bg-panel / --text-1,2,3 / --border / --accent / --info-*），
 * 深浅两套主题自动跟随，不需要再写 [data-theme="dark"] 覆盖段。
 * 主题由 theme-init.js 在 head 同步设置，本文件放在 landing.css 之后即可。
 */

/* ---------- 头部：比正文宽，导航精简（只留 4 项） ---------- */
.gd-header{background:var(--bg-panel);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
.gd-header-inner{max-width:1100px;margin:0 auto;padding:12px 20px;display:flex;align-items:center;gap:12px}
.gd-nav{margin-left:auto;display:flex;gap:16px;font-size:13px;flex-wrap:nowrap}
.gd-nav a{color:var(--text-2);text-decoration:none;white-space:nowrap}
.gd-nav a:hover{color:var(--accent)}
.gd-nav .cur{color:var(--accent);font-weight:600;cursor:default;white-space:nowrap}

/* ---------- 列表页 ---------- */
.gd-wrap{max-width:960px;margin:0 auto;padding:32px 20px 60px}
.gd-hero h1{font-size:30px;line-height:1.35;margin:0 0 14px}
.gd-hero .lead{font-size:15px;line-height:1.9;color:var(--text-2);margin:0 0 8px}
.gd-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px;margin-top:22px}
.gd-item{background:var(--bg-panel);border:1px solid var(--border);border-radius:12px;padding:18px;text-decoration:none;color:inherit;display:block;transition:border-color .18s}
.gd-item:hover{border-color:var(--accent)}
.gd-item .gd-tag{font-size:12px;color:var(--text-3);margin:0 0 6px}
.gd-item h3{margin:0 0 8px;font-size:16.5px;line-height:1.5;color:var(--text-1)}
.gd-item p{margin:0;font-size:13.5px;color:var(--text-2);line-height:1.8}
.gd-item .gd-more{margin-top:10px;font-size:13px;color:var(--accent)}
.gd-soon{margin-top:22px}
.gd-soon ul{padding-left:20px;margin:8px 0}
.gd-soon li{font-size:14px;line-height:1.9;color:var(--text-2)}

/* ---------- 文章正文 ---------- */
.gd-article{max-width:820px}
.gd-meta{font-size:12.5px;color:var(--text-3);margin:0 0 18px}
.gd-article h2{font-size:20px;margin:34px 0 12px;padding-top:6px;line-height:1.45;color:var(--text-1)}
.gd-article h3{font-size:16px;margin:22px 0 8px;line-height:1.55;color:var(--text-1)}
.gd-article p{font-size:15px;line-height:1.95;color:var(--text-2);margin:0 0 14px}
.gd-article ul,.gd-article ol{padding-left:22px;margin:0 0 16px}
.gd-article li{font-size:15px;line-height:1.9;color:var(--text-2);margin-bottom:6px}
.gd-article strong{color:var(--text-1);font-weight:600}
.gd-article a{color:var(--accent);text-decoration:none}
.gd-article a:hover{text-decoration:underline}
.gd-article code{font-family:var(--font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);font-size:13px;background:var(--bg-inset);border:1px solid var(--border);border-radius:5px;padding:1px 5px}

/* 表格：规范对照表是文章主体，必须能横向滚而不是被压成一团 */
.gd-tablewrap{overflow-x:auto;margin:0 0 18px;-webkit-overflow-scrolling:touch}
.gd-table{border-collapse:collapse;width:100%;min-width:520px;font-size:13.5px}
.gd-table th,.gd-table td{border:1px solid var(--border);padding:8px 12px;text-align:left;line-height:1.7}
.gd-table th{background:var(--bg-inset);color:var(--text-1);font-weight:600;white-space:nowrap}
.gd-table td{color:var(--text-2)}
.gd-table td.gd-num{font-family:var(--font-mono,ui-monospace,Menlo,Consolas,monospace);white-space:nowrap}

/* 提示框：结论 / 坑 / 实测 */
.gd-box{border-radius:10px;padding:14px 16px;margin:0 0 18px;font-size:14px;line-height:1.85}
.gd-box p{margin:0 0 8px;font-size:14px}
.gd-box p:last-child{margin-bottom:0}
.gd-box .gd-box-t{display:block;font-weight:600;margin-bottom:6px}
.gd-tip{background:var(--info-bg);border:1px solid var(--info-line);color:var(--info-text)}
.gd-warn{background:var(--warn-bg);border:1px solid var(--warn-line);color:var(--warn-text)}

/* 步骤条：流水线文章用 */
.gd-steps{counter-reset:gdstep;margin:0 0 20px;padding:0;list-style:none}
.gd-steps>li{position:relative;padding:0 0 18px 44px;counter-increment:gdstep}
.gd-steps>li::before{content:counter(gdstep);position:absolute;left:0;top:2px;width:28px;height:28px;border-radius:50%;background:var(--accent);color:#fff;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center}
.gd-steps>li::after{content:"";position:absolute;left:13px;top:34px;bottom:2px;width:2px;background:var(--border)}
.gd-steps>li:last-child::after{display:none}
.gd-steps h3{margin:2px 0 6px;font-size:15.5px}
.gd-steps p{margin:0 0 8px}

/* 示意图：文章里的九宫格、尺寸对照都用它装，按容器宽度自适应 */
.gd-fig{margin:0 0 18px}
.gd-fig svg{width:100%;height:auto;display:block}
.gd-fig figcaption{font-size:12.5px;color:var(--text-3);margin-top:8px;line-height:1.7}

/* 文内工具入口：一篇文章挂 2-4 个工具，视觉上要跟正文分开 */
.gd-tools{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 20px}
.gd-tools a{font-size:13.5px;color:var(--info-text);text-decoration:none;border:1px solid var(--info-line);background:var(--info-bg);border-radius:20px;padding:7px 15px}
.gd-tools a:hover{background:var(--accent-soft)}

/* 文章底部上下篇 */
.gd-next{display:flex;gap:12px;flex-wrap:wrap;margin-top:34px;padding-top:20px;border-top:1px solid var(--border)}
.gd-next a{flex:1 1 240px;background:var(--bg-panel);border:1px solid var(--border);border-radius:10px;padding:14px 16px;text-decoration:none;color:inherit}
.gd-next a:hover{border-color:var(--accent)}
.gd-next span{display:block;font-size:12px;color:var(--text-3);margin-bottom:4px}
.gd-next b{font-size:14.5px;color:var(--text-1);font-weight:600;line-height:1.5}

@media (max-width:640px){
  .gd-hero h1{font-size:24px}
  .gd-header-inner{padding:10px 16px}
  .gd-nav{gap:12px}
}
