/* ==========================================================================
   /tax-account/compare/ — ISA vs IRP 비교 계산기 (플로우 진단)
   ========================================================================== */

/* 페이지 타이틀 섹션 (limit와 동일 스타일 재사용) */
.compare-title-section {
    background: #fff;
    padding: 28px 24px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.compare-title-inner {
    max-width: 1240px;
    margin: 0 auto;
}
.compare-title-section h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
    display: flex; align-items: center; gap: 10px;
    line-height: 1.3;
    word-break: keep-all;
    overflow-wrap: break-word;
    flex-wrap: wrap;
}
.compare-title-section h1 .icon { color: var(--primary-color); }
.compare-title-section .subtitle {
    color: var(--text-sub);
    font-size: 1rem;
}

/* 진행 바 */
.flow-progress {
    margin-bottom: 20px;
}
.flow-progress .steps-label {
    display: flex; justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-sub);
    margin-bottom: 6px;
    font-weight: 600;
}
.flow-progress .bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.flow-progress .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

/* 질문 카드 */
.flow-step {
    display: none;
    animation: fadeIn 0.25s ease-out;
}
.flow-step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flow-question {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 6px;
}
.flow-hint {
    color: var(--text-sub);
    font-size: 0.88rem;
    margin-bottom: 18px;
}

/* 옵션 카드형 */
.flow-options {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    margin-bottom: 20px;
}
.flow-options.cols-2 { grid-template-columns: 1fr 1fr; }

.flow-option {
    display: block;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    text-align: left;
    user-select: none;
}
.flow-option:hover {
    border-color: var(--primary-border);
    background: #f8fafc;
}
.flow-option input[type=radio] { display: none; }
.flow-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
}
.flow-option .opt-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-sub);
    font-weight: 400;
    margin-top: 2px;
}
.flow-option.selected .opt-sub { color: var(--primary-dark); opacity: 0.8; }

/* Step 4 "미가입 처음 시작" 처럼 짧은 부연은 inline 한 줄 처리 */
.flow-option[data-step="4"][data-value="none"] .opt-sub {
    display: inline;
    margin: 0 0 0 14px;
}

/* 자동 진행 안내 */
.flow-hint-auto {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-sub);
    margin-top: 10px;
    font-weight: 500;
    opacity: 0.9;
}

/* ISA vs IRP 2열 비교 */
.vs-compare-table {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px;
    font-size: 0.85rem;
}
.vs-compare-table .vs-head,
.vs-compare-table .vs-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 10px 12px;
    align-items: center;
    gap: 6px;
}
/* 3열 비교 (ISA · 연금저축 · IRP) */
.vs-compare-table.triple .vs-head,
.vs-compare-table.triple .vs-row {
    /* dim 컬럼 축소 → 제품 컬럼에 더 많은 공간 */
    grid-template-columns: 0.85fr 1fr 1fr 1fr;
    padding: 8px 10px;
    gap: 4px;
    font-size: 0.78rem;
}
.vs-compare-table.triple .vs-col {
    font-size: 0.78rem;
    padding: 3px 4px;
    white-space: nowrap;              /* "900만(합산)" 줄바꿈 방지 */
    letter-spacing: -0.02em;
}
.vs-compare-table.triple .vs-dim {
    white-space: nowrap;
    letter-spacing: -0.02em;
}
.vs-compare-table.triple .vs-col.good,
.vs-compare-table.triple .vs-col.bad {
    padding: 3px 5px;
    font-size: 0.76rem;
}

/* 480px↓ — 좁은 모바일에서 비교표 컴팩트화 */
@media (max-width: 480px) {
    .vs-compare-table.triple .vs-head,
    .vs-compare-table.triple .vs-row {
        grid-template-columns: 0.75fr 1fr 1fr 1fr;
        padding: 7px 6px;              /* 좌우 패딩 축소 → 셀 너비 확보 */
        gap: 3px;
        font-size: 0.72rem;
    }
    .vs-compare-table.triple .vs-col,
    .vs-compare-table.triple .vs-dim {
        font-size: 0.72rem;
        padding: 3px 2px;
        letter-spacing: -0.03em;
    }
    .vs-compare-table.triple .vs-col.good,
    .vs-compare-table.triple .vs-col.bad {
        padding: 3px 3px;
        font-size: 0.7rem;
    }
}

