/* ============================================================
   SOPHIA — AI 전문사업 (/aibiz, /aibiz/<slug>, index AI 섹션)
   White / Gray 디자인 시스템(style.css) 토큰을 그대로 사용
   ============================================================ */
:root {
    --ai-warn: #b91c1c;
    --ai-warn-soft: #fdf2f2;
    --ai-gold: var(--gpu-gold);
    --ai-gold-soft: #fbf6e8;
    --ai-ok: #15803d;
}

/* ── 공통 조각 ── */
.ab-chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 5px 12px; border-radius: 100px;
    border: 1px solid var(--border); background: var(--white);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; color: var(--gray-500);
}
.ab-chip i { font-size: 0.62rem; color: var(--gray-500); }
.ab-chip.warn { border-color: #f3c6c6; background: var(--ai-warn-soft); color: var(--ai-warn); }
.ab-chip.warn .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ai-warn); box-shadow: 0 0 0 0 rgba(185,28,28,.45); animation: abPulse 1.6s infinite; }
.ab-chip.flag { border-color: #e6d7a8; background: var(--ai-gold-soft); color: var(--ai-gold); }
.ab-chip.flag i { color: var(--ai-gold); }
@keyframes abPulse { 0% { box-shadow: 0 0 0 0 rgba(185,28,28,.45);} 70% { box-shadow: 0 0 0 8px rgba(185,28,28,0);} 100% { box-shadow: 0 0 0 0 rgba(185,28,28,0);} }

.ab-stars { display: inline-flex; gap: 1px; }
.ab-stars i { font-size: 0.62rem; color: var(--gray-200); }
.ab-stars i.on { color: var(--ai-gold); }

.ab-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--gray-50); border: 1px solid var(--border); color: var(--gray-500);
    display: flex; align-items: center; justify-content: center; font-size: 0.9rem;
    transition: all var(--transition);
}
.ab-pill { display: inline-block; padding: 3px 10px; border-radius: 100px; background: var(--gray-50); border: 1px solid var(--border); font-size: 0.7rem; color: var(--gray-700); white-space: nowrap; }

.ab-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ab-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ab-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ab-grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.ab-mt { margin-top: 32px; }

.ab-card {
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px; transition: all var(--transition);
}
.ab-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.ab-card:hover .ab-icon { background: var(--gray-700); color: var(--white); border-color: var(--gray-700); }
.ab-card h3 { font-size: 0.9rem; font-weight: 700; color: var(--gray-900); margin: 14px 0 6px; line-height: 1.35; }
.ab-card p { font-size: 0.78rem; color: var(--gray-500); line-height: 1.8; }
a.ab-card { text-decoration: none; display: block; color: inherit; }

/* ── Hero (서비스 페이지) ── */
.ab-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.ab-hero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.ab-hero .ab-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 1.2rem; background: var(--gray-900); color: var(--white); border-color: var(--gray-900); margin-bottom: 16px; }
.ab-hero .page-hero-title { margin-bottom: 4px; }
.ab-hero .en { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-300); margin-bottom: 16px; }
.ab-hero .tagline { font-size: 1.05rem; font-weight: 600; color: var(--gray-700); margin-bottom: 10px; line-height: 1.5; }
.ab-hero .summary { font-size: 0.86rem; color: var(--gray-500); line-height: 1.85; max-width: 600px; margin-bottom: 20px; }
.ab-hero .flagnote { font-size: 0.74rem; color: var(--ai-gold); font-weight: 600; margin-bottom: 22px; }
.ab-hero .flagnote i { font-size: 0.62rem; margin-right: 5px; }
.ab-hero .buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.ab-profile { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; box-shadow: var(--shadow-sm); }
.ab-profile .label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray-300); margin-bottom: 12px; }
.ab-profile .no { position: absolute; right: 20px; top: 14px; font-family: var(--font-mono); font-size: 2rem; font-weight: 600; color: var(--gray-100); line-height: 1; }
.ab-profile .row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.8rem; }
.ab-profile .row:last-child { border-bottom: none; }
.ab-profile .row > span:first-child { display: flex; align-items: center; gap: 8px; color: var(--gray-500); }
.ab-profile .row > span:first-child i { width: 14px; text-align: center; font-size: 0.7rem; color: var(--gray-300); }
.ab-profile .val { color: var(--gray-900); font-weight: 700; }

