/* 产品维修指南 · 样式（深浅双主题 + 三端响应式） */
:root {
    --rg-bg: #0f1319;
    --rg-card: #171d26;
    --rg-card2: #1d2531;
    --rg-line: rgba(150, 170, 200, .16);
    --rg-line2: rgba(150, 170, 200, .3);
    --rg-text: #e8eef6;
    --rg-sub: #a3b1c2;
    --rg-faint: #8796a9;
    --rg-accent: #55a6ff;
    --rg-accent-soft: rgba(85, 166, 255, .14);
    --rg-on-accent: #ffffff;
    --rg-ok: #4fd18b;
    --rg-ok-soft: rgba(79, 209, 139, .13);
    --rg-warn: #f0b441;
    --rg-warn-soft: rgba(240, 180, 65, .14);
    --rg-err: #f2756c;
    --rg-err-soft: rgba(242, 117, 108, .14);
    --rg-zebra: rgba(127, 127, 127, .06);
    --rg-shadow: 0 8px 28px rgba(0, 0, 0, .3);
    --rg-shadow-sm: 0 2px 10px rgba(0, 0, 0, .18);
    --rg-r-lg: 16px;
    --rg-r-md: 12px;
    --rg-r-sm: 8px;
    --rg-ds: rgba(85, 166, 255, .09);
    --rg-ds2: rgba(150, 170, 200, .17);
}
[data-theme="light"] {
    --rg-bg: #f5f7fa;
    --rg-card: #ffffff;
    --rg-card2: #f0f4f9;
    --rg-line: rgba(15, 25, 40, .1);
    --rg-line2: rgba(15, 25, 40, .2);
    --rg-text: #16202c;
    --rg-sub: #57677a;
    --rg-faint: #66758a;
    --rg-accent: #136ce9;
    --rg-accent-soft: rgba(19, 108, 233, .1);
    --rg-on-accent: #ffffff;
    --rg-ok: #148a55;
    --rg-ok-soft: rgba(20, 138, 85, .1);
    --rg-warn: #9a6700;
    --rg-warn-soft: rgba(154, 103, 0, .1);
    --rg-err: #c5372f;
    --rg-err-soft: rgba(197, 55, 47, .1);
    --rg-zebra: rgba(15, 25, 40, .038);
    --rg-shadow: 0 8px 28px rgba(30, 50, 80, .1);
    --rg-shadow-sm: 0 2px 10px rgba(30, 50, 80, .08);
    --rg-ds: rgba(19, 108, 233, .07);
    --rg-ds2: rgba(15, 25, 40, .09);
}

/* 满屏（保留站点左侧导航）；同时把滚动权交还 html，让页内 sticky 生效 */
body.page-repair-guide-full { overflow: visible; }
body.page-repair-guide-full .app,
body.page-repair-guide-full .main-content,
body.page-repair-guide-full .page-container { max-width: 100%; width: 100%; border-right: 0; min-width: 0; }
/* style.css 在手机断点给 .main-content 设了 overflow-x:hidden，会把它变成滚动容器导致页内 sticky 全部失效 */
body.page-repair-guide-full .main-content { overflow: visible; }

.rg { box-sizing: border-box; width: 100%; max-width: 100%; padding: 18px 22px 72px; color: var(--rg-text); font-size: 14px; line-height: 1.6; }
.rg *, .rg *::before, .rg *::after { box-sizing: border-box; }
.rg [hidden] { display: none !important; }
.rg button, .rg input, .rg select, .rg textarea { font: inherit; color: inherit; }
.rg button { cursor: pointer; }
.rg button:disabled { opacity: .5; cursor: not-allowed; }
.rg :focus-visible { outline: 2px solid var(--rg-accent); outline-offset: 2px; }
.rg h1, .rg h2, .rg h3, .rg p { margin: 0; }
.rg a { color: var(--rg-accent); }

