/* 진단 방법 페이지 (style.css 토큰 사용) */
.dg-nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.dg-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.dg-nav a { text-decoration: none; color: var(--fg); font-weight: 600; font-size: 14px; }
.dg-nav a:hover { color: var(--accent); }
.dg-nav-links a { color: var(--muted); font-weight: 500; font-size: 13.5px; }

.dg-main { display: grid; gap: 40px; padding-block: 32px 8px; }
.dg-section h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 14px; }
.dg-section p { margin: 0; }
.dg-section code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); padding: 0 5px; border-radius: 4px; }

/* 흐름 */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 700; }
.steps b { font-size: 15.5px; }
.steps span { color: var(--muted); font-size: 13.5px; }

/* 도구 */
.tool { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.tool-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 12px; align-content: start; }
.tool-main b { margin-right: 6px; }
.bookmarklet { justify-self: start; display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; cursor: grab; }
.bookmarklet::before { content: '★'; margin-right: 8px; opacity: .8; }
.tool-limits { list-style: none; margin: 0; padding: 18px 20px; background: var(--warn-bg); border-radius: var(--radius); display: grid; gap: 10px; font-size: 13.5px; color: var(--fg); align-content: start; }
.tool-limits b { display: block; color: var(--warn-fg); font-size: 12.5px; }

.snippet { position: relative; min-width: 0; }
.snippet pre { margin: 0; padding: 12px 64px 12px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; line-height: 1.6; white-space: pre; }
.snippet pre code { background: none; border: 0; padding: 0; }
.snippet .copy { position: absolute; top: 8px; right: 8px; font: inherit; font-size: 12px; font-weight: 600; border: 0; background: var(--accent-soft); color: var(--accent); height: 28px; padding: 0 10px; border-radius: 6px; cursor: pointer; }
.copy:focus-visible, .bookmarklet:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 표 */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.dg-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.dg-table th, .dg-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dg-table thead th { background: var(--bg); color: var(--muted); font-weight: 600; font-size: 12.5px; }
.dg-table tbody tr:last-child td { border-bottom: 0; }
.dg-table td:first-child { white-space: nowrap; }
.dg-table td:last-child { color: var(--muted); font-size: 13.5px; }

/* 기기 */
.device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.device-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.device-card h3 { font-size: 15px; margin-bottom: 6px; }
.device-card p { color: var(--muted); font-size: 13.5px; }
.dg-note { margin-top: 12px !important; color: var(--muted); font-size: 13.5px; }

/* 기록 */
.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.two-col > div:first-child { display: grid; gap: 12px; align-content: start; }
.severity { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.sev { display: inline-block; width: 40px; text-align: center; font-size: 11.5px; font-weight: 700; padding: 1px 0; border-radius: 4px; margin-right: 8px; }
.sev.s1 { background: var(--no-bg); color: var(--no-fg); }
.sev.s2 { background: var(--warn-bg); color: var(--warn-fg); }
.sev.s3 { background: var(--skin-bg); color: var(--skin-fg); }
.count-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 10px; align-content: start; font-size: 14px; }
.count-box h3 { font-size: 15px; }

@media (max-width: 820px) {
  .tool, .two-col { grid-template-columns: minmax(0, 1fr); }
}
