/* ==========================================================================
   검사 안내 (/diagnosis) · 치료 · 재활 (/treatment) — 방법마다 "무엇을 확인 · 치료하나요"를 먼저
   ========================================================================== */
.rehab-stages { margin-bottom: 40px; padding: 20px; border-radius: var(--radius-lg); background: #fff; }
.method-stack { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.method {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px clamp(24px, 4vw, 56px);
    padding: clamp(28px, 3.4vw, 44px) 0;
    border-bottom: 1px solid var(--line);
    align-items: start;
}
.method--photo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.method--photo.method--flip .method__media { order: 2; }
.method--photo.method--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.method:not(.method--photo) .method__body { max-width: 860px; }
.method__title { font-size: clamp(22px, 2vw, 26px); }
.method__en { margin-left: 12px; font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); }
.method__summary {
    margin-top: 14px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--action-soft);
    font-size: 18px;
    line-height: 1.55;
    font-weight: 600;
}
.section--grey .method__summary { background: #fff; }
.method__q { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 700; color: var(--action-ink); }
.method__text { margin-top: 18px; }
.method__facts { margin-top: 20px; }
.method__conditions { margin-top: 20px; }
.method__label { margin-bottom: 10px; font-size: 14px; font-weight: 700; color: var(--ink-3); }

/* 검사 비교 표 — 넓은 화면은 표, 좁은 화면은 검사마다 카드 */
.compare { overflow-x: auto; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.compare__table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.55; }
.compare__table th, .compare__table td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare__table thead th { background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; }
.compare__table tbody th { width: 18%; font-size: 17px; }
.compare__table tbody th a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.compare__table tbody th span { display: block; margin-top: 2px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); }
.compare__table td:nth-child(3) { width: 15%; font-variant-numeric: tabular-nums; }
.compare__table td:nth-child(2) { width: 33%; }
.compare__table tbody tr:last-child > * { border-bottom: 0; }

@media (max-width: 899px) {
    /* 재활 네 단계 그림: 라벨이 읽히는 크기(약 13px)를 지키고 상자 안에서만 옆으로 넘긴다 */
    .rehab-stages { overflow-x: auto; overscroll-behavior-x: contain; padding: 16px; }
    .rehab-stages .illust { min-width: 760px; }
    .method--photo, .method--photo.method--flip { grid-template-columns: minmax(0, 1fr); }
    .method--photo.method--flip .method__media { order: 0; }
}
@media (max-width: 767px) {
    .compare { border: 0; background: transparent; overflow: visible; }
    .compare__table thead { display: none; }
    .compare__table, .compare__table tbody, .compare__table tr, .compare__table th, .compare__table td { display: block; width: 100%; }
    .compare__table tr { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; overflow: hidden; }
    .compare__table tbody th { width: 100%; background: var(--bg-2); }
    /* 넓은 화면의 열 폭(td:nth-child 33% · 15%)이 카드에 남으면 글자가 한 자씩 세로로 쌓인다 */
    .compare__table td:nth-child(n) { width: 100%; }
    .compare__table td { white-space: normal !important; border-bottom: 1px solid var(--line); }
    .compare__table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-size: 13.5px; font-weight: 700; color: var(--ink-3); }
    .compare__table tbody tr:last-child > * { border-bottom: 1px solid var(--line); }
    .compare__table tr > *:last-child { border-bottom: 0 !important; }
    .method__summary { font-size: 17px; }
}
