:root {
  --bg: #030712;
  --card: rgba(15, 23, 42, .9);
  --card-2: #020617;
  --line: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --gold: #e2b86e;
  --gold-2: #f5d38c;
  --blue: #38bdf8;
  --green: #34d399;
  --red: #fb7185;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: 'Inter', 'Noto Sans KR', sans-serif; line-height: 1.75; -webkit-font-smoothing: antialiased; word-break: keep-all; }
a { color: var(--gold); }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(3, 7, 18, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-weight: 900; font-size: 16px; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--gold); }
.topnav { display: flex; gap: 8px; }
.topnav a { font-size: 14px; font-weight: 700; color: var(--soft); text-decoration: none; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0b1222; }
.topnav a.gold { color: var(--bg); background: linear-gradient(90deg, var(--gold), var(--gold-2)); border: none; }

/* List page */
.wrap { max-width: 1100px; margin: 0 auto; padding: 64px 24px 96px; }
.head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 44px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--gold); border: 1px solid rgba(226,184,110,.3); background: rgba(226,184,110,.08); padding: 6px 14px; border-radius: 999px; }
h1 { font-size: clamp(26px, 4.4vw, 42px); font-weight: 900; letter-spacing: -.02em; margin: 0; line-height: 1.3; }
h1 em { font-style: normal; color: var(--gold); }
.lead { color: var(--muted); font-size: 16px; max-width: 680px; margin: 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { overflow: hidden; display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); border-color: rgba(226,184,110,.5); }
.post-card .meta { font-size: 14px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.post-card .cat { color: var(--gold); font-weight: 800; }
.post-card .thumb { display: block; width: calc(100% + 52px); margin: -26px -26px 4px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px 20px 0 0; }
.post-card h2 { font-size: 18px; line-height: 1.45; margin: 0; font-weight: 800; }
.post-card p { margin: 0; font-size: 15px; color: var(--soft); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.post-card .more { margin-top: auto; font-size: 14px; font-weight: 800; color: var(--gold); }

/* Article */
.article { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; }
.article .pill { margin-bottom: 18px; }
.article h1 { text-align: left; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 28px; font-size: 14px; color: var(--muted); }
.byline b { color: var(--soft); }
.article h2 { font-size: 21px; font-weight: 900; margin: 52px 0 14px; letter-spacing: -.01em; line-height: 1.45; }
.article h2 .no { color: var(--gold); margin-right: 6px; }
.article h3 { font-size: 16px; font-weight: 800; margin: 28px 0 8px; }
.article p { font-size: 16px; color: #e2e8f0; margin: 0 0 16px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 16px; }
.article li { font-size: 16px; color: #e2e8f0; margin-bottom: 6px; }
.article strong { color: #fff; }
.hl { color: var(--gold); font-weight: 800; }

.summary { background: var(--card); border: 1px solid rgba(226,184,110,.35); border-radius: 18px; padding: 22px 24px; margin: 8px 0 8px; }
.summary .t { font-size: 14px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.summary ul { margin: 0; }
.summary li { font-size: 16px; }

.callout { border-left: 3px solid var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 7%, transparent); border-radius: 0 14px 14px 0; padding: 16px 20px; margin: 20px 0; }
.callout .t { font-weight: 800; font-size: 15px; color: var(--c, var(--gold)); margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }
.callout.me { --c: var(--blue); }
.callout.warn { --c: var(--red); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.stat .n { font-size: 28px; font-weight: 900; color: var(--gold); line-height: 1.1; }
.stat .d { font-size: 14px; color: var(--soft); margin-top: 6px; line-height: 1.5; }

.video { margin: 22px 0; }
.video .frame { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .cap { font-size: 14px; color: var(--muted); margin-top: 8px; }
.video .cap a { color: var(--soft); }

table.cmp { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0 20px; background: var(--card); border-radius: 14px; overflow: hidden; }
table.cmp th, table.cmp td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.cmp th { color: var(--gold); font-size: 14px; background: rgba(2,6,23,.6); }
table.cmp td { color: var(--soft); }
table.cmp tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

.checklist { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0; }
.checklist li i { color: var(--gold); margin-top: 5px; }

/* Card news */
.cards { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; margin: 18px 0 8px; }
.cards::-webkit-scrollbar { height: 8px; }
.cards::-webkit-scrollbar-thumb { background: #334155; border-radius: 99px; }
.cn { flex: none; width: 320px; aspect-ratio: 4 / 5; scroll-snap-align: start; border-radius: 18px; overflow: hidden; position: relative; background: radial-gradient(120% 80% at 100% 0%, rgba(226,184,110,.18), transparent 60%), linear-gradient(160deg, #0b1222, #030712 70%); border: 1px solid #243045; display: flex; flex-direction: column; padding: 26px 24px; container-type: inline-size; }
.cn .k { font-size: 4cqw; font-weight: 800; letter-spacing: .12em; color: var(--gold); }
.cn .pg { position: absolute; top: 24px; right: 24px; font-size: 3.6cqw; font-weight: 800; color: #64748b; }
.cn h4 { margin: 4cqw 0 0; font-size: 7.6cqw; line-height: 1.38; font-weight: 900; letter-spacing: -.02em; color: #fff; }
.cn h4 em { font-style: normal; color: var(--gold); }
.cn p { margin: 4cqw 0 0; font-size: 4.4cqw; line-height: 1.65; color: var(--soft); }
.cn .big { font-size: 15cqw; font-weight: 900; color: var(--gold); line-height: 1; margin-top: auto; }
.cn ul { margin: 5cqw 0 0; padding: 0; list-style: none; display: grid; gap: 3cqw; }
.cn li { font-size: 4.3cqw; line-height: 1.5; color: #e2e8f0; padding-left: 5cqw; position: relative; }
.cn li::before { content: ''; position: absolute; left: 0; top: .62em; width: 2cqw; height: 2cqw; border-radius: 50%; background: var(--gold); }
.cn .row { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; margin-top: 5cqw; }
.cn .box { border: 1px solid #334155; border-radius: 3cqw; padding: 3.4cqw; font-size: 3.9cqw; line-height: 1.5; color: var(--soft); }
.cn .box b { display: block; font-size: 3.4cqw; margin-bottom: 1.4cqw; }
.cn .box.no b { color: var(--red); }
.cn .box.ok b { color: var(--green); }
.cn .foot { margin-top: auto; font-size: 3.6cqw; font-weight: 800; color: #64748b; display: flex; justify-content: space-between; }
.cn .foot span:first-child { color: var(--soft); }
.cn.cover { background: radial-gradient(90% 70% at 0% 100%, rgba(226,184,110,.28), transparent 60%), linear-gradient(160deg, #0f172a, #030712 70%); }
.cn.cover h4 { font-size: 9.4cqw; margin-top: auto; }
.cn.cta { background: linear-gradient(160deg, #1a1408, #030712 75%); border-color: rgba(226,184,110,.45); }
.cn .btn { margin-top: auto; align-self: flex-start; font-size: 4.2cqw; font-weight: 900; color: var(--bg); background: linear-gradient(90deg, var(--gold), var(--gold-2)); padding: 3cqw 5cqw; border-radius: 3cqw; }
.cards-hint { font-size: 14px; color: var(--muted); }

/* Thumbnail hero: AI illustration + Korean headline in HTML (thick outline, YouTube-thumbnail look) */
.hero-thumb { position: relative; margin: 26px 0 0; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: radial-gradient(70% 90% at 50% 60%, #3b1d5c, #0b1222 70%); container-type: inline-size; }
.hero-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-thumb .ht { position: absolute; left: 0; right: 0; top: 3cqw; margin: 0; text-align: center; font-family: 'Black Han Sans', 'Noto Sans KR', sans-serif; font-size: 9cqw; line-height: 1.12; letter-spacing: -.01em; color: #fff; text-shadow: 0.50cqw 0.00cqw 0 #000, 0.46cqw 0.19cqw 0 #000, 0.35cqw 0.35cqw 0 #000, 0.19cqw 0.46cqw 0 #000, 0.00cqw 0.50cqw 0 #000, -0.19cqw 0.46cqw 0 #000, -0.35cqw 0.35cqw 0 #000, -0.46cqw 0.19cqw 0 #000, -0.50cqw 0.00cqw 0 #000, -0.46cqw -0.19cqw 0 #000, -0.35cqw -0.35cqw 0 #000, -0.19cqw -0.46cqw 0 #000, -0.00cqw -0.50cqw 0 #000, 0.19cqw -0.46cqw 0 #000, 0.35cqw -0.35cqw 0 #000, 0.46cqw -0.19cqw 0 #000, 0.90cqw 0.00cqw 0 #000, 0.83cqw 0.34cqw 0 #000, 0.64cqw 0.64cqw 0 #000, 0.34cqw 0.83cqw 0 #000, 0.00cqw 0.90cqw 0 #000, -0.34cqw 0.83cqw 0 #000, -0.64cqw 0.64cqw 0 #000, -0.83cqw 0.34cqw 0 #000, -0.90cqw 0.00cqw 0 #000, -0.83cqw -0.34cqw 0 #000, -0.64cqw -0.64cqw 0 #000, -0.34cqw -0.83cqw 0 #000, -0.00cqw -0.90cqw 0 #000, 0.34cqw -0.83cqw 0 #000, 0.64cqw -0.64cqw 0 #000, 0.83cqw -0.34cqw 0 #000, 0 1.6cqw 0 #000, 0 2cqw 3cqw rgba(0, 0, 0, .6); }
.hero-thumb .ht span { display: block; }
.hero-thumb .ht em { font-style: normal; color: #ffd400; }

/* Card illustrations: full-bleed background on the cover, top band on content cards */
.cn .pg { z-index: 2; }
.cn .art { flex: none; position: relative; height: 36cqw; margin: -26px -24px 0; }
.cn .art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.cn .art::after { content: ''; position: absolute; inset: auto 0 0; height: 50%; background: linear-gradient(transparent, #08101f); }
.cn .art + .k { margin-top: 4cqw; }
.cn.cover .bg { position: absolute; top: 0; left: 0; width: 100%; height: 64%; object-fit: cover; object-position: center 20%; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.cn.cover:has(.bg) { background: #050a17; }
.cn.cover:has(.bg) .k { text-shadow: 0 0 2cqw #000, 0 0 1cqw #000; }
.cn.cover > :not(.bg):not(.pg) { position: relative; z-index: 1; }

/* Single-card export mode (?card=N) */
body.export { background: #030712; }
body.export > *:not(.export-stage) { display: none !important; }
.export-stage { display: none; }
body.export .export-stage { display: block; width: 1080px; height: 1350px; }
body.export .export-stage .cn { width: 1080px; height: 1350px; border-radius: 0; border: none; padding: 88px 80px; }
body.export .export-stage .cn .pg { top: 80px; right: 80px; }
body.export .export-stage .cn .art { margin: -88px -80px 0; }
body.export .export-stage.thumb { width: 1280px; height: 720px; }
body.export .export-stage .hero-thumb { width: 1280px; height: 720px; margin: 0; border-radius: 0; }

.cta-box { margin: 56px 0 0; padding: 30px; border-radius: 22px; background: linear-gradient(135deg, rgba(226,184,110,.14), rgba(15,23,42,.9)); border: 1px solid rgba(226,184,110,.4); text-align: center; }
.cta-box h3 { margin: 0 0 8px; font-size: 20px; font-weight: 900; }
.cta-box p { color: var(--soft); font-size: 16px; margin: 0 0 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn-gold, .btn-line { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 190px; font-size: 15px; font-weight: 800; text-decoration: none; padding: 13px 20px; border-radius: 12px; }
.btn-gold { color: var(--bg); background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.btn-line { color: var(--soft); background: #0b1222; border: 1px solid #334155; }

.sources { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.sources ol { padding-left: 18px; }
.sources li { font-size: 14px; color: var(--muted); }
.sources a { color: var(--soft); }

/* List page: featured latest post, category chips, paging, mid-list CTA */
.featured { display: grid; grid-template-columns: 1.35fr 1fr; margin-bottom: 36px; border-radius: 22px; overflow: hidden; background: var(--card); border: 1px solid rgba(226,184,110,.35); text-decoration: none; color: var(--text); transition: border-color .2s; }
.featured:hover { border-color: var(--gold); }
.featured .f-thumb { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.f-body { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 32px; }
.f-new { align-self: flex-start; font-size: 13px; font-weight: 900; letter-spacing: .08em; color: var(--bg); background: var(--gold); padding: 4px 10px; border-radius: 6px; }
.f-body .meta { font-size: 14px; color: var(--muted); display: flex; gap: 10px; }
.f-body .cat { color: var(--gold); font-weight: 800; }
.f-body h2 { margin: 0; font-size: 26px; line-height: 1.35; font-weight: 900; letter-spacing: -.02em; }
.f-body p { margin: 0; font-size: 16px; color: var(--soft); }
.f-body .more { font-size: 15px; font-weight: 800; color: var(--gold); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { font: inherit; font-size: 14px; font-weight: 700; color: var(--soft); background: #0b1222; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.chip span { color: var(--muted); font-weight: 600; margin-left: 2px; }
.chip.on { color: var(--bg); background: var(--gold); border-color: var(--gold); }
.chip.on span { color: var(--bg); }
.post-card[hidden], .featured[hidden], .list-cta[hidden] { display: none; }
.list-cta { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 24px 28px; border-radius: 18px; border: 1px dashed rgba(226,184,110,.5); background: rgba(226,184,110,.06); }
.list-cta b { display: block; font-size: 17px; margin-bottom: 4px; }
.list-cta span { font-size: 15px; color: var(--muted); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; }
.load-more { display: block; margin: 32px auto 0; font: inherit; font-size: 15px; font-weight: 800; color: var(--gold); background: transparent; border: 1px solid rgba(226,184,110,.4); border-radius: 12px; padding: 12px 36px; cursor: pointer; }
.load-more[hidden] { display: none; }
.related { margin-top: 48px; }
.related > b { display: block; font-size: 18px; margin-bottom: 16px; }
.related .post-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.related .post-card p { display: none; }
.related .post-card h2 { font-size: 16px; }

.footer { border-top: 1px solid var(--line); padding: 28px 24px 40px; text-align: center; font-size: 15px; color: #94a3b8; }
.footer a { color: var(--muted); text-decoration: none; }

@media (max-width: 640px) {
  .topbar .in { padding: 12px 16px; }
  .topnav a:not(.gold):not(.home) { display: none; }
  /* Phones: compact row cards (thumb left, title right) so the list stays short */
  .post-grid { gap: 10px; }
  .post-card { display: grid; grid-template-columns: 128px 1fr; grid-template-rows: auto 1fr; gap: 6px 14px; padding: 12px; border-radius: 14px; }
  .post-card .thumb { grid-row: 1 / 3; width: 100%; margin: 0; border-radius: 9px; align-self: center; }
  .post-card .meta { font-size: 13px; gap: 8px; }
  .post-card h2 { font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
  .post-card p, .post-card .more { display: none; }
  .featured .f-body p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .wrap, .article { padding-left: 16px; padding-right: 16px; }
  .article { padding-top: 40px; }
  .article p, .article li { font-size: 15.5px; }
  .stats { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; }
  .f-body { padding: 22px; }
  .f-body h2 { font-size: 21px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .chip { flex: none; }
  .cn { width: 82vw; }
  table.cmp { min-width: 520px; }
}

/* Review PDF: keep the dark design and show every card */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .topbar { position: static; }
  .cards { flex-wrap: wrap; overflow: visible; }
  .cn { width: 300px; break-inside: avoid; }
  .cards-hint { display: none; }
  .hero-thumb, .video, .callout, .stat, .checklist li { break-inside: avoid; }
}

/* Korean line breaks: wrap at word boundaries, balance headings */
html{word-break:keep-all;overflow-wrap:break-word}
h1,h2,h3,h4,h5{text-wrap:balance}
p,li,td,th,figcaption,blockquote{text-wrap:pretty;line-height:1.8}