/* ===== hero ===== */
.rg-hero { position: relative; padding: 20px 22px 14px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-lg); background: linear-gradient(135deg, var(--rg-accent-soft), transparent 60%), var(--rg-card); box-shadow: var(--rg-shadow-sm); }
.rg-hero-main { display: flex; align-items: flex-start; gap: 16px; }
.rg-hero-ic { flex: 0 0 auto; width: 54px; height: 54px; display: grid; place-items: center; font-size: 28px; border-radius: 14px; background: var(--rg-accent-soft); border: 1px solid var(--rg-line); }
.rg-hero-t { flex: 1 1 auto; min-width: 0; }
.rg-hero-t h1 { font-size: 24px; font-weight: 750; letter-spacing: .2px; text-wrap: balance; }
.rg-hero-t p { margin-top: 5px; color: var(--rg-sub); max-width: 76ch; font-size: 13.5px; }
.rg-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rg-hero-tags span { font-size: 11.5px; color: var(--rg-sub); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rg-line); background: var(--rg-card2); }
.rg-hero-acts { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.rg-fold-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--rg-sub); border-radius: 8px; }
.rg-fold-btn:hover { background: var(--rg-card2); color: var(--rg-accent); }
.rg-fold-btn svg { width: 16px; height: 16px; transition: transform .18s; }
.rg-hero.is-collapsed .rg-fold-btn svg { transform: rotate(-90deg); }
.rg-hero.is-collapsed .rg-hero-extra, .rg-hero.is-collapsed .rg-hero-tags { display: none; }
.rg-hero.is-collapsed { padding-bottom: 18px; }
.rg-hero-extra { margin-top: 12px; }
.rg-disclaimer { font-size: 12px; color: var(--rg-warn); background: var(--rg-warn-soft); border-radius: var(--rg-r-sm); padding: 8px 12px; }

.rg-stat { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 16px 0 0; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); overflow: hidden; background: var(--rg-card2); }
.rg-stat-i { padding: 11px 14px; border-left: 1px solid var(--rg-line); display: flex; flex-direction: column; gap: 2px; }
.rg-stat-i:first-child { border-left: 0; }
.rg-stat-i b { font-size: 21px; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.rg-stat-i:nth-child(2) b { color: var(--rg-accent); }
.rg-stat-i:nth-child(4) b { color: var(--rg-ok); }
.rg-stat-i em { font-style: normal; font-size: 12px; color: var(--rg-sub); }

/* ===== 通用控件 ===== */
.rg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 34px; padding: 5px 12px; border-radius: var(--rg-r-sm); border: 1px solid var(--rg-line2); background: var(--rg-card2); color: var(--rg-text); font-size: 13px; white-space: nowrap; transition: background .16s, border-color .16s, transform .16s; }
.rg-btn:hover { border-color: var(--rg-accent); }
.rg-btn-ghost { background: transparent; }
.rg-btn-pri { background: var(--rg-accent); border-color: var(--rg-accent); color: var(--rg-on-accent); font-weight: 650; }
.rg-btn-pri:hover { filter: brightness(1.08); }
.rg-btn-danger { background: var(--rg-err-soft); border-color: var(--rg-err); color: var(--rg-err); }
.rg-btn.is-on { background: var(--rg-accent-soft); border-color: var(--rg-accent); color: var(--rg-accent); }
.rg select, .rg input[type="text"], .rg input[type="search"], .rg input[type="number"], .rg input[type="date"], .rg textarea { background: var(--rg-card); border: 1px solid var(--rg-line2); border-radius: var(--rg-r-sm); padding: 6px 10px; min-height: 34px; outline: none; }
.rg select:focus, .rg input:focus, .rg textarea:focus { border-color: var(--rg-accent); box-shadow: 0 0 0 3px var(--rg-accent-soft); }
.rg input::placeholder, .rg textarea::placeholder { color: var(--rg-faint); }
.rg input[type="search"]::-webkit-search-cancel-button, .rg input[type="search"]::-webkit-search-decoration { display: none; }
.rg input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--rg-accent); cursor: pointer; }
.rg-flex-sp { flex: 1 1 auto; }
.rg-pane-tip { color: var(--rg-sub); font-size: 12.5px; margin-top: 4px; }

/* ===== tabs ===== */
.rg-tabs { display: flex; gap: 6px; margin: 16px 0 14px; border-bottom: 1px solid var(--rg-line); overflow-x: auto; scrollbar-width: none; }
.rg-tabs::-webkit-scrollbar { display: none; }
.rg-tab { flex: 0 0 auto; padding: 9px 16px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--rg-sub); font-size: 14px; font-weight: 600; white-space: nowrap; }
.rg-tab:hover { color: var(--rg-text); }
.rg-tab.is-on { color: var(--rg-accent); border-bottom-color: var(--rg-accent); }
.rg-pane { min-width: 0; }

