/* TrendPulse reader components. Scoped under .tp so rules win over Tailwind
   preflight without !important. Tokens live in tokens.css. */

/* ---------- Base ---------- */
.tp{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.tp body{margin:0;font-family:var(--font-sans);background:rgb(var(--c-canvas));color:rgb(var(--c-ink));font-size:var(--fs-15);line-height:1.6;min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased;word-break:keep-all;overflow-wrap:anywhere}
.tp ::selection{background:rgb(var(--c-brand) / .25)}
.tp :focus-visible{outline:3px solid rgb(var(--c-brand) / .55);outline-offset:2px}
.tp .icon{display:inline-block;width:1em;height:1em;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.125em}
.tp .shell{width:100%;max-width:1240px;margin-left:auto;margin-right:auto;padding-left:16px;padding-right:16px}
@media(min-width:640px){.tp .shell{padding-left:24px;padding-right:24px}}
@media(min-width:1024px){.tp .shell{padding-left:32px;padding-right:32px}}
.tp .main-area{flex:1 0 auto;padding-top:20px;padding-bottom:24px}
.tp .main-area:focus{outline:none}
.tp [hidden]{display:none!important}
.tp .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.tp .stack-2>*+*{margin-top:8px}.tp .stack-3>*+*{margin-top:12px}.tp .stack-4>*+*{margin-top:16px}.tp .stack-6>*+*{margin-top:24px}
.tp .meta{font-size:var(--fs-13);color:rgb(var(--c-ink-muted))}
.tp .meta-row{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:var(--fs-13);color:rgb(var(--c-ink-muted))}
.tp .meta-row .dot::before{content:"·";margin-right:10px;color:rgb(var(--c-line-strong))}
.tp .link{color:rgb(var(--c-brand));font-weight:600;text-underline-offset:3px}
.tp .link:hover{text-decoration:underline}
.tp .link-btn{color:rgb(var(--c-brand));font-weight:600;text-decoration:underline;text-underline-offset:3px}
.tp .tabular{font-variant-numeric:tabular-nums}

/* ---------- Page header / section ---------- */
.tp .page-head{margin-bottom:16px}
.tp .eyebrow{font-size:var(--fs-12);font-weight:700;letter-spacing:.06em;color:rgb(var(--c-brand))}
.tp .page-title{font-size:var(--fs-24);line-height:1.3;font-weight:800;letter-spacing:-.02em;color:rgb(var(--c-ink-strong));margin-top:2px}
@media(min-width:768px){.tp .page-title{font-size:var(--fs-30)}}
.tp .page-desc{margin-top:6px;font-size:var(--fs-15);color:rgb(var(--c-ink-muted));max-width:68ch}
.tp .section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.tp .section-title{font-size:var(--fs-17);font-weight:750;color:rgb(var(--c-ink-strong));letter-spacing:-.01em;display:flex;align-items:center;gap:8px}
.tp .section-title .icon{color:rgb(var(--c-brand))}
.tp .section-more{font-size:var(--fs-13);font-weight:600;color:rgb(var(--c-brand));white-space:nowrap;display:inline-flex;align-items:center;gap:2px;min-height:32px}
.tp .narrow{max-width:760px;margin-left:auto;margin-right:auto}

/* ---------- Surfaces ---------- */
.tp .card{background:rgb(var(--c-surface));border:1px solid rgb(var(--c-line));border-radius:var(--r-lg);padding:20px}
.tp .card-tight{padding:16px}
.tp .card-flush{padding:0;overflow:hidden}
.tp .card-link{transition:border-color .15s,box-shadow .15s}
.tp .card-link:hover{border-color:rgb(var(--c-line-strong));box-shadow:var(--shadow-2)}
.tp .divider{border:0;border-top:1px solid rgb(var(--c-line));margin:16px 0}
.tp .callout{border-radius:var(--r-md);padding:12px 14px;font-size:var(--fs-13);background:rgb(var(--c-surface-2));color:rgb(var(--c-ink))}
.tp .callout-caution{background:rgb(var(--c-caution-soft));color:rgb(var(--c-ink-strong));border:1px solid rgb(var(--c-caution) / .25)}
.tp .callout-brand{background:rgb(var(--c-brand-soft));color:rgb(var(--c-ink-strong))}

/* ---------- Buttons ---------- */
.tp .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 16px;border-radius:var(--r-md);font-size:14px;font-weight:700;line-height:1.2;border:1px solid transparent;cursor:pointer;transition:background .15s,border-color .15s,color .15s;white-space:nowrap}
.tp .btn:disabled{opacity:.55;cursor:not-allowed}
.tp .btn-primary{background:rgb(var(--c-brand-fill));color:rgb(var(--c-on-brand))}
.tp .btn-primary:hover:not(:disabled){background:rgb(var(--c-brand-fill-hover))}
.tp .btn-secondary{background:rgb(var(--c-surface));color:rgb(var(--c-ink-strong));border-color:rgb(var(--c-line-strong))}
.tp .btn-secondary:hover:not(:disabled){background:rgb(var(--c-surface-2))}
.tp .btn-ghost{background:transparent;color:rgb(var(--c-ink))}
.tp .btn-ghost:hover:not(:disabled){background:rgb(var(--c-surface-2));color:rgb(var(--c-ink-strong))}
.tp .btn-danger{background:rgb(var(--c-danger-soft));color:rgb(var(--c-danger))}
.tp .btn-sm{min-height:36px;padding:0 12px;font-size:13px}
@media(max-width:767px){.tp .btn-sm{min-height:44px}}
.tp .btn-block{width:100%}
.tp .btn .icon{font-size:17px}
.tp [data-bookmark]{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:0 12px;border-radius:var(--r-md);font-size:13px;font-weight:700;color:rgb(var(--c-ink));background:rgb(var(--c-surface-2));border:1px solid transparent;white-space:nowrap}
.tp [data-bookmark]:hover{color:rgb(var(--c-brand))}
.tp [data-bookmark][aria-pressed="true"]{color:rgb(var(--c-brand));background:rgb(var(--c-brand-soft))}
@media(max-width:767px){.tp [data-bookmark]{min-height:44px}}