/* 360px↓ — 극단 좁은 화면 (추가 자간·패딩 축소) */
@media (max-width: 360px) {
    .vs-compare-table.triple .vs-head,
    .vs-compare-table.triple .vs-row {
        grid-template-columns: 0.7fr 1fr 1fr 1fr;
        padding: 6px 4px;
        gap: 2px;
    }
    .vs-compare-table.triple .vs-col,
    .vs-compare-table.triple .vs-dim {
        font-size: 0.68rem;
        letter-spacing: -0.04em;
        padding: 3px 1px;
    }
}
.vs-compare-table .vs-col.annuity,
.vs-compare-table .vs-head .vs-col.annuity { font-weight: 800; }
.vs-compare-table .vs-head {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}
.vs-compare-table .vs-row {
    border-top: 1px solid #f1f5f9;
}
.vs-compare-table .vs-dim {
    color: var(--text-sub);
    font-weight: 600;
}
.vs-compare-table .vs-col {
    text-align: center;
    font-weight: 600;
    color: var(--text-main);
}
.vs-compare-table .vs-col.good {
    color: #166534;
    background: #f0fdf4;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 700;
}
.vs-compare-table .vs-col.bad {
    color: #991b1b;
    background: #fef2f2;
    padding: 4px 8px;
    border-radius: 6px;
}
.vs-compare-table .vs-col.isa,
.vs-compare-table .vs-head .vs-col.isa { font-weight: 800; }
.vs-compare-table .vs-col.irp,
.vs-compare-table .vs-head .vs-col.irp { font-weight: 800; }

/* 1순위 열 하이라이트 (winner-col) */
.vs-compare-table .vs-col.winner-col {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    position: relative;
}
.vs-compare-table .vs-head .vs-col.winner-col {
    background: var(--primary-color);
    color: #fff;
    box-shadow: none;
}
.vs-compare-table .vs-head .vs-col.winner-col::before {
    content: '⭐ ';
}

/* ─── 결과 하단 구간(상세해설보기 → 연말정산) 좌우 여백 ─── */
.result-details,
.cta-row,
.cta-tertiary {
    margin-left: 14px;
    margin-right: 14px;
}

/* CTA 한 줄 배치 — primary(teal) + secondary(amber, 대비) · 1:1 너비 */
.cta-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: stretch;
}
.cta-row .ta-btn-primary {
    flex: 1;                   /* 1:1 동일 너비 */
    flex-basis: 0;
    width: auto;
    min-width: 0;
    padding: 12px 14px;
    font-size: 0.85rem;        /* secondary 와 동일 */
    line-height: 1.35;
    white-space: normal;
    text-align: center;
}
.cta-row .ta-btn-primary i {
    font-size: 0.95rem;
    flex-shrink: 0;
}
.cta-row .cta-secondary {
    flex: 1;                   /* 1:1 동일 너비 */
    flex-basis: 0;
}

