/*
 * it-hp 병원·의원 온프레미스 AI 구축 제안 페이지 전용 스타일 (/sub/hospital-ai)
 * - style.css(Vite 번들)에 섞지 않고 $additional_css 훅으로만 로드한다.
 * - 테마 변수(--blue-*, --navy-*, --border-*, --text-*)만 사용하고 단색만 쓴다.
 */

/* 한글 단어 중간에서 줄이 끊기지 않게 (URL 같은 긴 토큰은 아래 개별 규칙으로 허용) */
.hai-page {
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* ── 섹션 내 바로가기 ─────────────────────────────── */
.hai-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
}

.hai-jump a {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: 999px;
    background: #fff;
    color: var(--text-secondary, #344054);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.hai-jump a:hover,
.hai-jump a:focus-visible {
    border-color: var(--blue-500, #1e63f0);
    color: var(--blue-600, #0b4dd8);
}

/* ── 공통 본문/고지 ───────────────────────────────── */
.hai-lead {
    max-width: 880px;
    margin: 0 auto;
}

.hai-lead p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--text-secondary, #344054);
}

.hai-note {
    margin: 24px auto 0;
    max-width: 880px;
    padding: 16px 20px;
    border-left: 4px solid var(--blue-600, #0b4dd8);
    border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
    background: var(--bg-light, #f5f7fa);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-muted, #475467);
}

.hai-note strong {
    color: var(--text-primary, #101828);
}

/* ── 공개 사례 수치 ───────────────────────────────── */
.hai-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

.hai-stat {
    padding: 22px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
}

.hai-stat-num {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--blue-600, #0b4dd8);
}

.hai-stat-num small {
    margin-left: 4px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted, #475467);
}

.hai-stat-label {
    margin: 10px 0 0;
    font-weight: 700;
    color: var(--text-primary, #101828);
}

.hai-stat-desc {
    margin: 4px 0 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted, #475467);
}

/* ── 출처 캡처 + 원칙 ─────────────────────────────── */
.hai-source {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    margin-top: 48px;
}

.hai-figure {
    margin: 0;
}

.hai-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(16, 24, 40, 0.05));
}

.hai-figure figcaption {
    margin-top: 10px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted, #475467);
}

.hai-figure figcaption a {
    color: var(--blue-600, #0b4dd8);
    word-break: break-all;
}

.hai-principles {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: hai-principle;
}

.hai-principles li {
    position: relative;
    margin: 0 0 16px;
    padding: 0 0 0 46px;
    counter-increment: hai-principle;
}

.hai-principles li::before {
    content: counter(hai-principle);
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue-600, #0b4dd8);
    color: #fff;
    font-weight: 800;
    line-height: 32px;
    text-align: center;
}

.hai-principles strong {
    display: block;
    color: var(--text-primary, #101828);
}

.hai-principles span {
    display: block;
    margin-top: 2px;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-muted, #475467);
}

/* ── 구성도 ───────────────────────────────────────── */
.hai-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1.25fr) 36px minmax(0, 1fr);
    align-items: stretch;
}

.hai-flow-col {
    padding: 20px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
}

.hai-flow-core {
    border: 2px solid var(--blue-500, #1e63f0);
    background: var(--blue-50, #f2f6fe);
}

.hai-flow-title {
    margin: 0 0 12px;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--blue-600, #0b4dd8);
}

.hai-flow-item {
    margin: 0 0 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-light, #eef1f5);
    border-radius: var(--radius-md, 8px);
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--text-muted, #475467);
}

.hai-flow-core .hai-flow-item {
    border-color: #cfd9ee;
}

.hai-flow-item strong {
    display: block;
    color: var(--text-primary, #101828);
}

.hai-gate {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: var(--radius-md, 8px);
    background: var(--blue-600, #0b4dd8);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
}

.hai-flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blue-600, #0b4dd8);
}

.hai-flow-arrow::before {
    content: "\2192";
}

.hai-secure {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
    margin: 16px 0 0;
    padding: 16px 22px;
    border-radius: var(--radius-lg, 12px);
    background: var(--navy-900, #0d1b2e);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9375rem;
}

.hai-secure strong {
    color: #fff;
}

.hai-secure ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hai-secure li::before {
    content: "\2713";
    margin-right: 6px;
    color: #7aa5ff;
    font-weight: 800;
}

/* ── 모듈 카드 ────────────────────────────────────── */
.hai-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}

.hai-tags li {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--blue-50, #f2f6fe);
    color: var(--blue-700, #083aa6);
    font-size: 0.75rem;
    font-weight: 600;
}

.hai-card-ref {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color, #e3e8ef);
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--text-light, #667085);
}

.hai-card-ref strong {
    color: var(--text-muted, #475467);
}

/* ── 규모별 구성안 ────────────────────────────────── */
.hai-tiers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hai-tier {
    display: flex;
    flex-direction: column;
    padding: 26px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
}

.hai-tier-feat {
    border: 2px solid var(--blue-500, #1e63f0);
}

.hai-tier-label {
    margin: 0 0 6px;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--blue-600, #0b4dd8);
}

.hai-tier h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.hai-tier p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-muted, #475467);
}

.hai-tier ul {
    flex: 1;
    margin: 0 0 14px;
    padding-left: 18px;
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text-secondary, #344054);
}

.hai-tier-basis {
    margin: 0;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color, #e3e8ef);
    font-size: 0.8125rem;
    color: var(--text-light, #667085);
}

/* ── 진행 절차 ────────────────────────────────────── */
.hai-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: hai-step;
}

.hai-step {
    position: relative;
    padding: 56px 18px 20px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
    counter-increment: hai-step;
}

.hai-step::before {
    content: "STEP 0" counter(hai-step);
    position: absolute;
    left: 18px;
    top: 18px;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--blue-600, #0b4dd8);
}

.hai-step h3 {
    margin: 0 0 6px;
    font-size: 1.0625rem;
}

.hai-step p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text-muted, #475467);
}

/* ── 보안 설계 / 수행 범위 ────────────────────────── */
.hai-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hai-checks li {
    position: relative;
    padding: 0 0 0 30px;
    line-height: 1.7;
    color: var(--text-secondary, #344054);
}

.hai-checks li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--blue-50, #f2f6fe);
    color: var(--blue-600, #0b4dd8);
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 22px;
    text-align: center;
}

.hai-checks strong {
    color: var(--text-primary, #101828);
}

.hai-caps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hai-cap {
    display: block;
    height: 100%;
    padding: 18px 20px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.hai-cap:hover,
.hai-cap:focus-visible {
    border-color: var(--blue-500, #1e63f0);
    box-shadow: var(--shadow-md, 0 4px 10px -2px rgba(16, 24, 40, 0.08));
}

.hai-cap strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary, #101828);
}

.hai-cap span {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-muted, #475467);
}

/* ── FAQ ──────────────────────────────────────────── */
.hai-faq {
    max-width: 880px;
    margin: 0 auto;
}

.hai-faq details {
    margin: 0 0 10px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-md, 8px);
    background: #fff;
}

.hai-faq summary {
    position: relative;
    padding: 16px 52px 16px 20px;
    font-weight: 700;
    color: var(--text-primary, #101828);
    cursor: pointer;
    list-style: none;
}

.hai-faq summary::-webkit-details-marker {
    display: none;
}

.hai-faq summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    margin-top: -14px;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 28px;
    color: var(--blue-600, #0b4dd8);
}

.hai-faq details[open] summary::after {
    content: "\2212";
}

.hai-faq summary:focus-visible {
    outline: 2px solid var(--blue-500, #1e63f0);
    outline-offset: 2px;
}

.hai-faq-a {
    margin: 0;
    padding: 0 20px 18px;
    line-height: 1.8;
    color: var(--text-secondary, #344054);
}

/* ── 반응형 ───────────────────────────────────────── */
@media (max-width: 1199px) {
    .hai-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .hai-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hai-source,
    .hai-tiers {
        grid-template-columns: minmax(0, 1fr);
    }

    .hai-flow {
        grid-template-columns: minmax(0, 1fr);
    }

    .hai-flow-arrow {
        height: 36px;
    }

    .hai-flow-arrow::before {
        content: "\2193";
    }
}

@media (max-width: 767px) {
    .hai-checks,
    .hai-steps {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .hai-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .hai-stat-num {
        font-size: 1.75rem;
    }
}

/* ── 업무별 제안 상품 블록 ────────────────────────── */
.hai-jump-center {
    justify-content: center;
    margin: 0 0 40px;
}

.hai-prod {
    margin: 0 0 36px;
    padding: 30px;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-lg, 12px);
    background: #fff;
    scroll-margin-top: 90px;
}

.hai-prod-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0 0 22px;
}

.hai-prod-no {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--blue-600, #0b4dd8);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hai-prod-head h3 {
    margin: 0;
    font-size: 1.5rem;
}

.hai-prod-head h3 i {
    margin-right: 6px;
    color: var(--blue-600, #0b4dd8);
}

.hai-prod-head p {
    flex-basis: 100%;
    margin: 0;
    color: var(--text-muted, #475467);
}

.hai-prod-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 32px;
    align-items: center;
}

.hai-prod:nth-of-type(even) .hai-prod-scene {
    order: 2;
}

.hai-prod-scene {
    margin: 0;
}

.hai-prod-scene img,
.hai-prod-diagram img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border-color, #e3e8ef);
    border-radius: var(--radius-md, 8px);
}

.hai-prod-scene figcaption,
.hai-prod-diagram figcaption {
    margin-top: 8px;
    font-size: 0.8125rem;
    color: var(--text-light, #667085);
}

.hai-prod-before {
    margin: 0 0 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    background: var(--bg-light, #f5f7fa);
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-secondary, #344054);
}

.hai-prod-before strong {
    display: block;
    margin-bottom: 2px;
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
    color: var(--blue-600, #0b4dd8);
}

.hai-prod-desc {
    margin: 0 0 12px;
    line-height: 1.75;
    color: var(--text-secondary, #344054);
}

.hai-prod-feat {
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.hai-prod-feat li {
    position: relative;
    margin: 0 0 6px;
    padding-left: 26px;
    line-height: 1.6;
    color: var(--text-secondary, #344054);
}

.hai-prod-feat li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--blue-50, #f2f6fe);
    color: var(--blue-600, #0b4dd8);
    font-size: 0.6875rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.hai-prod-act {
    margin: 16px 0 0;
}

.hai-prod-diagram {
    margin: 28px 0 0;
    padding-top: 24px;
    border-top: 1px dashed var(--border-color, #e3e8ef);
}

.hai-prod-diagram a {
    display: block;
}

.hai-prod-diagram a:hover img,
.hai-prod-diagram a:focus-visible img {
    border-color: var(--blue-500, #1e63f0);
}

@media (max-width: 991px) {
    .hai-prod {
        padding: 22px;
    }

    .hai-prod-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .hai-prod:nth-of-type(even) .hai-prod-scene {
        order: 0;
    }
}

@media (max-width: 480px) {
    .hai-prod {
        padding: 16px;
    }

    .hai-prod-head h3 {
        font-size: 1.25rem;
    }
}