/* ── Threat (플래그십) ── */
.ab-threat { background: var(--gray-50); }
.ab-threat-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: start; margin-bottom: 40px; }
.ab-threat-head .ab-chip { margin-bottom: 16px; }
.ab-threat-head h2 { font-size: 1.45rem; font-weight: 800; color: var(--gray-900); line-height: 1.35; letter-spacing: -0.02em; margin-bottom: 14px; }
.ab-threat-head .lead { font-size: 0.84rem; color: var(--gray-700); line-height: 1.9; }
.ab-tl { position: relative; padding-left: 26px; }
.ab-tl::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--gray-200); }
.ab-tl-item { position: relative; padding-bottom: 20px; }
.ab-tl-item:last-child { padding-bottom: 0; }
.ab-tl-item::before { content: ''; position: absolute; left: -24px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gray-50); border: 2px solid var(--ai-warn); }
.ab-tl-item:nth-child(n+3)::before { border-color: var(--gray-500); }
.ab-tl-when { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; color: var(--gray-300); }
.ab-tl-who { font-size: 0.88rem; font-weight: 700; color: var(--gray-900); margin: 3px 0 4px; }
.ab-tl-what { font-size: 0.76rem; color: var(--gray-500); line-height: 1.75; }
.ab-lesson .ab-icon { background: var(--ai-warn-soft); border-color: #f3c6c6; color: var(--ai-warn); }
.ab-lesson:hover .ab-icon { background: var(--ai-warn); border-color: var(--ai-warn); color: var(--white); }
.ab-source { margin-top: 18px; font-size: 0.68rem; color: var(--gray-300); text-align: right; }

/* ── Metrics ── */
.ab-metrics { padding: 28px 52px; border-bottom: 1px solid var(--gray-100); background: var(--white); }
.ab-metrics .ab-grid-4 > div { text-align: center; padding: 6px 12px; border-right: 1px solid var(--gray-100); }
.ab-metrics .ab-grid-4 > div:last-child { border-right: none; }
.ab-metrics strong { display: block; font-size: 1.6rem; font-weight: 900; letter-spacing: -0.03em; color: var(--gray-900); line-height: 1.1; margin-bottom: 4px; }
.ab-metrics span { font-size: 0.72rem; color: var(--gray-500); }

/* ── Pains ── */
.ab-pain .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ab-pain .top .ab-icon { background: var(--ai-warn-soft); border-color: #f3c6c6; color: var(--ai-warn); width: 36px; height: 36px; font-size: 0.8rem; }
.ab-pain .top span { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--gray-300); }
.ab-pain p { font-size: 0.86rem; font-weight: 500; color: var(--gray-900); line-height: 1.65; }
.ab-pain:hover .ab-icon { background: var(--ai-warn); color: var(--white); border-color: var(--ai-warn); }
.ab-pain-arrow { text-align: center; margin-top: 28px; font-size: 0.84rem; font-weight: 700; color: var(--gray-700); }
.ab-pain-arrow i { display: block; font-size: 0.9rem; color: var(--gray-300); margin-bottom: 6px; }

/* ── Perspectives ── */
.ab-persp { display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.ab-persp .role { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-300); margin-bottom: 4px; }
.ab-persp h3 { margin: 0 0 6px; }

/* ── Compare (compare-table 확장) ── */
.compare-table .ab-l { color: var(--gray-500); }
.compare-table .ab-l::before, .compare-table .td-highlight.ab-r::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.62rem; margin-right: 8px; }
.compare-table .ab-l::before { content: '\f00d'; color: var(--gray-200); }
.compare-table .td-highlight.ab-r::before { content: '\f00c'; color: var(--ai-ok); }

/* ── Process (가로) ── */
.ab-process { display: grid; position: relative; gap: 0; margin-top: 32px; }
.ab-process::before { content: ''; position: absolute; top: 20px; left: 8%; right: 8%; height: 1px; background: var(--gray-200); }
.ab-step { text-align: center; padding: 0 10px; position: relative; }
.ab-step .num { width: 40px; height: 40px; border-radius: 50%; background: var(--white); border: 1px solid var(--gray-300); color: var(--gray-900); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; margin: 0 auto 14px; position: relative; z-index: 1; transition: all var(--transition); }
.ab-step:hover .num { background: var(--gray-900); color: var(--white); border-color: var(--gray-900); }
.ab-step h3 { font-size: 0.86rem; font-weight: 700; color: var(--gray-900); margin-bottom: 5px; }
.ab-step p { font-size: 0.74rem; color: var(--gray-500); line-height: 1.7; }