/* ===== 指南库 ===== */
.rg-tools { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); }
.rg-search { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--rg-line2); border-radius: 999px; background: var(--rg-card2); padding: 0 12px; }
.rg-search:focus-within { border-color: var(--rg-accent); box-shadow: 0 0 0 3px var(--rg-accent-soft); }
.rg-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; box-shadow: none !important; min-height: 40px; }
.rg-search input:focus { box-shadow: none; }
.rg-search-ic { flex: 0 0 auto; opacity: .7; }
.rg-search kbd { flex: 0 0 auto; font: 11px/1 monospace; color: var(--rg-faint); border: 1px solid var(--rg-line2); border-radius: 5px; padding: 3px 6px; }
.rg-search-clr { border: 0; background: transparent; color: var(--rg-sub); font-size: 13px; padding: 2px 5px; }
.rg-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rg-tools-row select { flex: 0 1 150px; min-width: 120px; }
.rg-count { margin-left: auto; font-size: 12.5px; color: var(--rg-sub); font-variant-numeric: tabular-nums; }
.rg-cats { display: flex; flex-wrap: wrap; gap: 7px; }
.rg-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--rg-line2); background: transparent; color: var(--rg-sub); font-size: 12.5px; white-space: nowrap; }
.rg-chip:hover { border-color: var(--rg-accent); color: var(--rg-accent); }
.rg-chip.is-on { background: var(--rg-accent-soft); border-color: var(--rg-accent); color: var(--rg-accent); font-weight: 650; }
.rg-chip i { font-style: normal; opacity: .75; font-size: 11px; font-variant-numeric: tabular-nums; }
.rg-recent { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; font-size: 12px; color: var(--rg-sub); }
.rg-recent button { border: 1px solid var(--rg-line); background: var(--rg-card); color: var(--rg-sub); border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.rg-recent button:hover { color: var(--rg-accent); border-color: var(--rg-accent); }
.rg-loading, .rg-load-err { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--rg-sub); }
.rg-load-err { flex-wrap: wrap; color: var(--rg-err); }
.rg-spin { width: 16px; height: 16px; border: 2px solid var(--rg-line2); border-top-color: var(--rg-accent); border-radius: 50%; animation: rg-spin .8s linear infinite; }
@keyframes rg-spin { to { transform: rotate(360deg); } }

.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.rg-card { display: flex; flex-direction: column; min-width: 0; gap: 8px; padding: 14px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); box-shadow: var(--rg-shadow-sm); cursor: pointer; transition: transform .16s, border-color .16s, box-shadow .16s; }
.rg-card:hover { transform: translateY(-2px); border-color: var(--rg-accent); box-shadow: var(--rg-shadow); }
.rg-card-top { display: flex; align-items: flex-start; gap: 9px; }
.rg-card-ic { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; border-radius: 10px; background: var(--rg-card2); border: 1px solid var(--rg-line); }
.rg-card-t { flex: 1 1 auto; min-width: 0; }
.rg-card-t b { display: block; font-size: 15px; font-weight: 700; line-height: 1.35; }
.rg-card-t span { display: block; color: var(--rg-faint); font-size: 11.5px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-fav { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--rg-line); border-radius: 8px; background: transparent; color: var(--rg-sub); font-size: 15px; line-height: 1; }
.rg-fav.is-on { color: var(--rg-warn); border-color: var(--rg-warn); background: var(--rg-warn-soft); }
.rg-card-sum { color: var(--rg-sub); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.rg-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rg-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rg-line); color: var(--rg-sub); background: var(--rg-card2); white-space: nowrap; }
.rg-badge.d1, .rg-badge.d2 { color: var(--rg-ok); border-color: var(--rg-ok); background: var(--rg-ok-soft); }
.rg-badge.d3 { color: var(--rg-warn); border-color: var(--rg-warn); background: var(--rg-warn-soft); }
.rg-badge.d4, .rg-badge.d5 { color: var(--rg-err); border-color: var(--rg-err); background: var(--rg-err-soft); }
.rg-badge.is-featured { color: var(--rg-accent); border-color: var(--rg-accent); background: var(--rg-accent-soft); }
.rg-badge.is-custom { color: var(--rg-warn); border-color: var(--rg-warn); background: var(--rg-warn-soft); }
.rg-diff-bars { display: inline-flex; gap: 2px; vertical-align: middle; }
.rg-diff-bars i { width: 3px; height: 9px; border-radius: 1px; background: var(--rg-line2); }
.rg-diff-bars i.on { background: currentColor; }
.rg-card-foot { display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--rg-line); margin-top: auto; }
.rg-card-foot .rg-mini-prog { flex: 1 1 auto; height: 5px; border-radius: 999px; background: var(--rg-card2); overflow: hidden; }
.rg-card-foot .rg-mini-prog i { display: block; height: 100%; background: var(--rg-ok); border-radius: 999px; }
.rg-card-foot em { font-style: normal; font-size: 11px; color: var(--rg-faint); white-space: nowrap; }
.rg-card-acts { display: flex; gap: 5px; }
.rg-card-acts button { border: 0; background: transparent; color: var(--rg-sub); font-size: 12px; padding: 2px 4px; }
.rg-card-acts button:hover { color: var(--rg-accent); }
/* 表格视图 */
.rg-grid.is-table { display: block; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); overflow-x: auto; background: var(--rg-card); }
.rg-grid.is-table .rg-card { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(100px, 1fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(110px, 1fr); align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--rg-line); border-radius: 0; box-shadow: none; padding: 9px 12px; }
.rg-grid.is-table .rg-card:last-child { border-bottom: 0; }
.rg-grid.is-table .rg-card:hover { transform: none; background: var(--rg-card2); }
.rg-grid.is-table .rg-card-sum, .rg-grid.is-table .rg-card-ic, .rg-grid.is-table .rg-card-t span { display: none; }
.rg-grid.is-table .rg-card-foot { border: 0; padding: 0; margin: 0; }
.rg-grid.is-table .rg-card-t b { font-size: 13.5px; }
.rg-grid.is-table .rg-card:nth-child(even) { background: var(--rg-zebra); }
.rg-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 46px 20px; text-align: center; border: 1px dashed var(--rg-line2); border-radius: var(--rg-r-md); margin-top: 14px; }
.rg-empty-ic { font-size: 34px; opacity: .7; }
.rg-empty b { font-size: 15px; }
.rg-empty p { color: var(--rg-sub); font-size: 13px; }