/* 보조 CTA — 앰버 톤 (손해·경고 감성으로 대비) */
.cta-secondary {
    --cta2-main:   #d97706;    /* amber-600 */
    --cta2-dark:   #b45309;    /* amber-700 */
    --cta2-light:  #fffbeb;    /* amber-50 */
    --cta2-border: #fcd34d;    /* amber-300 */

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 10px;
    background: var(--cta2-light);
    color: var(--cta2-dark);
    font-size: 0.85rem;        /* primary 와 동일 */
    font-weight: 700;
    line-height: 1.35;
    border: 1.5px solid var(--cta2-border);
    border-radius: 10px;
    transition: var(--transition);
    white-space: normal;
    text-align: center;
    position: relative;
}
.cta-secondary i {
    font-size: 0.85rem;
    color: var(--cta2-main);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.cta-secondary:hover {
    background: #fef3c7;       /* amber-100 */
    border-color: var(--cta2-main);
    color: var(--cta2-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.18);
    text-decoration: none;
}
.cta-secondary:hover i {
    transform: translateX(3px);
}

/* 절세효과 표 "자세히 →" 인라인 링크 */
.benefit-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.78rem;
    margin-left: 4px;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.benefit-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Tertiary CTA — 시즌성 참고 링크 (subtle, 텍스트 링크 톤) */
.cta-tertiary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    margin-bottom: 12px;
    background: transparent;
    color: var(--text-sub);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;       /* slate-200 — 매우 옅게 */
    border-radius: 8px;
    transition: var(--transition);
}
.cta-tertiary i {
    font-size: 0.9rem;
    color: #94a3b8;                  /* slate-400 */
    transition: color 0.2s ease, transform 0.2s ease;
}
.cta-tertiary .cta-tertiary-arrow {
    margin-left: 2px;
    font-size: 0.85rem;
}
.cta-tertiary:hover {
    color: var(--text-main);
    border-color: #cbd5e1;           /* slate-300 */
    background: #f8fafc;             /* slate-50 */
    text-decoration: none;
}
.cta-tertiary:hover i {
    color: var(--text-main);
}
.cta-tertiary:hover .cta-tertiary-arrow {
    transform: translateX(2px);
}

/* 모바일 (480px↓) — 360px 에서도 데스크톱(400px)과 동일 가로 레이아웃 유지 */
@media (max-width: 480px) {
    .result-details,
    .cta-row,
    .cta-tertiary {
        margin-left: 10px;         /* 여백만 살짝 축소 */
        margin-right: 10px;
    }
    .cta-row {
        gap: 6px;                  /* 간격 살짝 축소 */
    }
    .cta-row .ta-btn-primary,
    .cta-row .cta-secondary {
        padding: 10px 8px;         /* 좁은 폭 대응 */
        font-size: 0.78rem;        /* 가로 유지 위해 축소 */
        line-height: 1.3;
    }
    .cta-tertiary {
        font-size: 0.76rem;
        padding: 8px 10px;
    }
}