/* ── Stack ── */
.ab-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.ab-stack span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 100px; background: var(--white); border: 1px solid var(--border); font-size: 0.76rem; color: var(--gray-700); transition: all var(--transition); }
.ab-stack span i { font-size: 0.58rem; color: var(--gray-300); }
.ab-stack span:hover { border-color: var(--gray-700); }

/* ── Checklist ── */
.ab-check { display: grid; gap: 10px; margin-top: 32px; max-width: 820px; }
.ab-check-item { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; }
.ab-check-item .num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 7px; background: var(--ai-gold-soft); color: var(--ai-gold); font-weight: 800; font-size: 0.74rem; display: flex; align-items: center; justify-content: center; }
.ab-check-item p { font-size: 0.86rem; font-weight: 500; color: var(--gray-900); line-height: 1.6; padding-top: 3px; }
.ab-check-note { margin-top: 18px; font-size: 0.8rem; color: var(--gray-500); max-width: 820px; }
.ab-check-note strong { color: var(--gray-900); }

/* ── Related ── */
.ab-related small { display: block; margin-top: 10px; font-size: 0.7rem; color: var(--gray-300); }

/* ── 개요 페이지 ── */
.ab-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.ab-kpi > div { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.ab-kpi strong { display: block; font-size: 1.7rem; font-weight: 900; letter-spacing: -0.03em; color: var(--gray-900); line-height: 1.1; }
.ab-kpi strong small { font-size: 0.5em; color: var(--gray-500); margin-left: 2px; }
.ab-kpi span { font-size: 0.72rem; color: var(--gray-500); }

.ab-spot { padding: 28px; position: relative; }
.ab-spot .top { display: flex; justify-content: space-between; align-items: flex-start; }
.ab-spot .ab-icon { width: 48px; height: 48px; border-radius: 12px; font-size: 1.1rem; background: var(--gray-900); color: var(--white); border-color: var(--gray-900); }
.ab-spot h3 { font-size: 1.15rem; margin-top: 18px; }
.ab-spot .tag { font-size: 0.86rem; color: var(--gray-700); font-weight: 600; margin-bottom: 10px; }
.ab-spot .lead { font-size: 0.76rem; color: var(--gray-500); margin-bottom: 14px; }
.ab-spot ul { list-style: none; display: grid; gap: 8px; margin-bottom: 18px; }
.ab-spot li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.78rem; color: var(--gray-500); line-height: 1.6; }
.ab-spot li i { flex-shrink: 0; width: 16px; height: 16px; border-radius: 4px; background: var(--gray-100); color: var(--gray-700); font-size: 0.5rem; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.ab-spot li strong { color: var(--gray-900); }
.ab-spot .go { font-size: 0.8rem; font-weight: 700; color: var(--gray-900); }
.ab-spot .go i { font-size: 0.66rem; margin-left: 4px; transition: transform var(--transition); }
.ab-spot:hover .go i { transform: translateX(3px); }

.ab-cat-big { padding: 26px; }
.ab-cat-big .head { display: flex; gap: 14px; align-items: center; }
.ab-cat-big .head h3 { margin: 0 0 2px; font-size: 1rem; }
.ab-cat-big .outlook { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ai-ok); display: inline-flex; align-items: center; gap: 6px; }
.ab-cat-big .reason { font-size: 0.78rem; color: var(--gray-700); margin: 14px 0 8px; }
.ab-cat-big .reason strong { color: var(--gray-900); }
.ab-cat-big .desc { margin-bottom: 16px; }
.ab-cat-big .links { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-cat-big .links a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 100px; border: 1px solid var(--border); background: var(--off-white); font-size: 0.72rem; color: var(--gray-700); text-decoration: none; transition: all var(--transition); }
.ab-cat-big .links a i { font-size: 0.58rem; color: var(--gray-300); }
.ab-cat-big .links a:hover { border-color: var(--gray-700); color: var(--gray-900); background: var(--white); }

