/* ============================================================
   갈등사례 DB - 공통 스타일
   ============================================================ */

:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-soft: #eef2f7;

    --brand: #1d4ed8;
    --brand-dark: #1e40af;
    --brand-soft: #eff4ff;
    --navy: #0b1f3a;
    --navy-2: #14366b;

    --amber: #b45309;
    --amber-soft: #fff6e5;
    --green: #047857;
    --green-soft: #e9fbf3;
    --red: #b91c1c;
    --red-soft: #fef1f1;
    --violet: #5b21b6;
    --violet-soft: #f3efff;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.09);
    --shadow-lg: 0 24px 60px rgba(4, 16, 40, 0.35);

    --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
            'Segoe UI', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid rgba(29, 78, 216, 0.45);
    outline-offset: 2px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------
   헤더 / 푸터
   ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 32px; height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--navy), var(--brand));
    color: #fff;
    font-size: 16px;
}

.brand__badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 600;
}

/* 헤더 우측: DB 소스 메뉴(넘치면 가로 스크롤) + 수집 관리(항상 보임) */
.site-header__menu {
    display: flex;
    align-items: center;
    min-width: 0;
}

/* DB 소스 메뉴 */
.source-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.source-nav::-webkit-scrollbar { display: none; }

.source-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: none;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.source-nav__item:hover { background: var(--line-soft); color: var(--ink); }
.source-nav__item.is-active { background: var(--navy); color: #fff; }

.source-nav__count {
    padding: 0 7px;
    border-radius: 999px;
    background: var(--line-soft);
    color: var(--ink-2);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.7;
}

.source-nav__item.is-active .source-nav__count { background: rgba(255, 255, 255, 0.18); color: #fff; }
.source-nav__divider { flex: none; width: 1px; height: 20px; margin: 0 6px; background: var(--line); }
.source-nav__item--admin { color: var(--muted); font-weight: 500; }

/* 헤더가 좁아지면 덜 중요한 것부터 숨긴다: 배지 → 건수 (그래도 넘치면 DB 소스 메뉴만 가로 스크롤) */
@media (max-width: 1180px) { .brand__badge { display: none; } }
@media (max-width: 1060px) { .source-nav__count { display: none; } }

.site-footer {
    margin-top: 72px;
    padding: 28px 0 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
}

/* ------------------------------------------------------------
   히어로 / 검색
   ------------------------------------------------------------ */
.hero {
    position: relative;
    padding: 56px 0 84px;
    background:
        radial-gradient(1200px 380px at 85% -10%, rgba(59, 130, 246, 0.35), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
    pointer-events: none;
}

.hero .container { position: relative; max-width: 860px; text-align: center; }

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
}

.hero h1 {
    margin-top: 16px;
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.hero__lead {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15.5px;
}

.search-panel {
    margin-top: 28px;
    padding: 6px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    text-align: left;
    color: var(--ink);
}

.search-panel textarea {
    display: block;
    width: 100%;
    min-height: 58px;
    max-height: 200px;
    padding: 16px 18px 8px;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    font-size: 16.5px;
    line-height: 1.55;
}

.search-panel textarea::placeholder { color: #94a3b8; }

.search-panel:focus-within { box-shadow: var(--shadow-lg), 0 0 0 4px rgba(96, 165, 250, 0.45); }

.search-panel__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 6px 6px 14px;
}

.search-panel__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

/* 검색 범위 선택: 분류 · 기간 · 지역 */
.search-panel__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 12px 8px;
}

.search-panel__filters .select--scope { height: 36px; font-size: 13.5px; max-width: 260px; }

/* 목록 화면의 기간·지역·정렬 */
.toolbar__filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.toolbar__filters .select.is-scoped { border-color: var(--brand); background-color: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.toolbar__note { color: var(--muted); font-size: 13px; }

.chip.chip--oldlaw { background: #fde8c8; color: #8a4b08; }
.chip.chip--region { background: #e8f5ee; color: #166534; }
.detail-hero .chip--oldlaw { padding: 5px 12px; font-size: 13px; }

.notice--flat { margin-bottom: 0; }
.hero__eyebrow-sub { opacity: 0.7; font-weight: 400; }
.cat-head__links { display: inline-flex; gap: 6px; margin-left: auto; }
.cat-head__links .cat-head__etc { margin-left: 0; }

.select--scope {
    height: 42px;
    max-width: 210px;
    border-radius: 12px;
    background-color: #f8fafc;
    color: var(--ink-2);
    font-weight: 600;
    text-overflow: ellipsis;
}

.select--scope.is-scoped { border-color: var(--brand); background-color: var(--brand-soft); color: var(--brand-dark); }

.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
    user-select: none;
}

.switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.switch__track {
    position: relative;
    flex: none;
    width: 38px; height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.18s ease;
}

.switch__track::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease;
}

.switch input:checked + .switch__track { background: var(--brand); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch__track { outline: 3px solid rgba(29, 78, 216, 0.45); outline-offset: 2px; }
.switch input:disabled + .switch__track { opacity: 0.5; }

.switch__hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    height: 42px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 650;
    font-size: 14.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--primary:disabled { background: #93a9e8; cursor: progress; }

.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: #c7d2fe; color: var(--brand-dark); background: var(--brand-soft); }

.btn--block { width: 100%; }

.spinner {
    width: 15px; height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.examples {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.examples__label { align-self: center; margin-right: 2px; }

.example-chip {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.example-chip:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.4); }

/* ------------------------------------------------------------
   통합 검색 홈
   ------------------------------------------------------------ */
.main.main--home { margin-top: 0; }
.hero:not(.hero--source) { padding-bottom: 64px; }

.section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 32px 0 12px;
}

.section-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.section-head__hint { color: var(--muted); font-size: 13px; }
.section-head--results { justify-content: space-between; align-items: center; }
.section-head--flush { margin-top: 0; }

.source-grid { display: flex; flex-wrap: wrap; gap: 14px; }

.source-card {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 380px;
    max-width: 640px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.source-card:hover { transform: translateY(-2px); border-color: #c7d2fe; box-shadow: var(--shadow-md); }

.source-card__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--brand));
    color: #fff;
    font-size: 22px;
}

.source-card__body { display: grid; gap: 2px; min-width: 0; }
.source-card__name { font-size: 16.5px; font-weight: 700; letter-spacing: -0.02em; }
.source-card__org { color: var(--muted); font-size: 12.5px; }
.source-card__desc { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }

.source-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12.5px;
}

.source-card__meta strong { color: var(--brand); font-size: 15px; }
.source-card__go { margin-left: auto; color: var(--brand); font-size: 18px; transition: transform 0.18s ease; }
.source-card:hover .source-card__go { transform: translateX(3px); }

.home-more { margin-top: 28px; text-align: center; }

.chip.chip--new { background: #dc2626; color: #fff; }
.chip.chip--source { background: var(--navy); color: #fff; }

/* ------------------------------------------------------------
   탭 / 툴바
   ------------------------------------------------------------ */
.main { margin-top: -34px; position: relative; }

.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
}

.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; }

.tab__count {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--line-soft);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.tab[aria-selected="true"] .tab__count { background: rgba(255, 255, 255, 0.18); color: #fff; }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 26px 0 18px;
}

.toolbar__title { font-size: 15px; color: var(--ink-2); }
.toolbar__title strong { color: var(--ink); font-size: 17px; }

.select {
    height: 38px;
    padding: 0 34px 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%2364748b'%3E%3Cpath d='M8 11.5 2.5 6h11z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    -webkit-appearance: none;
    font-size: 14px;
    cursor: pointer;
}

/* ------------------------------------------------------------
   칩
   ------------------------------------------------------------ */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--line-soft);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.chip--type { background: var(--brand-soft); color: var(--brand-dark); }
.chip--parties { background: var(--amber-soft); color: var(--amber); }
.chip--chunk { background: var(--violet-soft); color: var(--violet); }
/* 하이브리드 검색: 검색어 낱말이 그대로 든 사례 */
.chip.chip--kw { background: #fff3c4; color: #7a5200; }
.snippet mark { padding: 0 2px; border-radius: 3px; background: #ffeb99; color: inherit; }
.result-summary__hint { color: var(--muted); font-size: 13px; }

.chip--on-dark {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 13px;
}

/* ------------------------------------------------------------
   갈등 대분류
   ------------------------------------------------------------ */
/* 대분류별 색 (categories.py 의 대분류 코드) */
.cat--comp    { --cat: #1d4ed8; --cat-soft: #eff4ff; }   /* 보상 */
.cat--proc    { --cat: #b45309; --cat-soft: #fff6e5; }   /* 수용·절차 */
.cat--right   { --cat: #6d28d9; --cat-soft: #f3efff; }   /* 소유·경계·권리 */
.cat--dev     { --cat: #0e7490; --cat-soft: #e6f7fb; }   /* 개발사업 */
.cat--siting  { --cat: #c2410c; --cat-soft: #fff1e6; }   /* 시설 입지 */
.cat--env     { --cat: #15803d; --cat-soft: #eafaf0; }   /* 환경·생활피해 */
.cat--nonland { --cat: #475569; --cat-soft: #eef2f7; }   /* 토지 외 공공갈등 */
.cat--etc     { --cat: #64748b; --cat-soft: #eef2f7; }
/* 연구 문헌: 핵심 키워드 영역 (categories.LIT_CATEGORIES) */
.cat--lit_own     { --cat: #6d28d9; --cat-soft: #f3efff; }   /* 토지 소유 */
.cat--lit_use     { --cat: #b45309; --cat-soft: #fff6e5; }   /* 이용 규제 */
.cat--lit_plan    { --cat: #0e7490; --cat-soft: #e6f7fb; }   /* 국토·도시계획 */
.cat--lit_dev     { --cat: #1d4ed8; --cat-soft: #eff4ff; }   /* 개발·정비사업 */
.cat--lit_info    { --cat: #475569; --cat-soft: #eef2f7; }   /* 토지정보·등기 */
.cat--lit_trade   { --cat: #be185d; --cat-soft: #fdf0f6; }   /* 부동산 거래 */
.cat--lit_tax     { --cat: #c2410c; --cat-soft: #fff1e6; }   /* 세제·부담금 */
.cat--lit_fin     { --cat: #047857; --cat-soft: #e9fbf3; }   /* 금융·서비스 */
.cat--lit_market  { --cat: #a16207; --cat-soft: #fef9e6; }   /* 시장 관리 */
.cat--lit_hazard  { --cat: #15803d; --cat-soft: #eafaf0; }   /* 재해·환경 */
.cat--lit_contrib { --cat: #7c3aed; --cat-soft: #f5f0ff; }   /* 공공기여 */

.chip--cat { background: var(--cat-soft, var(--line-soft)); color: var(--cat, var(--ink-2)); }

.chip--link { transition: background 0.15s ease; }
.chip--link:hover { background: rgba(255, 255, 255, 0.24); }

.cat-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 28px 0 12px;
}

.cat-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.cat-head__hint { color: var(--muted); font-size: 13px; }

.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));   /* 대분류 7개 → 4 + 3 */
    gap: 10px;
}

.cat-head__etc {
    margin-left: auto;
    padding: 2px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.cat-head__etc:hover, .cat-head__etc.is-active { border-color: var(--navy); background: var(--navy); color: #fff; }

.cat-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cat-tile:hover {
    transform: translateY(-2px);
    border-color: var(--cat);
    box-shadow: var(--shadow-md);
}

.cat-tile__icon {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--cat-soft);
    color: var(--cat);
    font-size: 17px;
}

.cat-tile__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.cat-tile__name {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.cat-tile__desc {
    display: -webkit-box;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cat-tile__count {
    color: var(--cat);
    font-size: 20px;
    font-weight: 750;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.cat-tile__count small { margin-left: 1px; font-size: 12px; font-weight: 600; }

.cat-tile.is-active { background: var(--cat); border-color: var(--cat); box-shadow: var(--shadow-md); }
.cat-tile.is-active .cat-tile__name { color: #fff; }
.cat-tile.is-active .cat-tile__desc { color: rgba(255, 255, 255, 0.78); }
.cat-tile.is-active .cat-tile__icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.cat-tile.is-active .cat-tile__count { color: #fff; }

/* 선택된 대분류의 중분류 줄 */
.sub-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--cat);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.sub-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sub-chip:hover { border-color: var(--cat); color: var(--cat); background: var(--cat-soft); }
.sub-chip.is-active { border-color: var(--cat); background: var(--cat); color: #fff; }

.sub-chip__count {
    padding: 0 7px;
    border-radius: 999px;
    background: var(--cat-soft);
    color: var(--cat);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.7;
}

.sub-chip.is-active .sub-chip__count { background: rgba(255, 255, 255, 0.2); color: #fff; }

.toolbar__reset {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 600;
}

.toolbar__reset:hover { border-color: #c7d2fe; color: var(--brand-dark); background: var(--brand-soft); }

.cat-note { margin-top: 4px; padding: 10px 0 12px; border-top: 1px solid var(--line-soft); line-height: 1.6; }

@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (max-width: 720px) {
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-tile { padding: 12px; }
    .cat-tile__desc { display: none; }
    .cat-head { flex-wrap: wrap; gap: 2px 10px; }
}

/* ------------------------------------------------------------
   사례 카드 목록
   ------------------------------------------------------------ */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.case-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.case-card:hover {
    transform: translateY(-3px);
    border-color: #c7d2fe;
    box-shadow: var(--shadow-md);
}

.case-card__title {
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-card__preview {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 12.5px;
}

.case-card__who {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.case-card__who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.case-card__go {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: none;
    color: var(--brand);
    font-weight: 650;
}

.case-card:hover .case-card__go i { transform: translateX(3px); }
.case-card__go i { transition: transform 0.18s ease; }

/* ------------------------------------------------------------
   페이지네이션
   ------------------------------------------------------------ */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.pagination a, .pagination span {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
}

.pagination a:hover { border-color: #c7d2fe; color: var(--brand-dark); background: var(--brand-soft); }
.pagination .is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination .is-gap { border-color: transparent; background: transparent; color: var(--muted); }
.pagination .is-disabled { color: #cbd5e1; }

/* ------------------------------------------------------------
   검색 결과
   ------------------------------------------------------------ */
.results { margin-top: 26px; }

.result-summary {
    margin-bottom: 14px;
    color: var(--ink-2);
    font-size: 15px;
}

.result-summary q { quotes: '“' '”'; font-weight: 700; color: var(--ink); }
.result-summary strong { color: var(--brand); }
.result-summary .chip { margin-right: 4px; vertical-align: 1px; }

.link-button {
    margin-left: 8px;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.link-button:hover { border-color: #c7d2fe; color: var(--brand-dark); background: var(--brand-soft); }

.notice {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13.5px;
}

.notice i { flex: none; margin-top: 1px; }
.notice--warn { border-color: #fde4b5; background: var(--amber-soft); color: #7c3f06; }
.notice--error { border-color: #fbcaca; background: var(--red-soft); color: #8f1c1c; }

.result-card {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 132px;
    gap: 16px;
    margin-bottom: 12px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.result-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); }

.result-card__rank {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    border-radius: 11px;
    background: var(--line-soft);
    color: var(--ink-2);
    font-weight: 750;
    font-size: 14px;
}

.result-card:nth-of-type(-n+3) .result-card__rank { background: var(--navy); color: #fff; }

.result-card__title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.4;
}

.result-card__title a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.result-card .chips { margin-top: 8px; }

.snippet {
    margin-top: 12px;
    padding: 12px 14px;
    border-left: 3px solid #c7d2fe;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: #f8fafc;
    color: var(--ink-2);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-line;
}

.snippet__label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.score { text-align: right; }
.score__value { font-size: 22px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; }
.score__value small { font-size: 13px; font-weight: 600; margin-left: 1px; }
.score__label { margin-top: 2px; font-size: 12px; font-weight: 650; }

.score__bar {
    height: 6px;
    margin-top: 8px;
    border-radius: 999px;
    background: var(--line-soft);
    overflow: hidden;
}

.score__bar span { display: block; height: 100%; border-radius: inherit; }

.score--high { color: var(--green); }
.score--high .score__bar span { background: #10b981; }
.score--mid { color: var(--amber); }
.score--mid .score__bar span { background: #f59e0b; }
.score--low { color: var(--muted); }
.score--low .score__bar span { background: #94a3b8; }

.empty {
    padding: 64px 24px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
    color: var(--muted);
}

.empty i { font-size: 34px; color: #94a3b8; }
.empty h2 { margin: 10px 0 4px; font-size: 17px; color: var(--ink-2); }

/* ------------------------------------------------------------
   AI 분석 리포트
   ------------------------------------------------------------ */
.report {
    margin-bottom: 22px;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.report__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(120deg, var(--navy), #1d4ed8);
    color: #fff;
}

.report__head i { font-size: 18px; }
.report__head h2 { font-size: 16px; font-weight: 700; }

.report__model {
    margin-left: auto;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 12px;
    font-weight: 600;
}

.report__body { padding: 8px 24px 20px; font-size: 15px; line-height: 1.8; color: var(--ink-2); }

.report__body h1, .report__body h2, .report__body h3, .report__body h4 {
    margin: 22px 0 8px;
    color: var(--ink);
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.report__body h1, .report__body h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.report__body p { margin: 8px 0; }
.report__body ul, .report__body ol { margin: 8px 0; padding-left: 22px; }
.report__body li { margin: 4px 0; }
.report__body strong { color: var(--ink); }
.report__body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.report__body th, .report__body td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.report__body th { background: #f8fafc; }
.report__body code { padding: 1px 5px; border-radius: 5px; background: var(--line-soft); font-size: 0.92em; }
.report__body hr { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }

.report__foot {
    padding: 12px 24px;
    border-top: 1px solid var(--line-soft);
    background: #f8fafc;
    color: var(--muted);
    font-size: 12.5px;
}

.skeleton { padding: 22px 24px; }

.skeleton__line {
    height: 12px;
    margin: 12px 0;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef2f7 25%, #e2e8f0 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

.skeleton__line:nth-child(1) { width: 38%; height: 14px; }
.skeleton__line:nth-child(3) { width: 92%; }
.skeleton__line:nth-child(4) { width: 76%; }
.skeleton__line:nth-child(5) { width: 58%; }

.skeleton__note { margin-top: 16px; color: var(--muted); font-size: 13px; }

@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ------------------------------------------------------------
   상세 페이지
   ------------------------------------------------------------ */
.detail-hero {
    padding: 34px 0 78px;
    background:
        radial-gradient(900px 300px at 90% -20%, rgba(59, 130, 246, 0.32), transparent 60%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    color: #fff;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 600;
}

.back-link:hover { background: rgba(255, 255, 255, 0.18); }

.detail-hero h1 {
    margin: 18px 0 14px;
    max-width: 900px;
    font-size: clamp(24px, 3.4vw, 32px);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.3;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
    margin-top: -48px;
}

.detail-side { position: sticky; top: 80px; display: grid; gap: 18px; }
.detail-main { display: grid; gap: 18px; min-width: 0; }

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.panel__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-soft);
}

.panel__head h2 { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }

.panel__icon {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 15px;
}

.panel__tag {
    margin-left: auto;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--violet-soft);
    color: var(--violet);
    font-size: 11.5px;
    font-weight: 700;
}

.panel__body { padding: 20px 22px 22px; }
.panel__body--flush { padding: 6px 22px 10px; }

/* 개요 */
.overview { color: var(--ink-2); line-height: 1.8; }
.overview > :first-child { margin-top: 0; }

.ov-h1 {
    margin: 22px 0 10px;
    padding-left: 12px;
    border-left: 4px solid var(--brand);
    color: var(--ink);
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.4;
}

.ov-h2 { margin: 14px 0 6px; color: var(--ink); font-weight: 650; }

.ov-li1, .ov-li2, .ov-num { position: relative; margin: 6px 0; }
.ov-li1 { padding-left: 18px; }
.ov-li1::before { content: ''; position: absolute; left: 3px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.ov-li2 { padding-left: 34px; }
.ov-li2::before { content: ''; position: absolute; left: 18px; top: 0.85em; width: 8px; height: 2px; background: #94a3b8; }
.ov-num { padding-left: 18px; }
.ov-p { margin: 8px 0; }

.plain-text { white-space: pre-line; color: var(--ink-2); line-height: 1.8; }

/* 원문 전문 (접이식) */
.fulltext > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.fulltext > summary::-webkit-details-marker { display: none; }
.fulltext[open] > summary { border-bottom: 1px solid var(--line-soft); }
.fulltext__hint { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.fulltext__body { max-height: 640px; overflow: auto; font-size: 14px; }

/* 연혁 타임라인 */
.timeline { list-style: none; margin: 0; padding: 0; }

.timeline__item {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 22px;
    padding-bottom: 18px;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
    content: '';
    position: absolute;
    left: 122px;
    top: 8px; bottom: -8px;
    width: 2px;
    background: var(--line);
}

.timeline__item:last-child::before { display: none; }

.timeline__item::after {
    content: '';
    position: absolute;
    left: 117px;
    top: 7px;
    width: 12px; height: 12px;
    border: 3px solid var(--surface);
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 1px #c7d2fe;
}

.timeline__date {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    line-height: 1.9;
}

.timeline__text { padding-left: 10px; color: var(--ink-2); line-height: 1.75; }

/* AI 구조화 분석 */
.insight-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.insight {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-top: 3px solid #94a3b8;
    border-radius: var(--radius-sm);
    background: #fcfdfe;
}

.insight__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

.insight__body { color: var(--ink-2); font-size: 14px; line-height: 1.75; white-space: pre-line; }

.insight--cause { border-top-color: #f59e0b; }
.insight--cause .insight__head { color: var(--amber); }
.insight--pro_side { border-top-color: #10b981; }
.insight--pro_side .insight__head { color: var(--green); }
.insight--con_side { border-top-color: #ef4444; }
.insight--con_side .insight__head { color: var(--red); }
.insight--result { border-top-color: #3b82f6; }
.insight--result .insight__head { color: var(--brand-dark); }

.fine-print { margin-top: 14px; color: var(--muted); font-size: 12.5px; }

/* 기본 정보 */
.info-list { margin: 0; }

.info-list__row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
}

.info-list__row:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); font-weight: 500; }
.info-list dd { margin: 0; color: var(--ink); font-weight: 600; }

.ref-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.ref-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    font-size: 13.5px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ref-link:hover { border-color: #c7d2fe; background: var(--brand-soft); }
.ref-link i { flex: none; color: var(--muted); }
.ref-link__text { min-width: 0; }
.ref-link__source { display: block; font-weight: 600; color: var(--ink); }
.ref-link__domain { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------
   수집 관리 / 로그인
   ------------------------------------------------------------ */
.detail-hero--admin { padding: 34px 0 40px; }
.admin-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.admin-hero h1 { margin: 0 0 8px; }
.admin-hero__lead { max-width: 720px; color: rgba(255, 255, 255, 0.75); font-size: 14.5px; line-height: 1.7; }
.admin-hero .back-link { cursor: pointer; font-family: inherit; }

.admin-layout { padding-top: 24px; }
.admin-layout > .notice { margin-bottom: 18px; }

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.admin-main { display: grid; gap: 14px; min-width: 0; }

.pipeline {
    display: flex;
    align-items: stretch;
    gap: 6px;
    flex-wrap: wrap;
}

.pipeline__stage {
    flex: 1 1 110px;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.pipeline__stage.is-pending { border-color: #fde4b5; background: var(--amber-soft); }
.pipeline__num { display: block; font-size: 22px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pipeline__label { color: var(--muted); font-size: 12.5px; }
.pipeline__label em { color: var(--amber); font-style: normal; font-weight: 700; }
.pipeline__arrow { align-self: center; color: #cbd5e1; }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; margin: 16px 0 0; font-size: 14px; }
.kv--stack { grid-template-columns: minmax(0, 1fr); }
.kv > div { display: flex; gap: 10px; align-items: baseline; }
.kv dt { flex: none; width: 84px; color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; }

.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--line-soft);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge--success { background: var(--green-soft); color: var(--green); }
.badge--partial { background: var(--amber-soft); color: var(--amber); }
.badge--failed { background: var(--red-soft); color: var(--red); }
.badge--running { background: var(--brand-soft); color: var(--brand-dark); }

.schedule-form { display: grid; gap: 16px; }
.schedule-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.schedule-form .kv { margin-top: 0; }

.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .select { width: 100%; }

.input {
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    font-size: 15px;
}

.input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15); }

.spinner--dark { border-color: rgba(29, 78, 216, 0.25); border-top-color: var(--brand); }
.run-live { margin-bottom: 18px; border-color: #c7d2fe; }
.run-live__source { color: var(--muted); font-weight: 500; font-size: 14px; }
.run-live__stop { margin-left: auto; padding: 5px 12px; font-size: 13px; color: var(--red); border-color: #fbcaca; }
.run-live__stop:hover { background: var(--red-soft); }

.steps { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 14px; padding: 0; list-style: none; }

.steps__item { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600; }

.steps__dot {
    display: grid;
    place-items: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--line-soft);
    color: var(--muted);
    font-size: 12px;
}

.steps__item.is-done { color: var(--green); }
.steps__item.is-done .steps__dot { background: var(--green-soft); color: var(--green); }
.steps__item.is-active { color: var(--brand-dark); }
.steps__item.is-active .steps__dot { background: var(--brand); color: #fff; }

.log-box {
    max-height: 260px;
    margin: 0;
    padding: 12px 14px;
    overflow: auto;
    border-radius: var(--radius-sm);
    background: #0f172a;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Consolas, 'D2Coding', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-box--small { max-height: 200px; margin-top: 10px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.table th { background: #f8fafc; color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .nowrap { white-space: nowrap; }
.table summary { cursor: pointer; color: var(--ink-2); }
.table details[open] summary { margin-bottom: 8px; color: var(--ink); font-weight: 600; }

.run-cases { margin: 6px 0; padding-left: 18px; color: var(--ink-2); }
.run-cases a { color: var(--brand); }
.run-cases a:hover { text-decoration: underline; }

.login-page { display: grid; place-items: center; padding: 72px 24px; }
.login-card { display: grid; gap: 14px; width: 100%; max-width: 380px; padding: 32px 28px; }
.login-card h1 { font-size: 21px; font-weight: 750; letter-spacing: -0.02em; }
.login-card__lead { color: var(--muted); font-size: 13.5px; }

.login-card__icon {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 13px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 21px;
}

/* 관리 페이지 탭 (수집 관리 / 방문자 로그) */
.admin-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 18px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
}

.admin-tabs__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 600;
}

.admin-tabs__item:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.admin-tabs__item.is-active { background: #fff; color: var(--navy); }
.admin-tabs__item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 방문자 로그 */
.text-link { color: var(--brand); }
.text-link:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, 'D2Coding', monospace; font-size: 12.5px; letter-spacing: 0; }

.visit-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.visit-toolbar__opts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.visit-toolbar__csv { margin-left: auto; }

.check { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

.visit-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }

.visit-stat {
    display: grid;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.visit-stat__num { font-size: 26px; font-weight: 750; line-height: 1.2; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.visit-stat__label { color: var(--ink-2); font-size: 14px; font-weight: 600; }
.visit-stat__hint { color: var(--muted); font-size: 12px; }
.visit-stat.is-alert { border-color: #fbcaca; background: var(--red-soft); }
.visit-stat.is-alert .visit-stat__num { color: var(--red); }

.visit-scope { margin: 10px 0 18px; }
.visit-panel { margin-bottom: 14px; }
.visit-empty { margin-top: 0; }
.visit-more { padding-top: 0; }

.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }

/* 일별·시간대별 막대 */
.vchart { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.vchart__col { display: grid; grid-template-rows: 170px auto; min-width: 0; }

.vchart__plot {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-top: 18px;
    border-bottom: 1px solid var(--line);
}

.vchart__bar { width: 100%; max-width: 30px; border-radius: 4px 4px 0 0; background: var(--brand); }
.vchart__col:hover .vchart__bar { background: var(--brand-dark); }
.vchart__val { color: var(--ink-2); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.4; }
.vchart__label { margin-top: 6px; color: var(--muted); font-size: 11.5px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }

.mini-bar { display: block; height: 4px; margin-top: 5px; border-radius: 0 2px 2px 0; background: var(--line-soft); }
.mini-bar i { display: block; height: 100%; border-radius: 0 2px 2px 0; background: var(--brand); }

.visit-log__what { min-width: 220px; }
.visit-log__query { display: block; color: var(--ink); font-weight: 600; }
.visit-log__path { display: block; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.visit-kind--search { background: var(--brand-soft); color: var(--brand-dark); }
.visit-kind--analysis { background: var(--violet-soft); color: var(--violet); }
.visit-kind--login { background: var(--amber-soft); color: var(--amber); }

@media (max-width: 960px) {
    .admin-grid { grid-template-columns: minmax(0, 1fr); }
    .kv { grid-template-columns: minmax(0, 1fr); }
    .pipeline__arrow { display: none; }
    .visit-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .visit-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .visit-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .visit-toolbar__csv { margin-left: 0; }
    .vchart { gap: 1px; }
}

/* 오류 페이지 */
.error-page { padding: 110px 0; text-align: center; }
.error-page__code { font-size: 64px; font-weight: 800; letter-spacing: -0.04em; color: #cbd5e1; line-height: 1; }
.error-page h1 { margin: 12px 0 22px; font-size: 20px; font-weight: 700; }

/* ------------------------------------------------------------
   반응형
   ------------------------------------------------------------ */
@media (max-width: 960px) {
    .detail-layout { grid-template-columns: minmax(0, 1fr); }
    .detail-side { position: static; }
}

/* ------------------------------------------------------------
   언론 기사: 갈등 징후 · 단계 칩
   ------------------------------------------------------------ */
.chip.chip--potential { background: #fff1d6; color: #9a4d00; border: 1px dashed #f0b35b; }
.chip.chip--stage { background: var(--line-soft); color: var(--ink-2); }
.chip.chip--stage-징후 { background: #fff1d6; color: #9a4d00; }
.chip.chip--stage-발생 { background: #fee2e2; color: #b91c1c; }
.chip.chip--stage-심화 { background: #dc2626; color: #fff; }
.chip.chip--stage-조정 { background: #e0e7ff; color: #3730a3; }
.chip.chip--stage-해결 { background: var(--green-soft); color: var(--green); }
.chip.chip--escalating { background: #fee2e2; color: #b91c1c; }
.detail-hero .chip--potential, .detail-hero .chip--stage, .detail-hero .chip--escalating { padding: 5px 12px; font-size: 13px; }
.chips--inline { display: inline-flex; margin-right: 6px; vertical-align: middle; }

/* 갈등 수준 배지 (이슈) */
.lvl {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--line-soft);
    color: var(--ink-2);
}
.lvl--lg { padding: 5px 14px; font-size: 14px; }
.lvl--격화 { background: #dc2626; color: #fff; }
.lvl--확산 { background: #ffedd5; color: #c2410c; }
.lvl--관심 { background: #fef3c7; color: #b45309; }
.lvl--잠재 { background: #fff1d6; color: #9a4d00; border: 1px dashed #f0b35b; }
.lvl--조정 { background: #e0e7ff; color: #3730a3; }
.lvl--해결 { background: #d1fae5; color: #047857; }

/* 구분 토글 (전체 / 진행 중 / 징후) */
.seg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.15s ease;
}
.seg:hover { border-color: #c7d2fe; color: var(--brand-dark); }
.seg.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.seg--potential.is-active { background: #9a4d00; border-color: #9a4d00; }
.seg__count { padding: 0 7px; border-radius: 999px; background: var(--line-soft); color: var(--muted); font-size: 12px; }
.seg.is-active .seg__count { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* 수준별 색 (배지·타일·카드 공통) */
.lvl-격화, .lvl-tile--격화, .lvl-chip--격화, .issue-card--격화, .lvl-bar__seg--격화 { --lvl: #dc2626; --lvl-soft: #fee2e2; --lvl-ink: #b91c1c; }
.lvl-확산, .lvl-tile--확산, .lvl-chip--확산, .issue-card--확산, .lvl-bar__seg--확산 { --lvl: #f97316; --lvl-soft: #ffedd5; --lvl-ink: #c2410c; }
.lvl-관심, .lvl-tile--관심, .lvl-chip--관심, .issue-card--관심, .lvl-bar__seg--관심 { --lvl: #f59e0b; --lvl-soft: #fef3c7; --lvl-ink: #b45309; }
.lvl-잠재, .lvl-tile--잠재, .lvl-chip--잠재, .issue-card--잠재, .lvl-bar__seg--잠재 { --lvl: #d97706; --lvl-soft: #fff1d6; --lvl-ink: #9a4d00; }
.lvl-조정, .lvl-tile--조정, .lvl-chip--조정, .issue-card--조정, .lvl-bar__seg--조정 { --lvl: #4f46e5; --lvl-soft: #e0e7ff; --lvl-ink: #3730a3; }
.lvl-해결, .lvl-tile--해결, .lvl-chip--해결, .issue-card--해결, .lvl-bar__seg--해결 { --lvl: #059669; --lvl-soft: #d1fae5; --lvl-ink: #047857; }

/* 언론 기사 DB 상단: 갈등 이슈 현황판 */
.issue-board {
    margin: 26px 0 30px;
    padding: 22px 24px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.issue-board__head { display: flex; align-items: center; gap: 16px; }
.issue-board__icon {
    display: grid; place-items: center; flex: none;
    width: 46px; height: 46px; border-radius: 14px;
    background: linear-gradient(135deg, var(--navy), var(--brand)); color: #fff; font-size: 22px;
}
.issue-board__title { min-width: 0; flex: 1; }
.issue-board__title h2 { display: flex; align-items: baseline; gap: 6px; font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.issue-board__title h2 strong { color: var(--brand); font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.issue-board__unit { font-weight: 600; color: var(--ink-2); }
.issue-board__title p { margin-top: 3px; color: var(--muted); font-size: 13.5px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.issue-board__head .btn { flex: none; }

/* 수준 분포 막대 (비율) */
.lvl-bar { display: flex; height: 8px; margin: 18px 0 14px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.lvl-bar__seg { flex: 0 0 var(--w); background: var(--lvl); transition: flex-basis 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.lvl-bar__seg + .lvl-bar__seg { box-shadow: -1px 0 0 #fff; }

/* 수준 타일 6개 */
.lvl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.lvl-tile {
    position: relative;
    display: flex; flex-direction: column; gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--lvl);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.lvl-tile:hover { transform: translateY(-2px); border-color: var(--lvl); box-shadow: var(--shadow-md); background: var(--lvl-soft); }
.lvl-tile.is-empty { opacity: 0.55; }
.lvl-tile.is-empty:hover { opacity: 1; }
.lvl-tile__top { display: flex; align-items: center; gap: 6px; color: var(--lvl-ink); font-size: 13px; font-weight: 700; }
.lvl-tile__num { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.lvl-tile__desc { color: var(--muted); font-size: 11.5px; line-height: 1.4; }

.issue-board__foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.issue-board__foot-label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13.5px; font-weight: 650; }
.seg-group { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; }
.seg-group .seg { border-color: transparent; background: transparent; }
.seg-group .seg.is-active { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.seg-group .seg--potential.is-active { background: #9a4d00; }

/* 이슈 목록 */
.issue-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.issue-tabs__note {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
    padding: 8px 14px; border: 1px solid #fecaca; border-radius: 999px;
    background: var(--surface); box-shadow: var(--shadow-md);
    color: #b91c1c; font-size: 13px; font-weight: 650;
}
.issue-tabs .seg-group { background: var(--surface); box-shadow: var(--shadow-md); }
.pulse-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #dc2626; }
.pulse-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #dc2626; opacity: 0; animation: pulse-ring 1.8s ease-out infinite; }
@keyframes pulse-ring { 0% { transform: scale(0.5); opacity: 0.8; } 100% { transform: scale(1.4); opacity: 0; } }
.hero__lead--dark { max-width: 820px; }
.hero__lead--dark small { color: rgba(255, 255, 255, 0.55); }

/* 수준 필터 칩 (설명 포함) */
.lvl-filter { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.lvl-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "icon name count" "icon desc count";
    column-gap: 9px; row-gap: 1px; align-items: center;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--lvl);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink-2);
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.lvl-chip > i { grid-area: icon; color: var(--lvl); font-size: 17px; }
.lvl-chip__name { grid-area: name; font-size: 13.5px; font-weight: 750; color: var(--ink); line-height: 1.3; }
.lvl-chip__desc { grid-area: desc; color: var(--muted); font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl-chip__count { grid-area: count; min-width: 30px; padding: 2px 9px; border-radius: 999px; background: var(--lvl-soft); color: var(--lvl-ink); font-size: 12.5px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; }
.lvl-chip:hover { transform: translateY(-1px); border-color: var(--lvl); box-shadow: var(--shadow-sm); }
.lvl-chip.is-active { background: var(--lvl); border-color: var(--lvl); color: #fff; }
.lvl-chip.is-active > i, .lvl-chip.is-active .lvl-chip__name, .lvl-chip.is-active .lvl-chip__desc { color: #fff; }
.lvl-chip.is-active .lvl-chip__count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.lvl-chip.is-empty { opacity: 0.5; }

.issue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.issue-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px 16px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.issue-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--lvl, var(--line)); }
.issue-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.issue-card--잠재 { border-style: dashed; }
.issue-card__head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.issue-card__name { font-size: 16.5px; font-weight: 700; line-height: 1.45; letter-spacing: -0.02em; color: var(--ink); }
.issue-card__summary {
    color: var(--ink-2); font-size: 13.5px; line-height: 1.7;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.issue-card__stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.stat-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line-soft); color: var(--ink-2); font-size: 12.5px; }
.stat-pill b { font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-pill i { color: var(--muted); }
.stat-pill--hot { background: #fff5f5; border-color: #fecaca; color: #991b1b; }
.stat-pill--hot i, .stat-pill--hot b { color: #b91c1c; }
.stat-pill--hot em { font-style: normal; font-weight: 750; color: #dc2626; }
.issue-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12.5px; }
.issue-card__go { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 650; }
.issue-card__go i { transition: transform 0.18s ease; }
.issue-card:hover .issue-card__go i { transform: translateX(3px); }

/* 이슈 상세 */
.notice--info { border-color: #f0b35b; background: #fff8ea; color: #7a3d00; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 13px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--bg); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: var(--surface); }
.stat__label { color: var(--muted); font-size: 12px; font-weight: 600; }
.stat__value { font-size: 18px; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat__note { color: var(--muted); font-size: 12px; }
.stage-track { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 14px; }
.stage-track__item { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 10px; border-radius: 8px; background: var(--line-soft); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.stage-track__item small { color: var(--muted); font-weight: 500; font-size: 10.5px; }
.stage-track__item b { font-weight: 500; opacity: 0.75; }
.stage-track__item.stage-징후 { background: #fff1d6; color: #9a4d00; }
.stage-track__item.stage-발생 { background: #fee2e2; color: #b91c1c; }
.stage-track__item.stage-심화 { background: #dc2626; color: #fff; }
.stage-track__item.stage-심화 small { color: rgba(255, 255, 255, 0.8); }
.stage-track__item.stage-조정 { background: #e0e7ff; color: #3730a3; }
.stage-track__item.stage-해결 { background: var(--green-soft); color: var(--green); }
.stage-track__arrow { color: var(--muted); font-size: 12px; }
.timeline--articles .timeline__link { font-weight: 600; color: var(--ink); }
.timeline--articles .timeline__link:hover { color: var(--brand); text-decoration: underline; }
.timeline__sub { margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.issue-mini { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.issue-mini__name { font-size: 15px; line-height: 1.45; color: var(--ink); }
.issue-mini:hover .issue-mini__name { color: var(--brand); }
.issue-mini__meta { color: var(--muted); font-size: 12.5px; }
.issue-mini__summary { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.issue-mini__go { color: var(--brand); font-size: 13px; font-weight: 600; }
.panel--issue { border-color: #c7d2fe; }

.similar-list { list-style: none; margin: 0; padding: 0; }
.similar { display: flex; flex-direction: column; gap: 4px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.similar-list li:last-child .similar { border-bottom: 0; }
.similar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.similar__score { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.similar__score.sim--high { color: var(--green); }
.similar__score.sim--mid { color: var(--amber); }
.similar__title { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.similar:hover .similar__title { color: var(--brand); }
.similar__meta { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------
   이슈 상세: 긴 목록 접기 + AI 리포트
   ------------------------------------------------------------ */
/* 접힌 동안에는 넘치는 항목을 감춘다 (펼치면 그대로 이어서 보인다) */
.timeline--articles.is-collapsed .timeline__item.is-extra,
.stage-track.is-collapsed .stage-track__item.is-extra,
.stage-track.is-collapsed .stage-track__arrow.is-extra { display: none; }

.article-more { margin-top: 16px; }
.timeline--articles.is-collapsed { position: relative; }
/* 접혀 있을 때 마지막 항목을 살짝 흐려 '더 있다'는 걸 알린다 */
.timeline--articles.is-collapsed::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 46px;
    background: linear-gradient(180deg, transparent, var(--surface));
    pointer-events: none;
}

.stage-track__more {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px;
    border: 1px dashed var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 12px; font-weight: 650;
    cursor: pointer;
}
.stage-track__more:hover { border-color: #c7d2fe; color: var(--brand-dark); background: var(--brand-soft); }

/* 접이식 패널 머리글 (AI 리포트) */
.panel__head--toggle { cursor: pointer; }
.panel__head--toggle:hover { background: #f8fafc; }
.panel__toggle {
    margin-left: auto;
    display: grid; place-items: center;
    width: 30px; height: 30px;
    border: 1px solid var(--line); border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}
.panel__toggle:hover { border-color: #c7d2fe; color: var(--brand-dark); background: var(--brand-soft); }
.panel__caret { transition: transform 0.2s ease; }
.panel__toggle.is-open .panel__caret { transform: rotate(180deg); }
.panel__head--toggle .panel__tag { margin-left: 0; }
.panel__tag--done { background: var(--green-soft); color: var(--green); }
.panel__tag--stale { background: var(--amber-soft); color: var(--amber); }
.panel__body.is-collapsed { display: none; }
.panel--report .panel__head--toggle h2 { flex: none; }
.report-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); font-size: 12.5px; }

.report-intro { display: grid; justify-items: start; gap: 12px; }
.report-intro__lead { color: var(--ink-2); font-size: 14.5px; line-height: 1.7; }
.report-intro .fine-print { margin-top: 0; }
.report--inline { margin: 0; border: 0; box-shadow: none; }
.report--inline .report__body { padding: 0; }
.report--inline .report__foot { margin-top: 16px; border-radius: var(--radius-sm); border-top: 1px solid var(--line-soft); }
.report__model-inline { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--violet-soft); color: var(--violet); font-size: 11.5px; font-weight: 700; }

/* ------------------------------------------------------------
   전국 갈등 지도 (시·군·구 면을 갈등 심화 점수로 색칠)
   ------------------------------------------------------------ */
/* 심화 정도 6단계 (0 = 사례 없음) */
.step-0 { --cmap: #e9eef5; }
.step-1 { --cmap: #ffeab0; }
.step-2 { --cmap: #fdc871; }
.step-3 { --cmap: #f99d55; }
.step-4 { --cmap: #ed6a45; }
.step-5 { --cmap: #cf2f2f; }

.cmap-panel { margin-bottom: 20px; }
.cmap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }

.cmap__stage { position: relative; min-height: 320px; }

/* 불러오는 동안: 한반도 모양 실루엣이 은은하게 흐르는 자리표시 */
.cmap__loading { display: grid; justify-items: center; gap: 14px; padding: 10px 0 24px; }
.cmap__skeleton { display: block; width: 100%; max-width: 420px; height: auto; max-height: 560px; }
.cmap__skeleton path {
    fill: var(--line-soft);
    animation: cmap-pulse 1.5s ease-in-out infinite;
}
@keyframes cmap-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.cmap__loading-text { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13.5px; }
.cmap__stage:not(.is-loading) .cmap__loading { display: none; }
.cmap__fallback { padding: 28px 0; color: var(--muted); font-size: 14px; text-align: center; }
/* 세로로 긴 지도라 높이로 크기를 잡고 가로는 가운데 정렬 */
.cmap__svg { display: block; width: 100%; height: auto; max-height: 720px; margin: 0 auto; }

.cmap-region {
    fill: var(--cmap);
    stroke: #fff;
    stroke-width: 0.9;
    stroke-linejoin: round;
    cursor: pointer;
    transition: fill 0.15s ease, opacity 0.15s ease;
}
.cmap-region.step-0 { cursor: default; }
.cmap__regions:hover .cmap-region { opacity: 0.55; }
.cmap__regions .cmap-region.is-active,
.cmap__regions:hover .cmap-region.is-active { opacity: 1; stroke: var(--ink); stroke-width: 1.6; }

.cmap__provinces path { fill: none; stroke: #64748b; stroke-width: 1.3; stroke-linejoin: round; pointer-events: none; opacity: 0.65; }
.cmap__inset-frame { fill: none; stroke: #b6c2d2; stroke-width: 1.2; stroke-dasharray: 6 5; pointer-events: none; }
.cmap__inset-label { fill: var(--muted); font-size: 17px; font-weight: 600; pointer-events: none; }

/* 말풍선 */
.cmap__tip {
    position: absolute;
    z-index: 5;
    min-width: 210px;
    max-width: 270px;
    margin: 12px 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    font-size: 13px;
    line-height: 1.55;
}
.cmap__tip.is-left { margin-left: 0; transform: translateX(-100%) translateX(-14px); }
.cmap__tip-name { display: block; font-size: 14.5px; font-weight: 750; color: var(--ink); }
.cmap__tip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.cmap__tip-n b { color: var(--brand); font-size: 15px; font-weight: 800; }
.cmap__tip-levels { margin-top: 8px; gap: 4px; }
.cmap__tip-levels .lvl { font-size: 11px; padding: 2px 7px; }
.cmap__tip-empty { margin-top: 4px; color: var(--muted); }

.cmap__cats { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 3px; }
.cmap__cat { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--ink-2); }
.cmap__cat::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--cat, var(--muted)); flex: none; margin-right: -4px; }
.cmap__cat span { flex: 1; }
.cmap__cat b { font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.cmap__tip-go { display: block; margin-top: 9px; color: var(--brand); font-size: 12px; font-weight: 650; }

/* 옆쪽: 범례 + 상위 지역 */
.cmap__side { display: grid; gap: 16px; }
.cmap__legend { padding: 14px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: #f8fafc; }
.cmap__legend-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.cmap__scale { display: grid; gap: 4px; margin-top: 8px; }
.cmap__scale-item { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; }
.cmap__scale-item i { width: 20px; height: 12px; border-radius: 3px; background: var(--cmap); border: 1px solid rgba(15, 23, 42, 0.08); flex: none; }
.cmap__legend-note { margin-top: 9px; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

.cmap__rank-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.cmap__rank-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: rank; }
.cmap__rank {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) 64px auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    transition: background 0.15s ease;
}
.cmap__rank:hover { background: var(--brand-soft); }
.cmap__rank-no { color: var(--muted); font-size: 11.5px; font-weight: 700; text-align: center; }
.cmap__rank-name { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmap__rank-bar { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.cmap__rank-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f99d55, #cf2f2f); }
.cmap__rank-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cmap__note { margin-top: 14px; }
.cmap__note:empty { display: none; }

@media (max-width: 900px) {
    .cmap { grid-template-columns: minmax(0, 1fr); }
    .cmap__svg { max-height: 60vh; margin: 0 auto; }
    .cmap__tip { position: fixed; left: 50% !important; top: auto !important; bottom: 14px; margin: 0; transform: translateX(-50%) !important; width: min(320px, calc(100vw - 28px)); max-width: none; }
}

/* ------------------------------------------------------------
   움직임 (motion): 등장 · 전환 · 강조. 움직임 최소화 설정이면 모두 꺼진다
   ------------------------------------------------------------ */
html { scroll-behavior: smooth; }

/* 스크롤 시 헤더 그림자 */
.site-header { transition: box-shadow 0.25s ease, background 0.25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08); background: rgba(255, 255, 255, 0.96); }

/* 히어로 진입: 문구 → 검색창 순서로 떠오름 */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hero__eyebrow, .hero h1, .hero__lead, .search-panel, .examples,
.detail-hero .back-link, .detail-hero h1, .detail-hero .chips, .detail-hero .hero__lead {
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero h1, .detail-hero h1 { animation-delay: 0.06s; }
.hero__lead, .detail-hero .chips, .detail-hero .hero__lead { animation-delay: 0.12s; }
.search-panel { animation-delay: 0.18s; }
.examples { animation-delay: 0.26s; }
.hero::before { animation: fade 1.2s ease both; }

/* 화면에 들어올 때 떠오르는 요소 (ui.js 가 .reveal 을 붙이고, 보이면 .is-visible) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
/* 떠오른 뒤에는 hover 변형이 즉시 반응하도록 지연 제거 */
.reveal.is-visible:hover { transition-delay: 0ms; }
.no-motion .reveal { opacity: 1; transform: none; transition: none; }

/* 탭 패널이 펼쳐질 때 */
[role="tabpanel"]:not([hidden]), #panel-search:not([hidden]) { animation: rise 0.35s ease both; }
.tab { transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease; }
.tab:active { transform: scale(0.98); }

/* 검색 결과 관련도 막대: 왼쪽에서 자라남 */
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.score__bar span { transform-origin: left; animation: grow-x 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }

/* 아이콘·카드 미세 반응 */
.cat-tile__icon, .source-card__icon, .panel__icon, .issue-board__icon { transition: transform 0.2s ease; }
.cat-tile:hover .cat-tile__icon, .source-card:hover .source-card__icon { transform: scale(1.08) rotate(-3deg); }
.chip { transition: transform 0.12s ease; }
.chip--link:hover { transform: translateY(-1px); }
.select, .btn--ghost, .seg, .sub-chip, .pagination a { transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease; }
.select:hover { border-color: #c7d2fe; }
.pagination a:hover { transform: translateY(-1px); }
.case-card__go, .issue-card__go, .source-card__go { transition: gap 0.15s ease; }

/* 격화 배지·수준 배지 강조 */
.lvl { transition: transform 0.15s ease; }
.lvl--격화.lvl--lg { animation: glow 2.2s ease-out infinite; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }

/* 버튼 물결 */
.btn, .tab, .seg, .sub-chip, .cat-tile { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: 0.18; pointer-events: none; transform: scale(0); animation: ripple 0.55s ease-out forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* 맨 위로 */
.to-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 30;
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--surface); color: var(--ink-2); font-size: 18px;
    box-shadow: var(--shadow-md); cursor: pointer;
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease, color 0.15s ease;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* 실행 중 스피너 옆 단계 강조 (관리 페이지) */
.steps__item.is-active { animation: fade 0.3s ease both; }

/* 읽기 편하게: 섹션 간격 · 제목 대비 */
.toolbar { margin: 30px 0 18px; }
.cat-head { margin-top: 30px; }
.main > .tabs { margin-bottom: 0; }
.case-card__preview { color: var(--ink-2); }
.case-card__title { letter-spacing: -0.015em; }

@media (max-width: 1100px) {
    .lvl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lvl-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    .container { padding: 0 16px; }
    .brand__badge { display: none; }
    .lvl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lvl-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lvl-chip__desc { display: none; }
    .issue-board { padding: 18px 16px 14px; }
    .issue-board__head { flex-wrap: wrap; }
    .issue-board__head .btn { width: 100%; }
    .to-top { right: 14px; bottom: 14px; }
    .source-nav__item--admin span, .source-nav__count { display: none; }
    .source-card { flex-basis: 100%; }
    .admin-hero { flex-direction: column; }
    .hero { padding: 40px 0 72px; }
    .search-panel__bar { flex-wrap: wrap; }
    .search-panel__actions { width: 100%; }
    .search-panel__actions .select--scope { flex: 1; max-width: none; min-width: 0; }
    .search-panel__actions .btn { flex: 1; }
    .switch__hint { display: none; }
    .case-grid { grid-template-columns: minmax(0, 1fr); }
    .result-card { grid-template-columns: 36px minmax(0, 1fr); }
    .score { grid-column: 2; display: flex; align-items: center; gap: 10px; text-align: left; }
    .score__value { font-size: 18px; }
    .score__label { margin-top: 0; }
    .score__bar { flex: 1; margin-top: 0; }
    .insight-grid { grid-template-columns: minmax(0, 1fr); }
    .timeline__item { grid-template-columns: minmax(0, 1fr); gap: 2px; padding-left: 22px; }
    .timeline__item::before { left: 5px; }
    .timeline__item::after { left: 0; }
    .timeline__date { text-align: left; }
    .timeline__text { padding-left: 0; }
    .toolbar { flex-wrap: wrap; }
}

/* ------------------------------------------------------------
   연구 문헌: 연구 동향 (현황판 · 분석 화면 · 키워드 상세)
   ------------------------------------------------------------ */
.trend-hero__lead { max-width: 820px; margin-top: 10px; color: rgba(255, 255, 255, 0.78); font-size: 14.5px; line-height: 1.7; }
.trend-hero__chips { margin-top: 14px; }
.trend-page { padding-top: 22px; padding-bottom: 48px; display: grid; gap: 16px; }
.trend-page > .section-head { margin: 10px 0 -4px; }
.trend-areas .seg-group { border-radius: 14px; }
.trend-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.trend-stats .visit-stat__num { display: flex; align-items: center; min-height: 32px; }
.trend-stats .trend-chip { font-size: 18px; padding: 2px 10px; }
.trend-panel .panel__body { padding-bottom: 14px; }
.muted { color: var(--muted); }
.text-link.is-current { color: var(--ink); font-weight: 700; text-decoration: underline; }

/* 증감 칩: 화살표 아이콘 + 부호로 방향을 함께 표시 (색만으로 구분하지 않음) */
.trend-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.trend-chip--up { background: var(--green-soft); color: var(--green); }
.trend-chip--down { background: var(--red-soft); color: var(--red); }
.trend-chip--flat, .trend-chip--na { background: var(--line-soft); color: var(--muted); }

/* 선 그래프 (연도별 연구량) */
.lc, .sb { display: block; width: 100%; height: auto; overflow: visible; }
.lc__grid { stroke: var(--line-soft); stroke-width: 1; }
.lc__ylabel, .lc__xlabel, .lc__band-label { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.lc__band { fill: var(--brand-soft); }
.lc__band-label { fill: var(--brand-dark); font-weight: 600; }
.lc__area { fill: rgba(29, 78, 216, 0.08); }
.lc__line { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc__end { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.lc__line--partial { stroke-dasharray: 4 4; opacity: 0.7; }
.lc__end--partial { fill: var(--surface); stroke: var(--brand); }
.lc__hit { fill: transparent; }
.lc__cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.lc__dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2; opacity: 0; }
.lc__tip { fill: var(--ink); font-size: 12px; font-weight: 700; opacity: 0; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.lc__pt:hover .lc__cross, .lc__pt:hover .lc__dot, .lc__pt:hover .lc__tip { opacity: 1; }

/* 누적 막대 (자료유형별) - 검증한 3색: 학술 #1d4ed8 · 학위 #0d9488 · 보고서 #d97706 */
.sb__hit { fill: transparent; }
.sb__seg--학술 { fill: #1d4ed8; background: #1d4ed8; }
.sb__seg--학위 { fill: #0d9488; background: #0d9488; }
.sb__seg--보고서 { fill: #d97706; background: #d97706; }
.sb__bar:hover .sb__seg { opacity: 0.8; }
.sb__bar:hover .sb__hit { fill: rgba(15, 23, 42, 0.05); }
.type-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-2); }
.type-legend li { display: inline-flex; align-items: center; gap: 7px; }
.type-legend__swatch { width: 12px; height: 12px; border-radius: 3px; }

/* 작은 추이선 */
.spark { display: block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linejoin: round; }
.spark circle { fill: var(--brand); }

/* 작은 추이 카드 (영역별 / 키워드별) */
.trend-multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.trend-mini { display: grid; gap: 4px; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.trend-mini:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); }
.trend-mini__head { display: flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink); font-size: 14.5px; }
.trend-mini__head i { color: var(--brand); }
.trend-mini__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-mini__num { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.trend-mini__num small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.trend-mini .spark { width: 100%; height: 56px; }

/* 키워드 표 */
.trend-table td { vertical-align: middle; }
.trend-table__kw { font-weight: 700; }
.trend-table__query { display: block; color: var(--muted); font-size: 11.5px; }
.trend-table__journal { min-width: 160px; color: var(--ink-2); font-size: 13px; }

/* 세부 주제 */
.trend-topics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.trend-icon--up { background: var(--green-soft); color: var(--green); }
.trend-icon--down { background: var(--red-soft); color: var(--red); }
.topic-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; counter-reset: topic; }
.topic-list li { display: flex; align-items: baseline; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line-soft); counter-increment: topic; }
.topic-list li:last-child { border-bottom: 0; }
.topic-list li::before { content: counter(topic); width: 20px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.topic-list a { flex: 1; min-width: 0; color: var(--ink); font-weight: 600; }
.topic-list a:hover { color: var(--brand); text-decoration: underline; }
.topic-list__n { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topic-list__n strong { color: var(--ink); }
.trend-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.trend-period h3 { margin-bottom: 8px; font-size: 14.5px; font-weight: 700; }
.trend-period h3 small { color: var(--muted); font-weight: 500; font-size: 12px; }
.trend-period .chip:hover, .lit-board__chips .chip:hover { background: var(--brand-soft); color: var(--brand-dark); }

/* 막대 목록 (학술지·대학) */
.bar-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bar-list li { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 4em; align-items: center; gap: 10px; font-size: 13.5px; }
.bar-list__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bar-list__bar { height: 10px; border-radius: 0 4px 4px 0; background: var(--line-soft); }
.bar-list__bar i { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--brand); }
.bar-list__n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.trend-journals { margin-top: 2px; }

.trend-report .report__body { padding-top: 14px; }
.trend-report__foot { margin: 0; padding: 0 24px 18px; }
.trend-note { margin-top: 4px; }

/* 연구 문헌 목록 상단 현황판 */
.lit-board { margin-bottom: 18px; }
.lit-board__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; margin-top: 18px; }
.lit-board__h { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.lit-board__h small { color: var(--muted); font-weight: 500; font-size: 12px; }
.lit-board__chips { margin-bottom: 16px; }
.lit-board__chips .chip small { color: var(--muted); margin-left: 3px; font-variant-numeric: tabular-nums; }
.chip--rise { background: var(--green-soft); color: #065f46; }
.lit-rank { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lit-rank a { display: grid; grid-template-columns: 22px minmax(0, 1fr) 96px 56px 64px; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 8px; }
.lit-rank a:hover { background: var(--brand-soft); }
.lit-rank__no { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
.lit-rank__name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lit-rank__n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.lit-rank .trend-chip { justify-self: end; }

@media (max-width: 960px) {
    .trend-topics, .lit-board__grid { grid-template-columns: minmax(0, 1fr); }
    .trend-periods { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
    .lit-rank a { grid-template-columns: 18px minmax(0, 1fr) 52px 60px; }
    .lit-rank .spark { display: none; }
    .bar-list li { grid-template-columns: minmax(0, 8em) minmax(0, 1fr) 3.5em; }
}

/* 핵심 키워드 칩 (갈등 사례·이슈·연구 문헌 공통) */
.chip.chip--kw { background: #eef2ff; color: #3730a3; }
.chip.chip--kw i { font-size: 11px; }
.chip.chip--kw small { color: #6366f1; margin-left: 3px; font-variant-numeric: tabular-nums; }
a.chip.chip--kw:hover { background: #e0e7ff; }
.issue-card__kw { margin-top: 8px; }
.kw-section { margin-top: 6px; }

/* 연구 문헌: 분류 보기 전환 (키워드 51개 / 영역 11개) */
.cat-head[data-switch-group] { flex-wrap: wrap; align-items: center; row-gap: 6px; }
.cat-head[data-switch-group] h2 { white-space: nowrap; }
.cat-head[data-switch-group] .cat-head__hint { flex: 1 1 360px; min-width: 0; }
.cat-head[data-switch-group] .cat-head__etc { white-space: nowrap; }
.cat-view-switch .seg { white-space: nowrap; }
.cat-view-switch { margin-left: auto; }
.cat-view-switch .seg { height: 32px; padding: 0 12px; font-size: 13px; font-family: inherit; cursor: pointer; }
.cat-view-switch + .cat-head__links { margin-left: 0; }

/* 연구 문헌: 핵심 키워드 51개 (영역별 묶음) */
.kw-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; margin-bottom: 22px; }
.kw-group { padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-sm); }
.kw-group.is-current { border-color: var(--cat); box-shadow: 0 0 0 1px var(--cat); }
.kw-group__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0 2px 9px; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-weight: 700; }
.kw-group__head:hover .kw-group__name, .kw-group__head.is-active .kw-group__name { color: var(--cat); text-decoration: underline; }
.kw-group__head:focus-visible, .kw-tile:focus-visible { outline: 2px solid var(--cat); outline-offset: 2px; }
.kw-group__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--cat-soft); color: var(--cat); font-size: 13px; }
.kw-group__name { flex: 1; min-width: 0; font-size: 14.5px; }
.kw-group__count { color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kw-group__items { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-tile { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: #f8fafc; color: var(--ink-2); font-size: 13.5px; transition: background .15s, border-color .15s, color .15s; }
.kw-tile:hover { border-color: var(--cat); background: var(--cat-soft); color: var(--cat); }
.kw-tile__count { color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kw-tile.is-active { border-color: var(--cat); background: var(--cat); color: #fff; }
.kw-tile.is-active .kw-tile__count { color: rgba(255, 255, 255, 0.85); }
.kw-tile.is-empty { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