/* ===== 故障排查 ===== */
.rg-diag { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 14px; align-items: start; }
.rg-diag-l h2, .rg-box-head h2, .rg-j-head h2 { font-size: 17px; font-weight: 700; }
.rg-sym-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: min(60vh, 560px); overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.rg-sym { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-sm); background: var(--rg-card); }
.rg-sym:hover { border-color: var(--rg-accent); }
.rg-sym.is-on { border-color: var(--rg-accent); background: var(--rg-accent-soft); }
.rg-sym > span:first-child { font-size: 18px; }
.rg-sym b { display: block; font-size: 13px; font-weight: 650; }
.rg-sym small { display: block; color: var(--rg-faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.rg-sym.is-danger b { color: var(--rg-err); }
.rg-sym.is-warn b { color: var(--rg-warn); }
.rg-diag-r { min-width: 0; }
.rg-diag-card { border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); padding: 16px; }
.rg-diag-card h3 { font-size: 17px; font-weight: 700; }
.rg-diag-card .rg-diag-desc { color: var(--rg-sub); margin: 6px 0 14px; font-size: 13px; }
.rg-diag-sec-t { font-size: 12px; font-weight: 700; color: var(--rg-faint); letter-spacing: .5px; margin: 16px 0 8px; }
.rg-check { display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-sm); margin-bottom: 6px; cursor: pointer; background: var(--rg-card2); font-size: 13px; }
.rg-check input { margin-top: 2px; flex: 0 0 auto; }
.rg-check.is-done { color: var(--rg-faint); text-decoration: line-through; }
.rg-diag-guides { display: flex; flex-wrap: wrap; gap: 7px; }
.rg-diag-guides button { padding: 6px 11px; border: 1px solid var(--rg-accent); border-radius: 999px; background: var(--rg-accent-soft); color: var(--rg-accent); font-size: 12.5px; }
.rg-diag-prog { font-size: 12px; color: var(--rg-sub); margin-top: 10px; }
.rg-diag-safe { margin-top: 14px; padding: 9px 12px; border-radius: var(--rg-r-sm); background: var(--rg-err-soft); color: var(--rg-err); font-size: 12.5px; }

/* ===== 工具与零件 ===== */
.rg-box-head { padding: 14px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); }
.rg-box-seg { display: inline-flex; gap: 4px; margin-top: 12px; padding: 3px; border-radius: 999px; background: var(--rg-card2); border: 1px solid var(--rg-line); }
.rg-box-seg button { padding: 5px 15px; border: 0; border-radius: 999px; background: transparent; color: var(--rg-sub); font-size: 13px; }
.rg-box-seg button.is-on { background: var(--rg-accent); color: var(--rg-on-accent); font-weight: 650; }
.rg-box-meta { margin-top: 10px; font-size: 12.5px; color: var(--rg-sub); }
.rg-box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 11px; margin-top: 12px; }
.rg-box-card { padding: 13px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); display: flex; flex-direction: column; gap: 7px; }
.rg-box-card.is-have { border-color: var(--rg-ok); }
.rg-box-card-h { display: flex; align-items: flex-start; gap: 9px; }
.rg-box-card-h > span:first-child { font-size: 21px; }
.rg-box-card-h b { display: block; font-size: 14px; }
.rg-box-card-h em { font-style: normal; font-size: 11.5px; color: var(--rg-accent); }
.rg-box-card p { font-size: 12.5px; color: var(--rg-sub); }
.rg-box-card .rg-box-safety { font-size: 11.5px; color: var(--rg-warn); background: var(--rg-warn-soft); border-radius: 6px; padding: 6px 8px; }
.rg-box-card label { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; font-size: 12.5px; color: var(--rg-sub); cursor: pointer; }