/* ---------- Badges & chips ---------- */
.tp .badge{display:inline-flex;align-items:center;gap:4px;min-height:22px;padding:1px 8px;border-radius:var(--r-pill);font-size:var(--fs-12);font-weight:700;white-space:nowrap;background:rgb(var(--c-surface-2));color:rgb(var(--c-ink))}
.tp .badge-brand{background:rgb(var(--c-brand-soft));color:rgb(var(--c-brand))}
.tp .badge-verified{background:rgb(var(--c-verified-soft));color:rgb(var(--c-verified))}
.tp .badge-caution{background:rgb(var(--c-caution-soft));color:rgb(var(--c-caution))}
.tp .badge-danger{background:rgb(var(--c-danger-soft));color:rgb(var(--c-danger))}
.tp .badge-outline{background:transparent;border:1px solid rgb(var(--c-line-strong));color:rgb(var(--c-ink-muted))}
.tp .cat-chip{display:inline-flex;align-items:center;gap:5px;min-height:24px;padding:1px 9px 1px 7px;border-radius:var(--r-pill);font-size:var(--fs-12);font-weight:700;color:var(--cat);background:color-mix(in srgb,var(--cat) 12%,transparent);white-space:nowrap}
.tp a.cat-chip:hover{background:color-mix(in srgb,var(--cat) 20%,transparent)}
.tp .kw-tag{display:inline-flex;align-items:center;min-height:28px;padding:0 8px;border-radius:var(--r-sm);font-size:var(--fs-13);color:rgb(var(--c-ink-muted));background:rgb(var(--c-surface-2))}
.tp .kw-tag:hover{color:rgb(var(--c-brand))}

/* ---------- Forms ---------- */
.tp .field{display:block}
.tp .field>label,.tp .field-label{display:block;font-size:var(--fs-13);font-weight:700;color:rgb(var(--c-ink-strong));margin-bottom:6px}
.tp .input,.tp .field input:not([type=checkbox]):not([type=radio]):not([type=file]),.tp .field select,.tp .field textarea{width:100%;min-height:44px;padding:10px 12px;border-radius:var(--r-md);border:1px solid rgb(var(--c-line-strong));background:rgb(var(--c-surface));color:rgb(var(--c-ink-strong));font-size:16px;line-height:1.5}
.tp .input::placeholder,.tp .field input::placeholder,.tp .field textarea::placeholder{color:rgb(var(--c-ink-muted))}
.tp .input:focus,.tp .field input:focus,.tp .field select:focus,.tp .field textarea:focus{outline:none;border-color:rgb(var(--c-brand));box-shadow:var(--focus)}
.tp .select-inline{min-height:40px;padding:0 32px 0 12px;border-radius:var(--r-md);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface));color:rgb(var(--c-ink-strong));font-size:14px;font-weight:600}
@media(max-width:767px){.tp .select-inline{min-height:44px;font-size:16px}}
.tp .check-chip{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 14px;border-radius:var(--r-pill);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface));font-size:14px;font-weight:600;color:rgb(var(--c-ink));cursor:pointer}
.tp .check-chip input{width:18px;height:18px;accent-color:rgb(var(--c-brand-fill))}
.tp .check-chip:has(input:checked){border-color:rgb(var(--c-brand));background:rgb(var(--c-brand-soft));color:rgb(var(--c-brand))}
.tp .check-chip .icon{color:var(--cat)}

/* ---------- Sub tabs (내 소식 / 정책) ---------- */
.tp .subtabs{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid rgb(var(--c-line));margin-bottom:20px}
.tp .subtabs::-webkit-scrollbar{display:none}
.tp .subtab{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;font-size:14px;font-weight:650;color:rgb(var(--c-ink-muted));white-space:nowrap;border-bottom:2px solid transparent;margin-bottom:-1px}
.tp .subtab:hover{color:rgb(var(--c-ink-strong))}
.tp .subtab[aria-current]{color:rgb(var(--c-ink-strong));border-bottom-color:rgb(var(--c-brand))}
.tp .subtab[aria-current] .icon{color:rgb(var(--c-brand))}