/* 네비 버튼 */
.flow-nav {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.flow-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}
.flow-btn.primary {
    background: var(--primary-color);
    color: #fff;
}
.flow-btn.primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.flow-btn.primary:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}
.flow-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}
.flow-btn.secondary:hover:not(:disabled) { background: #e2e8f0; }
.flow-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 결과 패널 */
.compare-result {
    display: none;
    animation: fadeIn 0.3s ease-out;
}
.compare-result.active { display: block; }

.winner-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    color: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 10px 20px rgba(8, 145, 178, 0.2);
}
.winner-card .label {
    font-size: 0.88rem;
    opacity: 0.9;
    margin-bottom: 6px;
    font-weight: 600;
}
.winner-card .type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.22);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 10px;
    backdrop-filter: blur(4px);
    flex-wrap: wrap;
}
.winner-card .type-badge .type-hint {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.85;
}
.winner-card .order {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

/* 순위 리스트 — 가로 3칸 (금·은·동) */
.winner-card .rank-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0 14px;
}
.winner-card .rank-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    text-align: center;
}
.winner-card .rank-item.first {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
}
.winner-card .rank-medal { font-size: 1.4rem; line-height: 1; }
.winner-card .rank-no {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.winner-card .rank-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

/* 기대효과 / 채택 이유 */
.winner-card .rank-explain {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.winner-card .ex-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 0.84rem;
    line-height: 1.5;
    padding: 3px 0;
}
.winner-card .ex-label {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 62px;
}
.winner-card .ex-val {
    color: #fff;
    font-weight: 500;
}
.winner-card .reason-row {
    margin-bottom: 16px;
}
.winner-card .reason-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.winner-card .reason {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.winner-card .reason .chip {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    line-height: 1.3;
    white-space: nowrap;
}

/* 납입·절세 임팩트 한 문장 (다른 영역과 동일 크기, 절세는 색으로 강조) */
.winner-card .winner-impact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}
.winner-card .winner-impact b {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
/* 절세 금액만 포인트 컬러 강조 */
.winner-card .impact-right b {
    color: #fef08a;   /* 연한 노랑 — 가독성·대비 확보 */
}
.winner-card .impact-arrow {
    opacity: 0.6;
    font-weight: 700;
    font-size: 0.9rem;
}
.winner-card .winner-impact-hint {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    line-height: 1.5;
}
.winner-card .winner-impact-hint b {
    font-weight: 700;
    color: #fff;
}

/* 연간 세혜택 / 최대 가능 2열 */
.winner-card .winner-refund-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    gap: 8px;
    margin-bottom: 10px;
}
.winner-card .winner-refund-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.winner-card .winner-refund-cell .r-label {
    font-size: 0.72rem;
    opacity: 0.85;
    font-weight: 600;
    margin-bottom: 4px;
}
.winner-card .winner-refund-cell .r-value {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.winner-card .winner-refund-cell.max .r-value {
    opacity: 0.75;
    font-size: 1rem;
}
.winner-card .winner-refund-divider {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.35);
}
.winner-card .winner-ratio {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 10px 0 14px;
    line-height: 1.5;
}
.winner-card .winner-ratio b {
    color: #fff;
    font-weight: 700;
}
.winner-card .winner-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.winner-card .winner-progress-fill {
    height: 100%;
    background: #fef3c7;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(254, 243, 199, 0.5);
}
.winner-card .winner-progress-label {
    font-size: 0.78rem;
    opacity: 0.95;
    line-height: 1.4;
    text-align: center;
}
.winner-card .winner-progress-label b {
    font-weight: 900;
    color: #fef3c7;
}

/* 액션 리스트 */
.action-list {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 16px;
}
.action-list h3 {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.action-item {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed #e2e8f0;
}
.action-item:last-child { border-bottom: none; }

/* 단계 그룹 (선행 · 동시 · 여유 시) */
.action-group {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
}
.action-group:last-child { margin-bottom: 0; }
.action-group-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}
.action-group-prior .action-group-label { color: #b45309; }    /* 선행 = 주의 오렌지 */
.action-group-parallel .action-group-label { color: var(--primary-color); }
.action-group-optional .action-group-label { color: #64748b; } /* 여유 = 회색 */

/* 그룹 내 여러 행 간격 (3개 시: 1위 단독 행 + 2·3위 병렬 행) */
.action-group > .action-group-items + .action-group-items {
    margin-top: 8px;
}

/* 병렬 배치 (동시) — flex로 ISA + "+" + 연저 한 줄 */
.action-group-items.parallel {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.action-group-items.parallel .action-item {
    flex: 1 1 0;
    min-width: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 10px;
}
.action-group-items.parallel .action-plus {
    flex-shrink: 0;
    align-self: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
    padding: 0 2px;
    line-height: 1;
}
/* action-group 제목은 항상 2줄 (t-main 큰 글씨, t-sub 작은 글씨) */
.action-group .step-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 4px;
}
.action-group .step-title .t-main {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}
.action-group .step-title .t-sub {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
/* 병렬 아이템에서만 살짝 폰트 축소 */
.action-group-items.parallel .step-title .t-main { font-size: 0.92rem; }
.action-group-items.parallel .step-title .t-sub  { font-size: 0.76rem; }
.action-group-items:not(.parallel) .action-item {
    padding: 4px 0;
    border: none;
}
/* 그룹 내 action-item 숫자 뱃지 제거 */
.action-group .action-num { display: none; }
.action-group .action-content .step-title {
    font-size: 0.92rem;
    margin-bottom: 3px;
}
.action-group .action-content .step-desc {
    font-size: 0.82rem;
    line-height: 1.45;
}
/* 병렬 아이템 내부 desc는 자간·폰트 더 타이트하게 (한 줄 유지용) */
.action-group-items.parallel .step-desc {
    font-size: 0.78rem;
    letter-spacing: -0.02em;
    line-height: 1.5;
    white-space: nowrap;
}

/* 초좁은 모바일(<340px)에서만 세로로 fallback */
@media (max-width: 340px) {
    .action-group-items.parallel {
        flex-direction: column;
    }
    .action-group-items.parallel .action-plus {
        align-self: center;
    }
}
.action-num {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.action-content { flex: 1; }
.action-content .step-title {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}
.action-content .step-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
}
.action-content .step-desc .action-link {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--primary-border);
    transition: var(--transition);
}
.action-content .step-desc .action-link:hover {
    color: var(--primary-color);
    text-decoration-color: currentColor;
}

/* 결과 상세 (접힘) — 절세 내역·비교표 토글 */
.result-details {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    margin: 14px 14px;          /* 좌우 14px 여백 통일 */
    overflow: hidden;
}
.result-details summary {
    padding: 12px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
    transition: var(--transition);
}
.result-details summary::-webkit-details-marker { display: none; }
.result-details summary::after {
    content: "▼";
    font-size: 0.7rem;
    color: var(--text-sub);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.result-details[open] summary::after { transform: rotate(180deg); }
.result-details summary:hover {
    background: #f8fafc;
    color: var(--primary-dark);
}
.result-details[open] summary {
    border-bottom: 1px solid #e2e8f0;
}
/* 상세 해설 보기 내부 3블록 */
.result-details .detail-block {
    padding: 14px;
    border-top: 1px solid #f1f5f9;
}
.result-details .detail-block:first-of-type { border-top: none; }
.result-details .detail-h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 10px;
}
.result-details .detail-block .benefit-summary,
.result-details .detail-block .info-box,
.result-details .detail-block .vs-compare-table {
    margin: 0;
}
.result-details .detail-block .info-box {
    background: #f8fafc;
    border-left: 3px solid var(--primary-color);
    padding: 10px 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #334155;
    border-radius: 0 6px 6px 0;
}
.result-details .benefit-note {
    font-size: 0.75rem;
    color: var(--text-sub);
    margin-top: 8px;
    line-height: 1.45;
}

/* 세혜택 요약 */
.benefit-summary {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.benefit-summary h4 {
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-weight: 700;
}
.benefit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.92rem;
    gap: 12px;
}
.benefit-row > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.benefit-row .b-prod {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
}
.benefit-row small {
    font-size: 0.74rem;
    color: var(--text-sub);
    font-weight: 400;
    line-height: 1.4;
}
.benefit-row > b:last-child {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.benefit-row.total {
    border-top: 1px solid var(--primary-border);
    margin-top: 4px;
    padding-top: 10px;
}
.benefit-row.total .b-prod {
    color: var(--primary-dark);
    font-weight: 800;
}
.benefit-row.total > b:last-child {
    font-size: 1.15rem;
}

/* 비상금 안내 박스 내 단독 restart-btn만 적용 (ta-action-row 내부는 .ta-action-btn 스타일 그대로) */
.emergency-alert .restart-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    transition: var(--transition);
}
.emergency-alert .restart-btn:hover {
    background: var(--primary-light);
}

/* 비상금 먼저 안내 */
.emergency-alert {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.emergency-alert h3 {
    color: #92400e;
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.emergency-alert p {
    color: #1e293b;              /* 검정톤 — 가독성 ↑ */
    line-height: 1.65;
    font-size: 0.93rem;
}
.emergency-alert ul,
.emergency-alert ul li {
    color: #1e293b !important;   /* 인라인 color 덮어쓰기 */
}
.emergency-alert p b,
.emergency-alert p strong,
.emergency-alert ul li b,
.emergency-alert ul li strong {
    color: #0f172a;              /* 조금 더 진한 검정 */
}
.emergency-type-badge {
    display: inline-block;
    background: #92400e;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.emergency-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 10px;
    background: #fff;
    color: #92400e;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.emergency-cta:hover {
    background: #fef3c7;
    color: #78350f;
}

/* 두 버튼 한 줄 배치 (파킹통장 가이드 + 다시 진단) — 세로 높이 강조 */
.emergency-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}
.emergency-actions .emergency-cta,
.emergency-actions .emergency-restart {
    margin: 0;
    width: 100%;
    padding: 16px 12px;          /* 세로 높이 확대 (11 → 16) */
    font-size: 0.92rem;
    font-weight: 700;
    min-height: 52px;            /* 일관된 높이 보장 */
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 파킹통장 가이드 — amber 고대비 */
.emergency-actions .emergency-cta {
    background: #f59e0b;         /* amber-500 솔리드 */
    color: #fff;
    border-color: #d97706;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.25);
}
.emergency-actions .emergency-cta:hover {
    background: #d97706;         /* amber-600 */
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.35);
}
/* 다시 진단 — teal 아웃라인 */
.emergency-actions .emergency-restart {
    background: #fff;
    color: var(--primary-dark);
    border: 1.5px solid var(--primary-color);
}
.emergency-actions .emergency-restart:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-1px);
}
@media (max-width: 480px) {
    .emergency-actions { gap: 8px; }
    .emergency-actions .emergency-cta,
    .emergency-actions .emergency-restart {
        padding: 14px 8px;
        font-size: 0.85rem;
        letter-spacing: -0.025em;
        min-height: 48px;
    }
}
@media (max-width: 360px) {
    .emergency-actions .emergency-cta,
    .emergency-actions .emergency-restart {
        font-size: 0.8rem;
        letter-spacing: -0.03em;
        padding: 13px 6px;
    }
}

/* 가이드 섹션 공유 (limit-calc.css와 동일 패턴) */
.guide-section {
    background: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(8, 145, 178, 0.08);
}
.guide-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
}
.guide-section p {
    color: #334155;
    line-height: 1.8;
    margin-bottom: 12px;
    /* 한글 가독성 표준 (A-8/A-9) */
    word-break: keep-all;
    letter-spacing: -0.01em;
}
.guide-section ul {
    margin: 10px 0 14px 0;
    padding-left: 18px;
    color: #334155;
}
.guide-section ul li {
    margin-bottom: 8px;
    line-height: 1.7;
    word-break: keep-all;
    letter-spacing: -0.01em;
}
.guide-section strong { color: var(--text-main); }
.guide-section h3 {
    font-size: 1rem;
    margin: 16px 0 8px;
    color: var(--primary-dark);
    word-break: keep-all;
    letter-spacing: -0.02em;
    line-height: 1.4;
}
.guide-section table,
.guide-section .info-box,
.guide-section .warning-box,
.guide-section .success-box {
    word-break: keep-all;
    letter-spacing: -0.01em;
}

/* ─── 섹션 0: 한눈에 비교 카드 3장 (ISA/연저/IRP) ─── */
.intro-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px 0 18px;
}
.intro-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.intro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.intro-card.isa    { border-color: #93c5fd; background: #eff6ff; }   /* blue */
.intro-card.annuity{ border-color: #fcd34d; background: #fffbeb; }   /* amber */
.intro-card.irp    { border-color: #86efac; background: #f0fdf4; }   /* green */

.intro-card .ic-emoji {
    font-size: 2rem;
    line-height: 1;
}
.intro-card .ic-name {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.intro-card .ic-main {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
    letter-spacing: -0.02em;
    word-break: keep-all;
}
.intro-card .ic-points {
    list-style: none;
    padding: 0;
    margin: 4px 0;
    font-size: 0.8rem;
    color: var(--text-sub);
    line-height: 1.6;
    letter-spacing: -0.02em;
}
.intro-card .ic-points li {
    margin: 0;
    padding: 0;
}
.intro-card .ic-tag {
    margin-top: auto;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .intro-cards {
        grid-template-columns: 1fr;   /* 모바일 세로 스택 */
        gap: 8px;
    }
    .intro-card {
        padding: 14px 12px;
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 12px;
    }
    .intro-card .ic-emoji { font-size: 1.8rem; flex-shrink: 0; }
    .intro-card .ic-name {
        position: absolute;        /* 이모지 옆에 붙여야 깔끔한데 단순화 위해 inline */
        display: none;             /* 모바일엔 이모지가 식별자 */
    }
    .intro-card .ic-main {
        font-size: 0.95rem;
        flex: 1;
    }
    .intro-card .ic-points {
        flex-shrink: 0;
        font-size: 0.72rem;
        text-align: right;
    }
    .intro-card .ic-tag {
        display: none;             /* 모바일엔 공간 절약 */
    }
}
@media (max-width: 480px) {
    .intro-card {
        padding: 12px 10px;
        gap: 10px;
    }
    .intro-card .ic-emoji { font-size: 1.6rem; }
    .intro-card .ic-main { font-size: 0.88rem; letter-spacing: -0.025em; }
    .intro-card .ic-points { font-size: 0.7rem; }
}

/* ─── 섹션 0: 한 줄 비교표 ─── */
.account-compare {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.88rem;
}
.account-compare thead th {
    background: #f1f5f9;
    padding: 10px 8px;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    letter-spacing: -0.01em;
}
.account-compare tbody th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-sub);
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    width: 20%;
    font-size: 0.84rem;
    letter-spacing: -0.02em;
}
.account-compare tbody td {
    padding: 10px 8px;
    text-align: center;
    color: var(--text-main);
    border-bottom: 1px solid #f1f5f9;
    word-break: keep-all;
    letter-spacing: -0.02em;
    font-weight: 600;
}
.account-compare tbody tr:last-child td,
.account-compare tbody tr:last-child th { border-bottom: none; }

@media (max-width: 480px) {
    .account-compare { font-size: 0.78rem; }
    .account-compare thead th,
    .account-compare tbody th,
    .account-compare tbody td { padding: 8px 6px; letter-spacing: -0.03em; }
    .account-compare tbody th { font-size: 0.74rem; }
}
@media (max-width: 360px) {
    .account-compare { font-size: 0.74rem; }
    .account-compare tbody th,
    .account-compare tbody td { padding: 7px 4px; letter-spacing: -0.035em; }
}

/* ─── 섹션 0: 상세 설명 접힘 ─── */
.account-details {
    margin-top: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.account-details summary {
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.15s;
}
.account-details summary::-webkit-details-marker { display: none; }
.account-details summary::after {
    content: "▼";
    font-size: 0.7rem;
    color: var(--text-sub);
    transition: transform 0.2s;
}
.account-details[open] summary::after { transform: rotate(180deg); }
.account-details summary:hover { background: #f1f5f9; }
.account-details > h3,
.account-details > p,
.account-details > ul {
    padding-left: 16px;
    padding-right: 16px;
}
.account-details > h3 {
    margin-top: 14px !important;
}
.account-details > h3:first-of-type { margin-top: 10px !important; }
.account-details > ul { padding-right: 16px; }
.account-details > *:last-child {
    padding-bottom: 14px;
}
.warning-box {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 14px 0;
    color: #92400e;
    font-size: 0.93rem;
    line-height: 1.7;
}
.info-box {
    background: var(--primary-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 12px 16px;
    margin: 12px 0;
    color: #0f172a;
    font-size: 0.92rem;
    line-height: 1.7;
}

/* 모바일 — 군인 계산기 패턴 */
@media (max-width: 768px) {
    .compare-title-section { padding: 20px 16px 18px; }
    .compare-title-section h1 { font-size: 1.5rem; }
    .flow-options.cols-2 { grid-template-columns: 1fr; }
    .guide-section { padding: 20px 18px; border-radius: 12px; }
    .winner-card .order { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .compare-title-section h1 { font-size: 1.4rem; letter-spacing: -0.03em; }
    .compare-title-section .subtitle { font-size: 0.92rem; }
    .guide-section h2 { font-size: 1.15rem; }
    .flow-question { font-size: 1.05rem; }
}