/* ===== 维修记录 ===== */
.rg-j-head { padding: 14px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); }
.rg-j-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rg-j-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rg-j-item { display: grid; grid-template-columns: 110px minmax(0, 1.2fr) minmax(0, 1.5fr) 90px 90px; gap: 10px; align-items: center; padding: 11px 13px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-sm); background: var(--rg-card); font-size: 12.5px; }
.rg-j-item:nth-child(even) { background: var(--rg-zebra); }
.rg-j-item b { font-size: 13px; }
.rg-j-item span { color: var(--rg-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-j-result { justify-self: start; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--rg-ok); color: var(--rg-ok); background: var(--rg-ok-soft); }
.rg-j-result.is-pending { border-color: var(--rg-warn); color: var(--rg-warn); background: var(--rg-warn-soft); }
.rg-j-item button { border: 0; background: transparent; color: var(--rg-err); font-size: 12px; }

/* ===== 分步工作台 ===== */
.rg-reader { margin-top: 4px; }
.rg-rd-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); box-shadow: var(--rg-shadow-sm); }
.rg-rd-title { flex: 1 1 auto; min-width: 0; }
.rg-rd-title b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-rd-title span { display: block; font-size: 11.5px; color: var(--rg-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-rd-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.rg-rd-acts .rg-btn { min-height: 32px; padding: 4px 10px; font-size: 12.5px; }
.rg-rd-progress { position: relative; height: 22px; margin: 10px 0 12px; border-radius: 999px; background: var(--rg-card2); border: 1px solid var(--rg-line); overflow: hidden; }
.rg-rd-prog-in { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--rg-ok), var(--rg-accent)); transition: width .25s; }
.rg-rd-progress span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rg-rd-main { display: grid; grid-template-columns: minmax(0, 244px) minmax(0, 1fr) minmax(0, 292px); gap: 12px; align-items: start; }
.rg-rd-side, .rg-rd-info { position: sticky; top: 66px; align-self: start; min-width: 0; }
.rg-rd-side { padding: 12px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); max-height: calc(100vh - 90px); overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.rg-rd-side h3 { font-size: 13px; font-weight: 700; margin-bottom: 9px; }
.rg-rd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; counter-reset: rgstep; }
.rg-step-row { display: flex; align-items: center; gap: 3px; }
.rg-step-row .rg-step-nav { flex: 1 1 auto; min-width: 0; }
.rg-step-nav { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 8px; border: 1px solid transparent; border-radius: var(--rg-r-sm); background: transparent; font-size: 12.5px; color: var(--rg-sub); }
.rg-step-nav:hover { background: var(--rg-card2); }
.rg-step-nav.is-cur { background: var(--rg-accent-soft); border-color: var(--rg-accent); color: var(--rg-accent); font-weight: 650; }
.rg-step-nav.is-done .rg-step-nav-t { text-decoration: line-through; opacity: .7; }
.rg-step-nav-n { flex: 0 0 auto; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rg-line2); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.rg-step-nav.is-done .rg-step-nav-n { background: var(--rg-ok); border-color: var(--rg-ok); color: #fff; }
.rg-step-nav-t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-step-nav-cb { flex: 0 0 auto; width: 15px; height: 15px; }
.rg-rd-side-hint { margin-top: 10px; font-size: 11px; color: var(--rg-faint); border-top: 1px solid var(--rg-line); padding-top: 9px; }
.rg-rd-body { min-width: 0; }
.rg-rd-content { display: flex; flex-direction: column; gap: 12px; }
.rg-step { border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); padding: 15px; scroll-margin-top: 74px; }
.rg-step.is-cur { border-color: var(--rg-accent); box-shadow: var(--rg-shadow-sm); }
.rg-step-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rg-step-n { flex: 0 0 auto; min-width: 30px; height: 30px; padding: 0 7px; display: grid; place-items: center; border-radius: 9px; background: var(--rg-accent); color: var(--rg-on-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.rg-step-t { font-size: 17px; font-weight: 700; flex: 1 1 auto; min-width: 0; }
.rg-step-done { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--rg-sub); cursor: pointer; white-space: nowrap; }
.rg-step-fig { margin: 12px 0; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); overflow: hidden; background: var(--rg-card2); }
.rg-diagram-svg { display: block; width: 100%; height: auto; max-height: 300px; }
.rg-dbg { fill: var(--rg-card2); }
.rg-dgrid path { fill: none; stroke: var(--rg-line); stroke-width: 1; }
.rg-dv { fill: none; stroke: var(--rg-sub); stroke-width: 3; }
.rg-dv2 { fill: var(--rg-line); stroke: var(--rg-sub); stroke-width: 2; }
.rg-ds { fill: var(--rg-ds); stroke: var(--rg-line2); stroke-width: 2; }
.rg-ds2 { fill: var(--rg-ds2); }
.rg-dh { fill: var(--rg-line2); }
.rg-dl { stroke: var(--rg-sub); stroke-width: 2; }
.rg-stroke { fill: none; stroke: var(--rg-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rg-tool { fill: var(--rg-accent); opacity: .82; }
.rg-mark { fill: var(--rg-accent-soft); stroke: var(--rg-accent); stroke-width: 3; }
.rg-mark2 { fill: none; stroke: var(--rg-warn); stroke-width: 3; stroke-dasharray: 6 5; }
.rg-hot { fill: none; stroke: var(--rg-err); stroke-width: 3; stroke-linecap: round; }
.rg-arrow, .rg-arrow2 { fill: none; stroke: var(--rg-sub); stroke-width: 2.5; stroke-linecap: round; }
.rg-arrow { stroke: var(--rg-accent); }
.rg-tx, .rg-tx2 { fill: var(--rg-sub); font-size: 12px; font-weight: 700; }
.rg-tx2 { font-size: 11px; }
.rg-step-fig-cap { padding: 6px 12px; font-size: 11.5px; color: var(--rg-faint); border-top: 1px solid var(--rg-line); }
.rg-step-points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.rg-step-points li { font-size: 14px; line-height: 1.75; }
.rg-step-tip, .rg-step-warn { margin-top: 10px; padding: 9px 12px; border-radius: var(--rg-r-sm); font-size: 12.5px; }
.rg-step-tip { background: var(--rg-ok-soft); color: var(--rg-ok); }
.rg-step-warn { background: var(--rg-err-soft); color: var(--rg-err); }
.rg-step-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rg-tag { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rg-line2); color: var(--rg-sub); }
.rg-tag.is-have { border-color: var(--rg-ok); color: var(--rg-ok); background: var(--rg-ok-soft); }
.rg-tag.is-miss { border-color: var(--rg-warn); color: var(--rg-warn); background: var(--rg-warn-soft); }
.rg-note-box { margin-top: 10px; }
.rg-note-box label { display: block; font-size: 12px; color: var(--rg-sub); margin-bottom: 5px; }
.rg-note-box textarea { width: 100%; min-height: 62px; resize: vertical; line-height: 1.6; }
.rg-rd-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 11px 13px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); }
.rg-rd-nav span { font-size: 12.5px; color: var(--rg-sub); font-variant-numeric: tabular-nums; }
.rg-rd-info { display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 90px); overflow-y: auto; scrollbar-width: thin; }
.rg-info-card { padding: 12px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); }
.rg-info-card h3 { font-size: 12px; color: var(--rg-faint); letter-spacing: .5px; margin-bottom: 9px; }
.rg-info-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed var(--rg-line); }
.rg-info-kv:last-child { border-bottom: 0; }
.rg-info-kv span { color: var(--rg-sub); }
.rg-info-kv b { font-weight: 650; text-align: right; }
.rg-info-list { display: flex; flex-direction: column; gap: 5px; }
.rg-info-list div { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; padding: 5px 7px; border-radius: 6px; background: var(--rg-card2); }
.rg-info-list div.is-have { color: var(--rg-ok); }
.rg-info-list div.is-miss { color: var(--rg-warn); }
.rg-info-list i { font-style: normal; }
.rg-info-warn { background: var(--rg-warn-soft); border-color: var(--rg-warn); }
.rg-info-warn ul { margin: 0; padding-left: 17px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.rg-conclusion { border: 1px solid var(--rg-ok); border-radius: var(--rg-r-md); background: var(--rg-ok-soft); padding: 14px; }
.rg-conclusion h3 { font-size: 15px; margin-bottom: 8px; color: var(--rg-ok); }
.rg-conclusion ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.rg-conclusion p { margin-top: 9px; font-size: 12.5px; }

/* ===== 说明 / 弹窗 / toast ===== */
.rg-help { margin-top: 20px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-md); background: var(--rg-card); overflow: hidden; }
.rg-help-t { list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; cursor: pointer; font-weight: 650; font-size: 14px; }
.rg-help-t::-webkit-details-marker, .rg-help-t::marker { display: none; content: ''; }
.rg-help-caret { width: 16px; height: 16px; transition: transform .18s; }
.rg-help[open] .rg-help-caret { transform: rotate(180deg); }
.rg-help[open] .rg-help-t { border-bottom: 1px solid var(--rg-line); }
.rg-help-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 14px 18px 18px; }
.rg-help-col h3 { font-size: 13px; margin-bottom: 7px; color: var(--rg-accent); }
.rg-help-col ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--rg-sub); }
.rg-mask { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 9, 14, .62); backdrop-filter: blur(3px); }
.rg-modal { width: min(680px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column; border: 1px solid var(--rg-line2); border-radius: var(--rg-r-lg); background: var(--rg-card); box-shadow: var(--rg-shadow); overflow: hidden; }
.rg-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--rg-line); }
.rg-modal-head h2 { font-size: 16px; font-weight: 700; }
.rg-x { width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--rg-sub); font-size: 14px; }
.rg-x:hover { background: var(--rg-card2); color: var(--rg-err); }
.rg-modal-body { padding: 14px 16px; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 11px; }
.rg-modal-foot { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--rg-line); }
.rg-form-row { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rg-form-row > label { font-size: 12.5px; color: var(--rg-sub); font-weight: 600; }
.rg-form-row input, .rg-form-row select, .rg-form-row textarea { width: 100%; }
.rg-form-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rg-form-3 label { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-size: 12.5px; color: var(--rg-sub); font-weight: 600; }
.rg-form-inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.rg-form-tip { font-size: 11.5px; color: var(--rg-faint); }
.rg-ed-steps { display: flex; flex-direction: column; gap: 8px; }
.rg-ed-step { padding: 9px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-sm); background: var(--rg-card2); display: flex; flex-direction: column; gap: 6px; }
.rg-ed-step-h { display: flex; align-items: center; gap: 7px; }
.rg-ed-step-h b { font-size: 12px; color: var(--rg-accent); }
.rg-ed-step-h input { flex: 1 1 auto; }
.rg-ed-step-h button { border: 0; background: transparent; color: var(--rg-sub); }
.rg-ed-step textarea { min-height: 58px; resize: vertical; }
.rg-note-list { display: flex; flex-direction: column; gap: 9px; }
.rg-note-item { padding: 10px; border: 1px solid var(--rg-line); border-radius: var(--rg-r-sm); background: var(--rg-card2); }
.rg-note-item b { display: block; font-size: 12.5px; color: var(--rg-accent); margin-bottom: 4px; }
.rg-note-item p { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.rg-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 100001; max-width: min(90vw, 520px); padding: 10px 18px; border-radius: 999px; background: var(--rg-card2); color: var(--rg-text); border: 1px solid var(--rg-line2); box-shadow: var(--rg-shadow); font-size: 13px; text-align: center; }
.rg-toast.is-ok { border-color: var(--rg-ok); color: var(--rg-ok); }
.rg-toast.is-err { border-color: var(--rg-err); color: var(--rg-err); }