/* ---------- Empty / skeleton ---------- */
.tp .empty-state{text-align:center;padding:40px 20px;border:1px dashed rgb(var(--c-line-strong));border-radius:var(--r-lg);background:rgb(var(--c-surface))}
.tp .empty-icon{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:50%;background:rgb(var(--c-brand-soft));color:rgb(var(--c-brand));font-size:24px;margin-bottom:12px}
.tp .empty-title{font-size:var(--fs-17);font-weight:750;color:rgb(var(--c-ink-strong))}
.tp .empty-desc{margin:6px auto 0;max-width:46ch;font-size:var(--fs-15);color:rgb(var(--c-ink-muted))}
.tp .empty-actions{margin-top:16px;display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.tp .skeleton-list{display:grid;gap:12px}
.tp .skeleton-card{display:grid;gap:10px;padding:18px;border-radius:var(--r-lg);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface))}
.tp .sk{display:block;height:12px;border-radius:6px;background:linear-gradient(90deg,rgb(var(--c-surface-2)) 0%,rgb(var(--c-line)) 50%,rgb(var(--c-surface-2)) 100%);background-size:200% 100%;animation:tp-shimmer 1.3s ease-in-out infinite}
.tp .sk-title{height:18px;width:80%}.tp .sk-w40{width:40%}.tp .sk-w70{width:70%}
@keyframes tp-shimmer{0%{background-position:100% 0}100%{background-position:-100% 0}}
.tp [data-skeleton][hidden]{display:none}