.ab-table-wrap { overflow-x: auto; margin-top: 32px; border: 1px solid var(--border); border-radius: var(--radius); }
.ab-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; min-width: 760px; }
.ab-table th { text-align: left; padding: 14px 16px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-300); background: var(--gray-50); border-bottom: 1px solid var(--border); }
.ab-table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.ab-table tr:last-child td { border-bottom: none; }
.ab-table tbody tr:hover td { background: var(--off-white); }
.ab-table .no { font-family: var(--font-mono); font-size: 0.72rem; color: var(--gray-300); }
.ab-table .name { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gray-900); font-weight: 700; }
.ab-table .name .ab-icon { width: 34px; height: 34px; border-radius: 9px; font-size: 0.74rem; }
.ab-table .name:hover { color: var(--gray-700); }
.ab-table .name:hover .ab-icon { background: var(--gray-700); color: var(--white); border-color: var(--gray-700); }
.ab-table .cat { display: block; font-size: 0.68rem; color: var(--gray-300); font-weight: 400; margin-top: 2px; }
.ab-table .go { font-size: 0.74rem; color: var(--gray-500); text-decoration: none; white-space: nowrap; }
.ab-table .go:hover { color: var(--gray-900); }
.ab-table-note { margin-top: 10px; font-size: 0.68rem; color: var(--gray-300); text-align: right; }

/* ── index: AI 섹션 ── */
.ab-home-alert {
    display: grid; grid-template-columns: 44px 1fr auto; gap: 20px; align-items: center;
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px 24px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.ab-home-alert .ab-icon { background: var(--ai-warn-soft); border-color: #f3c6c6; color: var(--ai-warn); width: 44px; height: 44px; }
.ab-home-alert h3 { font-size: 1rem; font-weight: 800; color: var(--gray-900); margin: 8px 0 6px; letter-spacing: -0.01em; }
.ab-home-alert p { font-size: 0.78rem; color: var(--gray-500); line-height: 1.75; }
.ab-home-alert .actions { display: flex; flex-direction: column; gap: 8px; }
.ab-home-alert .actions a { white-space: nowrap; padding: 10px 16px; font-size: 0.78rem; }
.ab-svc { padding: 18px 16px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.ab-svc .top { display: flex; justify-content: space-between; align-items: center; }
.ab-svc .ab-icon { width: 34px; height: 34px; border-radius: 9px; font-size: 0.74rem; }
.ab-svc .no { font-family: var(--font-mono); font-size: 0.64rem; color: var(--gray-300); }
.ab-svc h4 { font-size: 0.82rem; font-weight: 700; color: var(--gray-900); line-height: 1.35; margin: 4px 0 0; }
.ab-svc .meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.6rem; color: var(--gray-300); }
.ab-svc .price { margin-top: auto; padding-top: 6px; font-size: 0.68rem; color: var(--gray-500); }
.ab-svc .price i { color: var(--gray-300); margin-right: 5px; font-size: 0.6rem; }
.ab-svc .flag { position: absolute; top: 0; right: 0; background: var(--ai-gold); color: var(--white); font-size: 0.52rem; font-weight: 800; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 0 var(--radius) 0 8px; }
.ab-svc.is-flag { border-color: #e6d7a8; }
.ab-home-more { text-align: center; margin-top: 28px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .ab-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .ab-grid-4, .ab-kpi { grid-template-columns: repeat(2, 1fr); }
    .ab-process { grid-template-columns: repeat(2, 1fr) !important; gap: 28px 14px; }
    .ab-process::before { display: none; }
    .ab-hero-grid, .ab-threat-head { grid-template-columns: 1fr; gap: 28px; }
    .ab-home-alert { grid-template-columns: 44px 1fr; }
    .ab-home-alert .actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
    .ab-metrics .ab-grid-4 > div:nth-child(2) { border-right: none; }
}
@media (max-width: 900px) {
    .ab-metrics { padding: 22px; }
    .ab-grid-2, .ab-grid-3, .ab-grid-4, .ab-grid-5, .ab-kpi, .ab-process { grid-template-columns: 1fr !important; }
    .ab-persp { grid-template-columns: 1fr; }
    .ab-home-alert { grid-template-columns: 1fr; padding: 18px; }
    .ab-metrics .ab-grid-4 > div { border-right: none; border-bottom: 1px solid var(--gray-100); padding-bottom: 14px; }
    .ab-metrics .ab-grid-4 > div:last-child { border-bottom: none; }
}
