:root {
  --bg: #f5f6f8;
  --fg: #1b1f24;
  --muted: #6b7280;
  --line: #e2e5ea;
  --card: #ffffff;
  --accent: #0b5cad;
  --accent-bg: #e8f0fb;
  --warn-bg: #fdecec;
  --warn-fg: #b42318;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
        "Malgun Gothic", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--fg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site {
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 1.25rem; height: 56px;
  background: #0f1b2d; color: #fff;
  position: sticky; top: 0; z-index: 10;
}
header.site .brand { color: #fff; font-weight: 700; font-size: 1.05rem; }
header.site .nav { display: flex; gap: 1rem; }
header.site .nav a { color: #b7c2d0; font-size: 0.92rem; }
header.site .nav a:hover { color: #fff; text-decoration: none; }
header.site .nav a.on { color: #fff; font-weight: 700; }
header.site .search { margin-left: auto; }
header.site .search input {
  width: 220px; max-width: 46vw;
  padding: 6px 10px; border: 0; border-radius: 6px;
  background: #1e2c42; color: #fff; font-size: 0.9rem;
}
header.site .search input::placeholder { color: #8a97ab; }

.wrap { max-width: 1560px; margin: 1.5rem auto; padding: 0 1.5rem; }

.layout { display: grid; grid-template-columns: 240px minmax(0,1fr) 240px; gap: 1.4rem; align-items: start; }
@media (max-width: 1080px) { .layout { grid-template-columns: 220px 1fr; } .side { grid-column: 1 / -1; order: 3; position: static; max-height: none; overflow: visible; } }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } .cvepanel, .side { order: -1; } }

h1 { font-size: 1.35rem; margin: 0 0 1rem; }
.muted { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.empty { color: var(--muted); padding: 2rem 0; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 1rem 1.15rem; margin-bottom: 0.85rem;
}
.card h2 { font-size: 1.05rem; margin: 0.35rem 0; line-height: 1.4; }
.card h2 a { color: var(--fg); }
.card p { margin: 0.35rem 0 0; color: #3f4650; font-size: 0.92rem; }

.meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: var(--muted); }
.meta .src { color: var(--accent); font-weight: 600; }
.meta .cat { background: var(--accent-bg); color: var(--accent); padding: 1px 7px; border-radius: 4px; }
.meta .cve { background: var(--warn-bg); color: var(--warn-fg); padding: 1px 7px; border-radius: 4px; font-weight: 600; }
.meta time { margin-left: auto; }

.cats { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 1rem; }
.cats a {
  padding: 4px 10px; border-radius: 999px; font-size: 0.83rem;
  background: #eceff3; color: #3f4650;
}
.cats a:hover { text-decoration: none; background: #e0e4ea; }
.cats a.on { background: var(--accent); color: #fff; }
.cats a.on .muted { color: #cfe0f5; }

.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.5rem 0; color: var(--muted); }

aside.side { position: sticky; top: 1rem; align-self: start; max-height: calc(100vh - 2rem); overflow-y: auto; }
aside.side h3 { font-size: 0.9rem; margin: 0 0 0.5rem; color: var(--muted); }
.srclist { list-style: none; margin: 0; padding: 0; }
.srclist li { margin: 0.15rem 0; }
.srclist a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--fg); font-size: 0.9rem; }
.srclist a:hover { background: #eceff3; text-decoration: none; }
.srclist a.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }

.detail { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; }
.detail h1 { font-size: 1.5rem; margin: 0.5rem 0; }
.detail .orig-title { color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }
.detail .summary { font-size: 1rem; line-height: 1.8; margin: 1rem 0; }
.detail .cves, .detail .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.detail .cve {
  background: var(--warn-bg); color: var(--warn-fg);
  padding: 3px 9px; border-radius: 5px; font-size: 0.82rem; font-weight: 600;
}
.detail .tags a { background: #eceff3; color: #444; padding: 3px 9px; border-radius: 5px; font-size: 0.82rem; }
.readmore { margin-top: 1.5rem; }
.readmore a {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 8px 16px; border-radius: 7px; font-weight: 600;
}
.readmore a:hover { text-decoration: none; background: #094a8d; }
.back { margin-top: 1rem; }

footer.site {
  max-width: 1560px; margin: 2rem auto; padding: 1.5rem 1.25rem;
  color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--line);
  text-align: center;
}

/* --- 취약점 DB --- */
.sevbadge { display: inline-block; padding: 2px 8px; border-radius: 5px; font-weight: 700; font-size: 0.82rem; }
.sev-crit { background: #7f1d1d; color: #fff; }
.sev-high { background: #b42318; color: #fff; }
.sev-med  { background: #b45309; color: #fff; }
.sev-low  { background: #3f6212; color: #fff; }
.sev-none { background: #e2e5ea; color: #6b7280; }

.kev { display: inline-block; padding: 2px 8px; border-radius: 5px; font-weight: 700;
       font-size: 0.78rem; background: #7f1d1d; color: #fff; letter-spacing: 0.02em; }

.cve-search, .cve-search form { display: flex; gap: 0.5rem; margin: 0.75rem 0 1rem; }
.cve-search input[type=search] { flex: 1; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; }
.cve-search button { padding: 7px 14px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; }

.cvetbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cvetbl th, .cvetbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.cvetbl th { background: #f0f2f5; font-size: 0.8rem; color: var(--muted); }
.cvetbl tr:last-child td { border-bottom: 0; }
.cvetbl td:nth-child(2), .cvetbl td:nth-child(5), .cvetbl td:nth-child(6) { white-space: nowrap; }

.cvebadge { display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 0.82rem; font-weight: 600; }
.cvebadge:hover { text-decoration: none; opacity: 0.9; }

.kev-action { background: var(--warn-bg); border-left: 3px solid var(--warn-fg); padding: 0.6rem 0.9rem; margin: 1rem 0; font-size: 0.92rem; }

.watchgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; margin: 0 0 1.25rem; }
.watchcard { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 0.7rem 0.85rem; }
.watchcard strong { font-size: 0.9rem; }
.watchcard .n { font-size: 1.5rem; font-weight: 700; margin: 0.2rem 0 0; }
.watchcard .n small { font-size: 0.7rem; font-weight: 400; color: var(--muted); margin-left: 2px; }
.watchcard .sub { font-size: 0.72rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.5rem; }
.chip { font-size: 0.74rem; padding: 2px 7px; border-radius: 4px; background: #eef1f4; color: #55606e; }
.chip:hover { text-decoration: none; background: #e2e6ea; }
.chip-vendor  { background: #e8f0fb; color: #0b5cad; }
.chip-malware { background: #fdecec; color: #b42318; }
.chip-actor   { background: #f3e8fb; color: #7b2cbf; }

.hotcve { list-style: none; margin: 0; padding: 0; }
.hotcve li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.82rem; }
.hotcve li:last-child { border-bottom: 0; }
.hotcve li a { font-weight: 600; }
.hotcve .sevbadge { float: right; font-size: 0.72rem; }
.hotcve .muted { font-size: 0.72rem; margin-top: 2px; }
.morelink { display: inline-block; margin-top: 0.6rem; font-size: 0.82rem; }

/* CVE: EPSS / 랜섬웨어 / 국내채번 / KISA 공지 (migration 006) */
.krflag { display: inline-block; padding: 1px 5px; border-radius: 4px; font-size: 0.68rem;
  font-weight: 700; background: #e8f0fb; color: #0b5cad; vertical-align: middle; }
.rans { display: inline-block; font-size: 0.78rem; font-weight: 600; color: #b42318; white-space: nowrap; }
.kev-due { font-size: 0.85rem; margin: 0.3rem 0 0.8rem; }
.kr-advisory { background: #f4f8ff; border: 1px solid #d6e4fb; border-left: 3px solid #0b5cad;
  border-radius: 7px; padding: 0.75rem 1rem; margin: 1rem 0; }
.kr-advisory > strong { font-size: 0.9rem; color: #0b5cad; }
.kr-advisory .kr-title { font-weight: 600; margin: 0.4rem 0 0.3rem; }
.kr-advisory .summary { font-size: 0.9rem; margin-top: 0.4rem; }

/* CVE 긴급도 (migration 007) */
.ubadge { display: inline-block; min-width: 1.6rem; text-align: center; padding: 1px 6px;
  border-radius: 4px; font-size: 0.78rem; font-weight: 700; }
.u-crit { background: #7a0d0d; color: #fff; }
.u-high { background: #d33; color: #fff; }
.u-mid  { background: #f0ad4e; color: #3a2a00; }
.u-low  { background: #e9edf2; color: #66707c; }
.cvetbl tr.row-urgent { background: #fff5f5; }
.cvetbl tr.row-urgent td { border-bottom-color: #f3d0d0; }

/* 위협 인텔리전스 · 주요 제품 취약점 표: 전 컬럼 가운데 정렬 */
.threat-tbl { width: 100%; }
.threat-tbl th, .threat-tbl td { text-align: center; vertical-align: middle; }
/* 넓은 텍스트 칸(제품명 등): 헤더는 가운데, 셀 내용만 왼쪽 정렬 */
.threat-tbl td.cell-wide { text-align: left; }

/* 목록 페이지(취약점 DB·위협 인텔리전스·주요 제품): 본문 폭 통일 + 중앙 정렬 */
.feed.listwrap { max-width: 1200px; margin-inline: auto; }
.feed.listwrap h1 { text-align: center; }
.feed.listwrap .cats { justify-content: center; }
.cats a.urgent { font-weight: 700; }
.cats a.urgent.on { background: #d33; color: #fff; }
.hotcve li .ubadge { float: right; margin-left: 4px; }

/* 홈 스포트라이트: 지금 주목 취약점 */
.spotlight { display: block; border: 1px solid #f0c8c8; background: linear-gradient(180deg,#fff6f6,#fff);
  border-left: 4px solid #d33; border-radius: 9px; padding: 0.8rem 1rem; margin: 0 0 1.25rem; }
.spotlight:hover { text-decoration: none; box-shadow: 0 2px 10px rgba(211,51,51,.12); }
.spotlight .sp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.sp-flag { font-weight: 700; color: #b42318; font-size: 0.85rem; }
.sp-new { font-size: 0.74rem; font-weight: 700; background: #fde7c8; color: #7a4a00; padding: 1px 6px; border-radius: 4px; }
.spotlight .sp-body { color: var(--fg); }
.spotlight .sp-body strong { font-size: 1.05rem; letter-spacing: .01em; }
.sp-prod { margin-left: 0.5rem; font-weight: 600; }
.sp-metrics { display: block; margin-top: 0.15rem; font-size: 0.8rem; color: var(--muted); }
.sp-heads { list-style: none; margin: 0.55rem 0 0; padding: 0.5rem 0 0; border-top: 1px dashed #f0d0d0; }
.sp-heads li { font-size: 0.82rem; color: var(--fg); padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-heads .src { color: var(--muted); font-size: 0.74rem; margin-right: 4px; }

/* PoC / 벤더 링크 / 통합검색 / My피드 / 연관기사 */
.poc { display: inline-block; font-size: 0.7rem; font-weight: 700; background: #4b2e83; color: #fff;
  padding: 1px 5px; border-radius: 4px; }
.poc-box { background: #fff8ec; border: 1px solid #f0dcae; border-left: 3px solid #d9860a;
  border-radius: 7px; padding: 0.7rem 1rem; margin: 1rem 0; }
.poc-box > strong { font-size: 0.9rem; color: #9a5b00; }
.poc-box ul { margin: 0.4rem 0 0; padding-left: 1.2rem; font-size: 0.9rem; }
.myfeed-bar { background: var(--card,#f6f8fa); border: 1px solid var(--line,#e5e9ef); border-radius: 8px;
  padding: 0.5rem 0.8rem; margin-bottom: 1rem; font-size: 0.85rem; }
.myfeed-bar .chip { margin: 0 2px; }
.search-sub { font-size: 0.95rem; color: var(--muted,#66707c); margin: 1.2rem 0 0.5rem;
  border-bottom: 1px solid var(--line,#e5e9ef); padding-bottom: 0.3rem; }
.feed.related { margin-top: 1.5rem; }
.nav a#myfeed-link { cursor: pointer; }

/* 홈 왼쪽 패널: 지금 주목 취약점 */
.cvepanel { position: sticky; top: 1rem; }
.cvepanel h3 { font-size: 0.9rem; margin: 0 0 0.6rem; color: var(--muted); }
.hotlist { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.hotlist li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.hotlist li:last-child { border-bottom: 0; }
.hotlist a.cve { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; font-weight: 600; font-size: 0.82rem; }
.hotlist a.cve:hover { text-decoration: none; }
.hotlist .cid { color: var(--accent); }
.hotlist .cfl { font-size: 0.82rem; font-weight: 700; color: #d33; }
.hotlist .pl { font-size: 0.75rem; color: var(--muted); margin-top: 2px; padding-left: 2px; }
.hotlist .pl .pn { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cvepanel .morelink { font-size: 0.8rem; }

/* 사이드바 하단 미니 리스트 (KISA 공지 등) */
.minilist { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.minilist li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.8rem; line-height: 1.35; }
.minilist li:last-child { border-bottom: 0; }
.minilist time { display: block; color: var(--muted); font-size: 0.7rem; margin-top: 2px; }
aside.side .chips { margin-top: 0.4rem; }
aside.side .chip { font-size: 0.72rem; }

/* 원문(영문) 미번역 기사 표시 */
.enbadge { display:inline-block; font-size:0.68rem; font-weight:700; background:#e7e9ee; color:#5b6570;
  padding:1px 5px; border-radius:4px; letter-spacing:0.03em; }

/* Qualys RTI */
.atk { display:inline-block; font-size:0.68rem; font-weight:700; background:#7a0d0d; color:#fff;
  padding:1px 5px; border-radius:4px; }
.qualys-box { background:#fbf3f3; border:1px solid #edcccc; border-left:3px solid #b42318;
  border-radius:7px; padding:0.7rem 1rem; margin:1rem 0; }
.qualys-box > strong { font-size:0.85rem; color:#9a2318; }

.qmeta { list-style:none; margin:.5rem 0 0; padding:0; font-size:.85rem; }
.qmeta li { padding:.2rem 0; border-bottom:1px dashed #edcccc; }
.qmeta li:last-child { border-bottom:0; }

/* 위협 인텔 신호 배지 */
.sigcell { line-height:1.9; }
.sig { display:inline-block; font-size:0.68rem; font-weight:700; padding:1px 5px; border-radius:4px; margin-right:3px; white-space:nowrap; }
.sig-kev { background:#b42318; color:#fff; }
.sig-rans { background:#7a0d0d; color:#fff; }
.sig-atk { background:#d33; color:#fff; }
.sig-poc { background:#4b2e83; color:#fff; }
.sig-mid { background:#e9edf2; color:#55606e; }