/* ---------- Home ---------- */
.tp .home-grid{display:grid;gap:24px}
@media(min-width:1024px){.tp .home-grid{grid-template-columns:minmax(0,8fr) minmax(300px,4fr);gap:32px;align-items:start}}
.tp .rail{display:grid;gap:16px;align-content:start}
@media(min-width:1024px){.tp .rail{position:sticky;top:calc(var(--header-h) + 16px)}}
.tp .feed-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin-bottom:14px}
.tp .feed-toolbar .topic-tabs{flex:1 1 100%;min-width:0}
.tp .feed-count{font-size:var(--fs-13);color:rgb(var(--c-ink-muted))}
.tp .feed-count strong{color:rgb(var(--c-ink-strong))}
.tp .lead-card{position:relative;padding:24px}
@media(min-width:768px){.tp .lead-card{padding:28px}}
.tp .lead-card h2{font-size:var(--fs-24);line-height:1.35;font-weight:800;letter-spacing:-.02em;color:rgb(var(--c-ink-strong));margin-top:10px}
@media(min-width:768px){.tp .lead-card h2{font-size:var(--fs-30)}}
.tp .lead-card .summary{margin-top:10px;font-size:var(--fs-17);line-height:1.65;color:rgb(var(--c-ink));display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tp .lead-eyebrow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.tp .card-title-link{color:inherit}
.tp .card-title-link:hover{color:rgb(var(--c-brand))}
.tp .card-title-link::after{content:"";position:absolute;inset:0;border-radius:inherit}
.tp .card-actions{position:relative;z-index:1;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tp .trust-meta{display:inline-flex;align-items:center;gap:6px;font-size:var(--fs-13);color:rgb(var(--c-ink-muted))}
.tp .trust-meta .icon{color:rgb(var(--c-verified))}
.tp .headline-grid{display:grid;gap:12px;margin-top:12px}
@media(min-width:640px){.tp .headline-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tp .headline-card{position:relative;display:flex;flex-direction:column;gap:8px;padding:16px 18px}
.tp .headline-card h2{font-size:var(--fs-17);line-height:1.45;font-weight:750;color:rgb(var(--c-ink-strong));display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tp .headline-card .foot{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:8px}
.tp .feed-list{display:grid;gap:12px}
.tp .feed-card{position:relative;padding:18px 20px}
.tp .feed-card h2{font-size:var(--fs-17);line-height:1.45;font-weight:750;color:rgb(var(--c-ink-strong));margin-top:8px}
@media(min-width:768px){.tp .feed-card h2{font-size:var(--fs-20)}}
.tp .feed-card .summary{margin-top:6px;font-size:var(--fs-15);color:rgb(var(--c-ink));display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tp .feed-card .foot{margin-top:12px;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.tp .kw-row{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:6px}
.tp .pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}
.tp .pager .pager-label{font-size:var(--fs-13);color:rgb(var(--c-ink-muted))}
.tp .pager .is-disabled{opacity:.45;pointer-events:none}
.tp .search-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;border-radius:var(--r-md);background:rgb(var(--c-brand-soft));color:rgb(var(--c-ink-strong));font-size:var(--fs-15);margin-bottom:14px}

/* Rail widgets */
.tp .rail .card{padding:16px}
.tp .rail-title{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:var(--fs-15);font-weight:750;color:rgb(var(--c-ink-strong));margin-bottom:10px}
.tp .rail-title .icon{color:rgb(var(--c-brand))}
.tp .rail-title h2{display:flex;align-items:center;gap:6px;font-size:inherit;font-weight:inherit}
.tp .issue-item{position:relative}
.tp .issue-item details,.tp .issue-item .badges{position:relative;z-index:1}
.tp .issue-item h3 .icon{font-size:12px;margin-left:3px;color:rgb(var(--c-ink-muted))}
@media(max-width:767px){.tp #trending-issues-list>:nth-child(n+3){display:none}.tp .rail .rail-list>li:nth-child(n+4){display:none}.tp #latest-items-card{display:none}}
.tp .rail-list{display:grid}
.tp .rail-list>li{padding:10px 0;border-top:1px solid rgb(var(--c-line))}
.tp .rail-list>li:first-child{border-top:0;padding-top:2px}
.tp .rail-link{display:block;font-size:var(--fs-15);line-height:1.45;font-weight:600;color:rgb(var(--c-ink-strong))}
.tp .rail-link:hover{color:rgb(var(--c-brand))}
.tp .rail-link .icon{font-size:12px;color:rgb(var(--c-ink-muted));margin-left:2px}
.tp .src-type{display:inline-flex;align-items:center;gap:4px;font-size:var(--fs-12);font-weight:700;color:rgb(var(--c-ink-muted))}
.tp .src-type.gov{color:rgb(var(--c-caution))}
.tp .src-type.youtube{color:rgb(var(--c-danger))}
.tp .market-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tp .quote{padding:10px 12px;border-radius:var(--r-md);background:rgb(var(--c-surface-2))}
.tp .quote-name{display:flex;align-items:center;justify-content:space-between;gap:4px;font-size:var(--fs-13);font-weight:700;color:rgb(var(--c-ink-strong))}
.tp .quote-price{font-size:var(--fs-20);font-weight:800;color:rgb(var(--c-ink-strong));font-variant-numeric:tabular-nums;margin-top:2px}
.tp .quote-change{font-size:var(--fs-13);font-weight:700;font-variant-numeric:tabular-nums;min-height:18px}
.tp .quote-change.is-up{color:rgb(var(--c-up))}.tp .quote-change.is-down{color:rgb(var(--c-down))}
.tp .quote-state{font-size:var(--fs-12);color:rgb(var(--c-ink-muted));margin-top:2px}
.tp .fx-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;font-size:var(--fs-13)}
.tp .kw-rank{counter-reset:kw;display:grid}
.tp .kw-rank li{display:flex;align-items:center;gap:10px;min-height:40px;border-top:1px solid rgb(var(--c-line))}
.tp .kw-rank li:first-child{border-top:0}
.tp .kw-rank .rank{width:20px;font-weight:800;color:rgb(var(--c-brand));font-variant-numeric:tabular-nums;text-align:center}
.tp .kw-rank a{flex:1;min-width:0;font-weight:650;color:rgb(var(--c-ink-strong));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tp .kw-rank a:hover{color:rgb(var(--c-brand))}
.tp .kw-growth{font-size:var(--fs-12);font-weight:700;color:rgb(var(--c-up));font-variant-numeric:tabular-nums;white-space:nowrap}
.tp .kw-growth.is-new{color:rgb(var(--c-brand))}
.tp .issue-list{display:grid;gap:10px}
@media(min-width:768px){.tp .issue-list.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}
.tp .issue-item{padding:14px 16px;border-radius:var(--r-md);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface))}
.tp .issue-item summary{cursor:pointer;list-style:none;font-weight:700;color:rgb(var(--c-ink-strong));line-height:1.45}
.tp .issue-item summary::-webkit-details-marker{display:none}
.tp .issue-item .badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.tp .timeline{margin-top:12px;border-left:2px solid rgb(var(--c-line));padding-left:14px;display:grid;gap:12px}

/* ---------- Article ---------- */
.tp .article-layout{position:relative;max-width:1120px;margin:0 auto}
.tp .article-main{min-width:0;max-width:760px;width:100%;margin:0 auto}
@media(min-width:1100px){.tp .article-layout{padding-right:290px}.tp .article-main{margin:0}}
.tp .toc{margin-top:16px;border-radius:var(--r-md);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface))}
.tp .toc>summary{display:flex;align-items:center;min-height:48px;padding:0 16px;font-weight:700;color:rgb(var(--c-ink-strong));cursor:pointer;list-style:none}
.tp .toc>summary::-webkit-details-marker{display:none}
.tp .toc>summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid rgb(var(--c-ink-muted));border-bottom:2px solid rgb(var(--c-ink-muted));transform:rotate(45deg)}
.tp .toc[open]>summary::after{transform:rotate(-135deg)}
.tp .toc ol{padding:0 16px 12px;font-size:var(--fs-15)}
.tp .toc a{display:block;padding:7px 0 7px 12px;border-left:2px solid rgb(var(--c-line));color:rgb(var(--c-ink-muted));line-height:1.45}
.tp .toc a:hover,.tp .toc a[aria-current]{color:rgb(var(--c-brand));border-left-color:rgb(var(--c-brand))}
.tp .toc a.toc-h3{padding-left:24px;font-size:var(--fs-13)}
@media(min-width:1100px){
  .tp .toc{position:absolute;top:0;right:0;bottom:0;width:250px;margin:0;border:0;background:transparent}
  .tp .toc>summary{position:sticky;top:calc(var(--header-h) + 24px);min-height:32px;padding:0;font-size:var(--fs-13);letter-spacing:.04em;color:rgb(var(--c-ink-muted));cursor:default}
  .tp .toc>summary::after{display:none}
  .tp .toc ol{position:sticky;top:calc(var(--header-h) + 60px);max-height:calc(100vh - var(--header-h) - 96px);overflow:auto;padding:0;font-size:var(--fs-13)}
}
.tp #like-icon.is-liked{fill:currentColor;color:rgb(var(--c-up))}
.tp #like-btn[aria-pressed="true"]{color:rgb(var(--c-up))}
.tp .crumb{display:inline-flex;align-items:center;gap:6px;min-height:40px;font-size:var(--fs-13);font-weight:600;color:rgb(var(--c-ink-muted))}
.tp .crumb:hover{color:rgb(var(--c-brand))}
.tp .article-title{font-size:26px;line-height:1.35;font-weight:800;letter-spacing:-.025em;color:rgb(var(--c-ink-strong));margin-top:10px}
@media(min-width:768px){.tp .article-title{font-size:34px}}
.tp .trust-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:14px}
.tp .trust-line a.badge:hover{filter:brightness(.97);text-decoration:underline}
.tp .action-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:18px;padding:12px 0;border-top:1px solid rgb(var(--c-line));border-bottom:1px solid rgb(var(--c-line))}
.tp .action-row .spacer{flex:1}
.tp .menu{position:relative}
.tp .menu>summary{list-style:none}
.tp .menu>summary::-webkit-details-marker{display:none}
.tp .menu-panel{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:200px;padding:6px;border-radius:var(--r-md);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface));box-shadow:var(--shadow-2)}
.tp .menu-panel button,.tp .menu-panel a{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;border-radius:var(--r-sm);font-size:14px;font-weight:600;color:rgb(var(--c-ink));text-align:left}
.tp .menu-panel button:hover:not(:disabled),.tp .menu-panel a:hover{background:rgb(var(--c-surface-2));color:rgb(var(--c-ink-strong))}
.tp .menu-panel .icon{color:rgb(var(--c-ink-muted))}
.tp .summary-box{margin-top:20px;padding:18px 20px;border-radius:var(--r-lg);background:rgb(var(--c-brand-soft));border:1px solid rgb(var(--c-brand) / .18)}
.tp .summary-box h2{display:flex;align-items:center;gap:6px;font-size:var(--fs-13);font-weight:800;letter-spacing:.02em;color:rgb(var(--c-brand))}
.tp .summary-box .summary-text{margin-top:8px;font-size:var(--fs-17);line-height:1.7;color:rgb(var(--c-ink-strong));white-space:pre-line}
.tp .article-body{margin-top:28px;font-size:var(--fs-17);line-height:var(--lh-body);max-width:var(--measure)}
.tp .prose{--tw-prose-body:rgb(var(--c-ink));--tw-prose-headings:rgb(var(--c-ink-strong));--tw-prose-lead:rgb(var(--c-ink));--tw-prose-links:rgb(var(--c-brand));--tw-prose-bold:rgb(var(--c-ink-strong));--tw-prose-counters:rgb(var(--c-ink-muted));--tw-prose-bullets:rgb(var(--c-line-strong));--tw-prose-hr:rgb(var(--c-line));--tw-prose-quotes:rgb(var(--c-ink-strong));--tw-prose-quote-borders:rgb(var(--c-line-strong));--tw-prose-captions:rgb(var(--c-ink-muted));--tw-prose-code:rgb(var(--c-ink-strong));--tw-prose-th-borders:rgb(var(--c-line-strong));--tw-prose-td-borders:rgb(var(--c-line))}
.tp .article-body.prose{font-size:var(--fs-17);line-height:var(--lh-body)}
.tp .article-body h2{font-size:var(--fs-20);scroll-margin-top:calc(var(--header-h) + 20px)}
.tp .article-body h3{font-size:var(--fs-17);scroll-margin-top:calc(var(--header-h) + 20px)}
.tp .article-body img{max-width:100%;height:auto;border-radius:var(--r-md)}
.tp .article-body table{display:block;max-width:100%;overflow-x:auto}
.tp .article-body .is-dup-brief{display:none}
.tp .article-body.has-inline-brief>div:first-child>div:first-child:has(>h3:first-child){display:none}
.tp .action-plan{margin-top:28px;padding:20px 22px;border-radius:var(--r-lg);border:1px solid rgb(var(--c-verified) / .25);background:rgb(var(--c-verified-soft))}
.tp .action-plan h2{display:flex;align-items:center;gap:8px;font-size:var(--fs-17);font-weight:800;color:rgb(var(--c-ink-strong))}
.tp .action-plan h2 .icon{color:rgb(var(--c-verified))}
.tp .action-plan .plan-text{margin-top:8px;font-size:var(--fs-15);line-height:1.75;color:rgb(var(--c-ink));white-space:pre-line}
.tp .article-section{margin-top:32px}
.tp .article-section>h2{font-size:var(--fs-20);font-weight:800;color:rgb(var(--c-ink-strong));letter-spacing:-.01em}

