:root {
  --cd-bg: #f8fafc;
  --cd-surface: #ffffff;
  --cd-ink: #0f172a;
  --cd-sub: #475569;
  --cd-muted: #94a3b8;
  --cd-border: #e2e8f0;
  --cd-accent: #7c3aed;
  --cd-accent-bg: #ede3fd;
  --cd-danger: #dc2626;
  --cd-danger-bg: #fef2f2;
  --cd-warn-bg: #fffbeb;
  --cd-warn-border: #fde68a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --cd-bg: #0b1120;
    --cd-surface: #131b2e;
    --cd-ink: #e5e9f5;
    --cd-sub: #a3adc2;
    --cd-muted: #6b7690;
    --cd-border: #232d45;
    --cd-accent: #a78bfa;
    --cd-accent-bg: #241b3d;
    --cd-danger: #f87171;
    --cd-danger-bg: #2a1414;
    --cd-warn-bg: #241f0f;
    --cd-warn-border: #4a3f18;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  background: var(--cd-bg);
  color: var(--cd-ink);
  line-height: 1.65;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
.cd-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.cd-header { background: var(--cd-surface); border-bottom: 1px solid var(--cd-border); position: sticky; top: 0; z-index: 50; }
.cd-header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.cd-brand { font-weight: 800; font-size: 1.1rem; }
.cd-nav-link { font-size: 0.875rem; color: var(--cd-sub); font-weight: 600; }

.cd-hero { padding: 32px 0 20px; }
.cd-hero h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 8px; }
.cd-hero p { color: var(--cd-sub); margin: 0; }

.cd-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cd-chip { padding: 7px 14px; border-radius: 999px; background: var(--cd-surface); border: 1px solid var(--cd-border); font-size: 0.825rem; font-weight: 600; color: var(--cd-sub); }
.cd-chip-active { background: var(--cd-accent); color: #fff; border-color: var(--cd-accent); }
.cd-chip-divider { width: 1px; background: var(--cd-border); margin: 0 4px; }

.cd-empty { text-align: center; padding: 60px 0; color: var(--cd-muted); }

.cd-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 40px; }
.cd-related-card { display: block; background: var(--cd-surface); border: 1px solid var(--cd-border); border-radius: 14px; padding: 18px; transition: box-shadow .15s, transform .15s; }
.cd-related-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.cd-related-issuer { font-size: 0.75rem; font-weight: 700; color: var(--cd-accent); margin-bottom: 6px; }
.cd-related-title { font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.cd-related-expired { opacity: 0.55; }

.cd-breadcrumb { font-size: 0.8rem; color: var(--cd-muted); margin: 20px 0; }
.cd-breadcrumb a { color: var(--cd-muted); }

.cd-article { background: var(--cd-surface); border: 1px solid var(--cd-border); border-radius: 18px; padding: 32px; margin-bottom: 32px; }
.cd-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 12px; line-height: 1.4; }

.cd-source-badge { font-size: 0.8rem; color: var(--cd-muted); margin-bottom: 20px; }

.cd-summary-card { background: var(--cd-bg); border: 1px solid var(--cd-border); border-radius: 14px; padding: 18px 20px; margin: 20px 0; }
.cd-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--cd-border); font-size: 0.9rem; }
.cd-summary-row:last-child { border-bottom: none; }
.cd-summary-label { color: var(--cd-muted); font-weight: 600; }
.cd-summary-value { font-weight: 700; }

.cd-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.cd-badge-neutral { background: var(--cd-border); color: var(--cd-sub); }
.cd-badge-normal { background: var(--cd-accent-bg); color: var(--cd-accent); }
.cd-badge-urgent { background: var(--cd-danger-bg); color: var(--cd-danger); }
.cd-badge-expired { background: var(--cd-border); color: var(--cd-muted); }
.cd-badge-merchant { background: var(--cd-accent-bg); color: var(--cd-accent); margin-left: 6px; }

.cd-expired-banner { background: var(--cd-warn-bg); border: 1px solid var(--cd-warn-border); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600; font-size: 0.9rem; }

.cd-content, .cd-content-card, .content-card { margin: 16px 0; }
.cd-content-card, .content-card { background: var(--cd-bg); border: 1px solid var(--cd-border); border-radius: 14px; padding: 20px 24px; }
.cd-card-title-head, .card-title-head { margin-top: 0 !important; }
.cd-content h2, .cd-content h3, .cd-content h4 { color: var(--cd-ink); }
.cd-table-wrap, .table-wrap { overflow-x: auto; }
.cd-content table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cd-content th, .cd-content td { border: 1px solid var(--cd-border); padding: 10px; text-align: left; }
.cd-content th { background: var(--cd-surface); }
.human-divider { height: 1px; background: var(--cd-border); margin: 24px 0; }
.card-disclaimer { font-size: 0.8rem; color: var(--cd-muted); background: var(--cd-bg); border-radius: 10px; padding: 14px; margin-top: 20px; }

.cd-sticky-cta { position: sticky; bottom: 16px; margin: 24px 0; z-index: 10; }
.cd-sticky-cta a { display: block; text-align: center; background: var(--cd-accent); color: #fff; font-weight: 700; padding: 14px; border-radius: 12px; box-shadow: 0 8px 20px rgba(124,58,237,.35); }

.cd-faq { margin-top: 28px; }
.cd-faq-item { background: var(--cd-bg); border: 1px solid var(--cd-border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.cd-faq-item summary { cursor: pointer; font-weight: 700; }
.cd-faq-item p { margin: 10px 0 0; color: var(--cd-sub); }

.cd-ad-container { margin: 24px 0; }
.cd-ad-label { font-size: 0.65rem; color: var(--cd-muted); text-align: center; letter-spacing: .1em; margin-bottom: 6px; }
.cd-ad-slot, .ad-slot { min-height: 100px; }

.cd-warning-box { background: var(--cd-warn-bg); border: 1px solid var(--cd-warn-border); border-radius: 12px; padding: 16px 18px; margin: 16px 0; }

.cd-section-title { font-size: 1.2rem; font-weight: 800; margin: 40px 0 16px; }

.cd-btn-primary { display: inline-block; background: var(--cd-accent); color: #fff; font-weight: 700; padding: 10px 20px; border-radius: 10px; border: none; cursor: pointer; }

.cd-footer { border-top: 1px solid var(--cd-border); margin-top: 40px; padding: 28px 0 40px; text-align: center; }
.cd-footer-links { font-size: 0.8rem; color: var(--cd-sub); margin-bottom: 10px; }
.cd-footer-disclaimer { font-size: 0.75rem; color: var(--cd-muted); max-width: 640px; margin: 0 auto 12px; }
.cd-footer-family { font-size: 0.8rem; margin-bottom: 10px; }
.cd-copyright { font-size: 0.7rem; color: var(--cd-muted); }