/* ===== 响应式 ===== */
@media (max-width: 1400px) {
    .rg-rd-main { grid-template-columns: minmax(0, 218px) minmax(0, 1fr) minmax(0, 260px); }
}
@media (max-width: 1100px) {
    .rg { padding: 16px 16px 64px; }
    .rg-rd-main { grid-template-columns: minmax(0, 1fr) minmax(0, 268px); }
    .rg-rd-side { grid-column: 1 / -1; position: static; max-height: none; }
    .rg-rd-steps { flex-direction: row; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
    .rg-rd-steps li { flex: 0 0 auto; }
    .rg-step-nav { min-width: 150px; }
    .rg-rd-side-hint { display: none; }
    .rg-rd-info { top: 66px; }
    .rg-help-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rg-diag { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
    .rg-stat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rg-stat-i:nth-child(4) { border-left: 0; }
    .rg-stat-i:nth-child(n+4) { border-top: 1px solid var(--rg-line); }
}
@media (max-width: 900px) {
    .rg-rd-main { grid-template-columns: minmax(0, 1fr); }
    .rg-rd-info { position: static; max-height: none; grid-row: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .rg-rd-bar { flex-wrap: wrap; }
    .rg-rd-acts { flex: 1 1 100%; justify-content: flex-start; }
    .rg-diag { grid-template-columns: minmax(0, 1fr); }
    .rg-sym-list { flex-direction: row; flex-wrap: wrap; max-height: none; overflow: visible; }
    .rg-sym { width: auto; }
    .rg-sym small { display: none; }
    .rg-j-item { grid-template-columns: 90px minmax(0, 1fr) 80px 40px; }
    .rg-j-item span:nth-of-type(2) { display: none; }
    .rg-grid.is-table .rg-card { grid-template-columns: minmax(150px, 2fr) minmax(90px, 1fr) minmax(80px, .8fr) minmax(90px, 1fr); }
    .rg-grid.is-table .rg-card-meta .rg-badge:nth-child(n+3) { display: none; }
}
@media (max-width: 767px) {
    .rg { padding: 12px 12px 80px; font-size: 14px; }
    .rg-hero { padding: 14px; }
    .rg-hero-main { flex-wrap: wrap; gap: 10px; }
    .rg-hero-ic { width: 44px; height: 44px; font-size: 23px; }
    .rg-hero-t h1 { font-size: 20px; }
    .rg-hero-t p { font-size: 12.5px; }
    .rg-hero-acts { flex: 1 1 100%; order: 3; }
    .rg-hero-acts .rg-btn { flex: 1 1 auto; }
    .rg-fold-btn { width: 40px; height: 40px; }
    .rg-hero-tags span { font-size: 11px; padding: 3px 8px; }
    .rg-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rg-stat-i { padding: 9px 11px; }
    .rg-stat-i:nth-child(odd) { border-left: 0; }
    .rg-stat-i:nth-child(n+3) { border-top: 1px solid var(--rg-line); }
    .rg-stat-i b { font-size: 18px; }
    .rg-tabs { margin: 12px -12px; padding: 0 12px; gap: 2px; }
    .rg-tab { padding: 10px 12px; font-size: 13px; }
    .rg-tools { padding: 10px; }
    .rg-tools-row select { flex: 1 1 calc(50% - 8px); min-width: 0; }
    .rg-count { flex: 1 1 100%; margin-left: 0; text-align: right; }
    .rg-btn { min-height: 40px; padding: 7px 12px; }
    .rg select, .rg input[type="text"], .rg input[type="search"], .rg input[type="number"], .rg input[type="date"], .rg textarea { font-size: 16px; min-height: 40px; }
    .rg-search input { min-height: 42px; }
    .rg-chip { min-height: 36px; padding: 6px 12px; }
    .rg-cats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
    .rg-grid { grid-template-columns: minmax(0, 1fr); }
    .rg-grid.is-table { display: none; }
    .rg-grid.is-table + .rg-empty { display: none; }
    .rg-box-grid { grid-template-columns: minmax(0, 1fr); }
    .rg-help-body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .rg-rd-bar { top: 53px; }
    .rg-rd-acts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .rg-rd-acts::-webkit-scrollbar { display: none; }
    .rg-rd-acts .rg-btn { flex: 0 0 auto; min-width: 88px; }
    .rg-rd-side, .rg-rd-side .rg-step-nav { min-height: 40px; }
    .rg-rd-info { grid-template-columns: minmax(0, 1fr); grid-row: auto; }
    .rg-step { padding: 12px; }
    .rg-step-t { font-size: 16px; }
    .rg-j-item { grid-template-columns: minmax(0, 1fr) 80px 36px; gap: 6px; }
    .rg-j-item span:first-of-type, .rg-j-item span:nth-of-type(2) { display: none; }
    .rg-form-3 { grid-template-columns: minmax(0, 1fr); }
    .rg-mask { padding: 0; align-items: flex-end; }
    .rg-modal { width: 100%; max-width: none; max-height: 92vh; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .rg-modal-foot { flex-wrap: wrap; }
    .rg-toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) {
    .rg-hero-tags span:nth-child(n+4) { display: none; }
    .rg-rd-acts .rg-btn { flex: 0 0 auto; }
    .rg-rd-nav .rg-btn { flex: 1 1 auto; }
    .rg-card-t b { font-size: 14px; }
    .rg-tools-row .rg-btn { flex: 1 1 calc(50% - 8px); }
}
@media (hover: none) {
    .rg-card:hover { transform: none; box-shadow: var(--rg-shadow-sm); }
    .rg-btn:hover { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
    .rg *, .rg *::before, .rg *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
    .rg-tabs, .rg-tools, .rg-rd-bar, .rg-rd-nav, .rg-rd-side, .rg-rd-info, .rg-help, .rg-mask, .rg-toast, .rg-hero-acts, .rg-stat, .rg-recent { display: none !important; }
    .rg { padding: 0; }
    .rg-reader, .rg-rd-main, .rg-rd-body, .rg-rd-content { display: block !important; }
    .rg-step { break-inside: avoid; box-shadow: none; border-color: #ccc; }
    .rg-card { break-inside: avoid; }
}