/* Evidence tabs: <details> summaries act as a tab row (keeps no-JS + print). */
.tp .ev-tabs{position:relative;padding-top:52px;margin-top:14px}
.tp .ev-tabs::before{content:"";position:absolute;left:0;right:0;top:50px;border-top:1px solid rgb(var(--c-line))}
.tp .ev-tabs>details>summary{position:absolute;top:0;height:52px;width:25%;left:calc(25% * var(--i));display:flex;align-items:center;justify-content:center;gap:6px;padding:0 4px;list-style:none;cursor:pointer;font-size:14px;font-weight:650;color:rgb(var(--c-ink-muted));border-bottom:2px solid transparent;text-align:center;line-height:1.2;z-index:1}
.tp .ev-tabs>details>summary::-webkit-details-marker{display:none}
.tp .ev-tabs>details>summary:hover{color:rgb(var(--c-ink-strong))}
.tp .ev-tabs>details[open]>summary{color:rgb(var(--c-ink-strong));border-bottom-color:rgb(var(--c-brand))}
.tp .ev-tabs>details>summary .count{font-size:var(--fs-12);font-weight:700;color:rgb(var(--c-ink-muted));background:rgb(var(--c-surface-2));border-radius:var(--r-pill);padding:0 7px;min-width:20px}
.tp .ev-tabs>details[open]>summary .count{background:rgb(var(--c-brand-soft));color:rgb(var(--c-brand))}
.tp .ev-tabs>details>.ev-panel{padding-top:16px}
.tp .ev-tabs:not(:has(>details[open]))::after{content:"위 탭을 눌러 원문, 주장별 대조, 지난 분석, 정정 이력을 확인하세요.";display:block;padding:16px 0;font-size:var(--fs-13);color:rgb(var(--c-ink-muted))}
@media(max-width:519px){.tp .ev-tabs>details>summary{font-size:13px;flex-direction:column;gap:2px}.tp .ev-tabs{padding-top:60px}.tp .ev-tabs::before{top:58px}.tp .ev-tabs>details>summary{height:60px}}
.tp .ev-list>li{padding:12px 0;border-top:1px solid rgb(var(--c-line))}
.tp .ev-list>li:first-child{border-top:0;padding-top:0}
.tp .ev-src{font-size:var(--fs-15);font-weight:650;color:rgb(var(--c-ink-strong))}
.tp .ev-src:hover{color:rgb(var(--c-brand));text-decoration:underline}
.tp .claim{padding:12px 14px;border-radius:var(--r-md);border:1px solid rgb(var(--c-line))}
.tp .details-plain{border-radius:var(--r-md);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface))}
.tp .details-plain>summary{cursor:pointer;display:flex;align-items:center;gap:8px;min-height:48px;padding:0 16px;font-weight:700;color:rgb(var(--c-ink-strong));list-style:none}
.tp .details-plain>summary::-webkit-details-marker{display:none}
.tp .details-plain>summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid rgb(var(--c-ink-muted));border-bottom:2px solid rgb(var(--c-ink-muted));transform:rotate(45deg);transition:transform .15s}
.tp .details-plain[open]>summary::after{transform:rotate(-135deg)}
.tp .details-plain>.details-body{padding:0 16px 16px}

