/* CEP 태그 아카이브 (Figma 태그 아카이브 ver.2). 폭: 1920(1200 본문) / 960 / 674 / 390 */
.tag-cep__content { display:flex; flex-direction:column; gap:40px; padding-top:60px; padding-bottom:60px; color:#111; }
.tag-cep__content > * { width:100%; min-width:0; }
.tag-cep a { color:inherit; text-decoration:none; }
.tag-cep__content a:focus-visible { outline:2px solid #111; outline-offset:3px; }

/* 광고 (Figma: 상단 120, 중간 100, 모서리 5) */
.tag-cep__ad-top .middle-top-item { line-height:0; }
.tag-cep__ad-top .ditoday-ad-slot, .tag-cep__ad-top .g, .tag-cep__ad-top .g-dyn { width:100% !important; max-width:none !important; height:100%; }
.tag-cep__ad-top a { display:block; height:120px; border-radius:5px; overflow:hidden; }
.tag-cep__ad-top img { display:block; width:100%; height:100%; object-fit:cover; }
.tag-cep__ad-mid { display:flex; justify-content:center; overflow:hidden; }
.tag-cep__ad-mid .desktop-only, .tag-cep__ad-mid .mobile-only { max-width:100%; }

/* 소개 */
.tag-cep__intro h1 { margin:0 0 20px; font-size:56px; font-weight:700; line-height:1.2; overflow-wrap:anywhere; }
.tag-cep__intro-text { font-size:17px; font-weight:500; line-height:1.4; }
.tag-cep__intro-text p { margin:0 0 1.4em; }
.tag-cep__intro-text p:last-child { margin-bottom:0; }

/* 카드 공통 */
.tag-cep__card { min-width:0; }
.tag-cep__thumbnail { display:block; border:1px solid #E6E8EA; border-radius:5px; overflow:hidden; background:#F4F5F6; }
.tag-cep__thumbnail img { display:block; width:100%; height:100%; object-fit:cover; transform:scale(1); transition:transform .25s ease; }
.tag-cep__card-title { margin:0; }
.tag-cep__card-title a { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:anywhere; }
.tag-cep__excerpt { margin:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#464C53; }
.tag-cep__meta { display:flex; align-items:center; gap:4px; color:#464C53; font-size:14px; font-weight:500; line-height:1.2; }
.tag-cep__postmeta { display:inline-flex; align-items:center; gap:4px; }

/* 대표 글 */
.tag-cep__featured { display:flex; gap:30px; align-items:flex-start; }
.tag-cep__featured > .tag-cep__card--featured, .tag-cep__latest { flex:1 1 0; min-width:0; }
.tag-cep__card--featured { display:flex; flex-direction:column; gap:16px; }
.tag-cep__card--featured .tag-cep__thumbnail { width:100%; aspect-ratio:585/347; }
.tag-cep__card--featured .tag-cep__card-body { display:flex; flex-direction:column; gap:8px; }
.tag-cep__card--featured .tag-cep__card-title { font-size:24px; font-weight:600; line-height:1.2; }
.tag-cep__card--featured .tag-cep__excerpt { font-size:20px; font-weight:500; line-height:1.2; }
.tag-cep__card--featured .tag-cep__meta { justify-content:space-between; }

/* 작은 글 / 목록 글 (가로형) */
.tag-cep__latest { display:flex; flex-direction:column; gap:16px; }
.tag-cep__card--small, .tag-cep__card--list { display:flex; align-items:center; gap:20px; }
.tag-cep__card--small .tag-cep__thumbnail, .tag-cep__card--list .tag-cep__thumbnail { flex:0 0 174px; width:174px; height:103px; }
.tag-cep__card--small .tag-cep__card-body, .tag-cep__card--list .tag-cep__card-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:12px; }
.tag-cep__card--small .tag-cep__card-title, .tag-cep__card--list .tag-cep__card-title { font-size:18px; font-weight:400; line-height:1.2; }
.tag-cep__card--small .tag-cep__excerpt, .tag-cep__card--list .tag-cep__excerpt { font-size:16px; font-weight:400; line-height:1.4; }
.tag-cep__card--small .tag-cep__postmeta::before, .tag-cep__card--list .tag-cep__postmeta::before { content:"|"; margin-right:0; }

/* 목록 + 순위 */
.tag-cep__list-wrap { display:flex; gap:30px; align-items:flex-start; }
.tag-cep__list { flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:32px; }
.tag-cep__list-items { display:flex; flex-direction:column; gap:24px; }
.tag-cep__list h2, .tag-cep__ranked h2 { margin:0; font-size:24px; font-weight:600; line-height:1.2; }
.tag-cep__ranked { flex:0 0 378px; width:378px; min-width:0; display:flex; flex-direction:column; gap:32px; }
.tag-cep__ranked-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.tag-cep__ranked-list li { display:flex; gap:8px; align-items:center; padding:12px 0; border-bottom:1px solid #E6E8EA; font-size:18px; line-height:21px; }
.tag-cep__ranked-list li:first-child { padding-top:0; }
.tag-cep__ranked-list li:last-child { padding-bottom:0; border-bottom:0; }
.tag-cep__rank { flex:0 0 26px; font-weight:700; color:#3366FF; }
.tag-cep__ranked-list a { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:500; }

/* 다른 상황도 보기 */
.tag-cep__related { display:flex; flex-direction:column; gap:16px; }
.tag-cep__related h2 { margin:0; font-size:17px; font-weight:600; line-height:1.4; }
.tag-cep__related-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:30px; }
.tag-cep__related-card { display:flex; flex-direction:column; gap:8px; padding:24px; border:1px solid #B1B8BE; border-radius:5px; background:#F4F5F6; min-width:0; }
.tag-cep__related-card h3 { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin:0; font-size:20px; font-weight:600; line-height:1.2; overflow-wrap:anywhere; }
.tag-cep__related-count { font-size:12px; font-weight:300; color:#464C53; }

/* hover: 홈 뉴스스탠드와 같은 원칙 (마우스 환경 전용, 썸네일 줌 1.05 / 제목 #3366FF) */
@media (hover: hover) and (pointer: fine) {
    .tag-cep__thumbnail:hover img, .tag-cep__thumbnail:focus-within img { transform:scale(1.05); }
    .tag-cep__card-title a:hover, .tag-cep__ranked-list a:hover { color:#3366FF; }
    .tag-cep__related-card:hover h3 { color:#3366FF; }
}

/* 960 */
@media all and (max-width:960px) {
    .tag-cep__content { gap:60px; padding-top:40px; padding-bottom:74px; }
    .tag-cep__featured { gap:24px; }
    .tag-cep__list-wrap { gap:24px; }
    .tag-cep__ranked { flex-basis:278px; width:278px; }
    .tag-cep__card--list .tag-cep__thumbnail { flex-basis:103px; width:103px; }
}

/* 674: 1단. 대표 글은 가로 전체, 순위 영역 없음 */
@media all and (max-width:674px) {
    .tag-cep__content { gap:40px; padding:0 20px 51px; }
    .tag-cep__intro h1 { font-size:32px; margin-bottom:20px; }
    .tag-cep__ad-top, .tag-cep__ad-mid { margin-left:-20px; margin-right:-20px; width:auto; }
    .tag-cep__ad-top a { border-radius:0; }
    .tag-cep__featured, .tag-cep__list-wrap { flex-direction:column; align-items:stretch; gap:16px; }
    .tag-cep__featured > .tag-cep__card--featured, .tag-cep__latest { flex:none; }
    .tag-cep__card--featured .tag-cep__card-title { font-size:20px; }
    .tag-cep__card--featured .tag-cep__excerpt { font-size:18px; }
    .tag-cep__list h2 { font-size:21px; }
    .tag-cep__ranked { display:none; }
}

/* 메인과 같은 방식: 600px 이하에서 모바일 배너를 390:120 비율로 (601~768px는 테마 규칙상 광고 없음) */
@media all and (max-width:600px) {
    .tag-cep__ad-top a { height:30.7692308vw; max-width:none; margin:0; }
}

/* 390: 작은 글은 제목만, 목록 글은 읽는 시간 없음 */
@media all and (max-width:480px) {
    .tag-cep__content { padding-bottom:40px; }
    .tag-cep__featured { gap:20px; }
    .tag-cep__card--featured .tag-cep__card-title { font-size:18px; font-weight:400; }
    .tag-cep__card--featured .tag-cep__excerpt { display:none; }
    .tag-cep__latest { gap:12px; }
    .tag-cep__card--small { display:block; padding-bottom:12px; border-bottom:1px solid #E6E8EA; }
    .tag-cep__card--small .tag-cep__thumbnail, .tag-cep__card--small .tag-cep__excerpt, .tag-cep__card--small .tag-cep__meta { display:none; }
    .tag-cep__card--small .tag-cep__card-title { font-size:15px; font-weight:500; line-height:1.2; }
    .tag-cep__card--small .tag-cep__card-title a { -webkit-line-clamp:1; }
    .tag-cep__card--list .tag-cep__readtime, .tag-cep__card--list .tag-cep__divider { display:none; }
    .tag-cep__related-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
    .tag-cep__related-card h3 { font-size:18px; }
}