/* Poll & comments */
.tp .poll-option{position:relative;display:block;width:100%;min-height:52px;padding:14px 16px;border-radius:var(--r-md);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface));text-align:left;overflow:hidden}
.tp .poll-option:hover{border-color:rgb(var(--c-brand))}
.tp .poll-bar{position:absolute;inset:0 auto 0 0;background:rgb(var(--c-brand) / .12);transition:width .5s}
.tp .poll-row{position:relative;display:flex;justify-content:space-between;gap:12px;font-size:var(--fs-15);font-weight:650;color:rgb(var(--c-ink-strong))}
.tp .poll-row .pct{color:rgb(var(--c-brand));white-space:nowrap}
.tp .comment{padding:14px 16px;border-radius:var(--r-md);background:rgb(var(--c-surface-2))}
.tp .comment-head{display:flex;justify-content:space-between;gap:8px;font-size:var(--fs-13);color:rgb(var(--c-ink-muted))}
.tp .comment-head strong{color:rgb(var(--c-ink-strong))}
.tp .comment p{margin-top:6px;font-size:var(--fs-15);color:rgb(var(--c-ink))}

/* ---------- Modal / toast ---------- */
.tp .modal:not(.hidden){position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:16px;background:rgb(var(--c-overlay) / .6);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.tp .modal-panel{width:100%;max-width:520px;max-height:90vh;overflow-y:auto;padding:24px;border-radius:var(--r-lg);background:rgb(var(--c-surface));border:1px solid rgb(var(--c-line));box-shadow:var(--shadow-2);display:grid;gap:14px}
.tp .modal-sm{max-width:400px}
.tp .modal-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tp .modal-head h2{font-size:var(--fs-17);font-weight:800;color:rgb(var(--c-ink-strong))}
.tp .modal-body{display:grid;gap:10px;font-size:var(--fs-15);line-height:1.7;color:rgb(var(--c-ink))}
.tp .modal-foot{display:flex;justify-content:flex-end}
.tp .toast{position:fixed;right:16px;bottom:24px;z-index:70;display:flex;align-items:center;gap:10px;max-width:min(420px,calc(100vw - 32px));padding:12px 16px;border-radius:var(--r-md);background:#0f172a;color:#fff;font-size:14px;font-weight:600;box-shadow:var(--shadow-2);transition:transform .3s,opacity .3s}
.tp[data-theme="dark"] .toast{background:#e2e8f0;color:#0f172a}
.tp .toast.opacity-0{pointer-events:none} /* hidden toast must not swallow taps on the mobile tab bar */
@media(max-width:767px){.tp .toast{left:16px;right:16px;bottom:calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom))}}
.tp .ad-top{margin-top:16px}
.tp .ad-slot{border-radius:var(--r-lg);border:1px solid rgb(var(--c-line));background:rgb(var(--c-surface));padding:8px;min-height:90px;overflow:hidden;text-align:center}

@media(prefers-reduced-motion:reduce){.tp .sk{animation:none}.tp .poll-bar,.tp .card-link{transition:none}}

/* ---------- Dark-mode compatibility for legacy Tailwind color utilities ----------
   Some reader templates (community) and runtime-rendered markup still use
   literal slate/indigo/white utilities. Remap them to tokens in dark mode so
   every reader page stays readable. Admin pages are locked to light. */
.tp[data-theme="dark"] .bg-white,.tp[data-theme="dark"] .bg-white\/80,.tp[data-theme="dark"] .bg-white\/90{background-color:rgb(var(--c-surface))}
.tp[data-theme="dark"] .bg-slate-50,.tp[data-theme="dark"] .bg-slate-50\/80,.tp[data-theme="dark"] .bg-slate-100,.tp[data-theme="dark"] .bg-gray-50,.tp[data-theme="dark"] .bg-gray-100{background-color:rgb(var(--c-surface-2))}
.tp[data-theme="dark"] .bg-slate-200{background-color:rgb(var(--c-line))}
.tp[data-theme="dark"] .text-slate-950,.tp[data-theme="dark"] .text-slate-900,.tp[data-theme="dark"] .text-slate-800,.tp[data-theme="dark"] .text-gray-900,.tp[data-theme="dark"] .text-gray-800{color:rgb(var(--c-ink-strong))}
.tp[data-theme="dark"] .text-slate-700,.tp[data-theme="dark"] .text-slate-600,.tp[data-theme="dark"] .text-gray-700,.tp[data-theme="dark"] .text-gray-600{color:rgb(var(--c-ink))}
.tp[data-theme="dark"] .text-slate-500,.tp[data-theme="dark"] .text-slate-400,.tp[data-theme="dark"] .text-gray-500{color:rgb(var(--c-ink-muted))}
.tp[data-theme="dark"] .border-slate-100,.tp[data-theme="dark"] .border-slate-200,.tp[data-theme="dark"] .border-slate-200\/80,.tp[data-theme="dark"] .border-slate-300,.tp[data-theme="dark"] .border,.tp[data-theme="dark"] .border-t,.tp[data-theme="dark"] .border-b,.tp[data-theme="dark"] .divide-slate-100>*{border-color:rgb(var(--c-line))}
.tp[data-theme="dark"] .bg-indigo-50,.tp[data-theme="dark"] .bg-indigo-50\/50,.tp[data-theme="dark"] .bg-indigo-50\/80,.tp[data-theme="dark"] .bg-indigo-100,.tp[data-theme="dark"] .bg-purple-50{background-color:rgb(var(--c-brand-soft))}
.tp[data-theme="dark"] .text-indigo-600,.tp[data-theme="dark"] .text-indigo-700,.tp[data-theme="dark"] .text-indigo-800,.tp[data-theme="dark"] .text-indigo-900,.tp[data-theme="dark"] .text-indigo-950,.tp[data-theme="dark"] .text-purple-700{color:rgb(var(--c-brand))}
.tp[data-theme="dark"] .border-indigo-100,.tp[data-theme="dark"] .border-indigo-200,.tp[data-theme="dark"] .border-indigo-300{border-color:rgb(var(--c-brand) / .35)}
.tp[data-theme="dark"] .bg-amber-50,.tp[data-theme="dark"] .bg-amber-100,.tp[data-theme="dark"] .bg-orange-50{background-color:rgb(var(--c-caution-soft))}
.tp[data-theme="dark"] .text-amber-700,.tp[data-theme="dark"] .text-amber-800,.tp[data-theme="dark"] .text-amber-900,.tp[data-theme="dark"] .text-amber-950{color:rgb(var(--c-caution))}
.tp[data-theme="dark"] .bg-emerald-50,.tp[data-theme="dark"] .bg-emerald-100{background-color:rgb(var(--c-verified-soft))}
.tp[data-theme="dark"] .text-emerald-700,.tp[data-theme="dark"] .text-emerald-800,.tp[data-theme="dark"] .text-emerald-900{color:rgb(var(--c-verified))}
.tp[data-theme="dark"] .bg-rose-50,.tp[data-theme="dark"] .bg-rose-100,.tp[data-theme="dark"] .bg-red-50{background-color:rgb(var(--c-danger-soft))}
.tp[data-theme="dark"] .text-rose-500,.tp[data-theme="dark"] .text-rose-600,.tp[data-theme="dark"] .text-rose-700,.tp[data-theme="dark"] .text-rose-800,.tp[data-theme="dark"] .text-rose-900{color:rgb(var(--c-danger))}
.tp[data-theme="dark"] .bg-blue-100{background-color:rgb(37 99 235 / .18)}
.tp[data-theme="dark"] .text-blue-700{color:#93c5fd}
.tp[data-theme="dark"] .hover\:bg-slate-50:hover,.tp[data-theme="dark"] .hover\:bg-slate-100:hover,.tp[data-theme="dark"] .hover\:bg-slate-200:hover{background-color:rgb(var(--c-line))}
.tp[data-theme="dark"] .hover\:bg-indigo-50:hover,.tp[data-theme="dark"] .hover\:bg-indigo-100:hover{background-color:rgb(var(--c-brand-soft))}
.tp[data-theme="dark"] .hover\:text-slate-600:hover,.tp[data-theme="dark"] .hover\:text-slate-800:hover{color:rgb(var(--c-ink-strong))}
.tp[data-theme="dark"] .from-slate-50,.tp[data-theme="dark"] .from-indigo-50,.tp[data-theme="dark"] .from-amber-50{--tw-gradient-from:rgb(var(--c-surface-2)) var(--tw-gradient-from-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
.tp[data-theme="dark"] .to-white,.tp[data-theme="dark"] .to-purple-50,.tp[data-theme="dark"] .to-orange-50,.tp[data-theme="dark"] .to-slate-50{--tw-gradient-to:rgb(var(--c-surface)) var(--tw-gradient-to-position)}
.tp[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=file]),.tp[data-theme="dark"] select,.tp[data-theme="dark"] textarea{color:rgb(var(--c-ink-strong));background-color:rgb(var(--c-surface))}
.tp[data-theme="dark"] .ad-placeholder{background:rgb(var(--c-surface-2));border-color:rgb(var(--c-line))}
/* AI-generated report bodies carry inline light-theme styles. */
.tp[data-theme="dark"] .article-body [style*="background"]{background-color:rgb(var(--c-surface-2))!important;background-image:none!important}
.tp[data-theme="dark"] .article-body [style*="border"]{border-color:rgb(var(--c-line-strong))!important}
.tp[data-theme="dark"] .article-body [style*="color"]{color:inherit!important}

/* ---------- Print ---------- */
@media print{
  .tp .site-header,.tp .site-footer,.tp .tabbar,.tp .admin-bar,.tp .ad-slot,.tp #toast,.tp .no-print,.tp .article-toc,.tp .action-row,.tp form{display:none!important}
  .tp body{background:#fff!important;color:#000!important;padding:0!important}
  .tp .card,.tp .summary-box,.tp .action-plan{box-shadow:none!important;border-color:#ccc!important;background:transparent!important}
  .tp .ev-tabs{padding-top:0}
  .tp .ev-tabs>details>summary{position:static;width:auto;height:auto;justify-content:flex-start;font-weight:800;color:#000;border:0;margin-top:12px}
  .tp .ev-tabs>details>*{display:block!important}
  .tp .ev-tabs::before,.tp .ev-tabs::after{display:none}
}

/* Card footers: badge + source meta wrap as one group; actions never squeeze the text into a thin column. */
.tp .trust-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;min-width:0;flex:1 1 200px}
.tp .trust-meta{flex-wrap:wrap;min-width:0;row-gap:2px}
.tp .trust-meta time{white-space:nowrap}
.tp .headline-card .foot,.tp .feed-card .foot{flex-wrap:wrap}
.tp .card-actions{flex:0 1 auto;min-width:0;margin-left:auto}
.tp .feed-card .card-actions{flex:1 1 100%;margin-left:0}
.tp .lead-card .card-actions{margin-left:auto}
