:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text: #1c1f23;
  --muted: #5d646d;
  --line: #e4e2da;
  --accent: #b4491f;
  --accent-ink: #ffffff;
  --accent-soft: #fbeee7;
  --link: #0b5cab;
  --radius: 10px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1c1f25;
    --text: #e8e9ec;
    --muted: #9aa1ab;
    --line: #2d313a;
    --accent: #e9805a;
    --accent-ink: #1a0f0a;
    --accent-soft: #2b1d17;
    --link: #7db7f0;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* 헤더 */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { text-decoration: none; color: var(--text); display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-en { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; display: none; }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-size: 15px; }
.nav a:hover { background: var(--accent-soft); }
.nav .nav-cta { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.nav .nav-cta:hover { background: var(--accent); opacity: 0.9; }

/* 홈 히어로 */
.hero { padding: 40px 0 16px; }
.hero h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.3; margin: 0 0 12px; letter-spacing: -0.02em; }
.hero p { color: var(--muted); margin: 0 0 10px; max-width: 46em; }
.section-title { font-size: 20px; margin: 28px 0 14px; letter-spacing: -0.01em; }

.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.step { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.step:hover { border-color: var(--accent); }
.step span { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* 레이아웃 */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 48px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .brand-en { display: inline; }
}
.page-title { font-size: clamp(24px, 4vw, 32px); margin: 32px 0 12px; line-height: 1.3; letter-spacing: -0.02em; }
.intro { color: var(--muted); margin: 0 0 16px; }
.empty { color: var(--muted); padding: 24px 0; }
.more { margin: 16px 0 0; }

/* 글 목록 카드 */
.cards { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { margin: 6px 0 4px; font-size: 19px; line-height: 1.4; letter-spacing: -0.01em; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.card-meta { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.badge { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 1px 9px; border-radius: 999px; font-size: 13px; text-decoration: none; font-weight: 600; }

/* 글 */
.post-header { margin: 28px 0 16px; }
.post-header h1 { font-size: clamp(25px, 4.5vw, 34px); line-height: 1.35; margin: 10px 0 12px; letter-spacing: -0.02em; }
.post-meta { color: var(--muted); font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; margin: 0; }
.summary { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 16px 0 24px; }
.summary ul { margin: 6px 0 0; padding-left: 20px; }
.review-notes { background: #fff8d6; color: #3d3300; border: 1px dashed #c9a800; padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; font-size: 15px; }
.preview-banner { background: #1c1f23; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 14px; margin-top: 16px; }

.prose h2 { font-size: 24px; margin: 40px 0 12px; line-height: 1.4; letter-spacing: -0.015em; padding-top: 4px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--line); color: var(--muted); }
.prose code { background: var(--accent-soft); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 14px; border-radius: 8px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 90px; }
th { background: var(--accent-soft); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.sources { margin: 32px 0 8px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sources h2 { font-size: 17px; margin: 0 0 6px; }
.sources ol { margin: 0; padding-left: 22px; font-size: 15px; }
.disclaimer { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin: 16px 0 8px; }
.related h2 { font-size: 20px; margin: 32px 0 12px; }

/* 버튼 */
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 15px; }
.button:hover { opacity: 0.9; }
.button--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

/* 사이드바 */
.sidebar { display: grid; gap: 20px; align-content: start; padding-top: 28px; }
@media (min-width: 900px) { .sidebar { position: sticky; top: 76px; align-self: start; } }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.widget h3 { margin: 0 0 8px; font-size: 16px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list a { display: block; padding: 4px 0; text-decoration: none; color: var(--text); font-size: 15px; }
.cat-list a:hover { color: var(--accent); }

/* 광고 */
.ad { margin: 24px 0; text-align: center; position: relative; }
.ad-label { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.05em; margin-bottom: 4px; }
.ad--banner img { border-radius: 6px; max-width: 100%; }
.ad--placeholder { border: 2px dashed var(--line); color: var(--muted); padding: 28px 12px; border-radius: var(--radius); font-size: 14px; }
.sidebar .ad { margin: 0; }

/* 푸터 */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 40px; margin-top: 24px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 12px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-note { margin: 0 0 8px; line-height: 1.6; }
.footer-copy { margin: 0; }

.prose-page { max-width: 760px; padding-bottom: 48px; }

/* 경로 표시 */
.crumbs { margin: 20px 0 0; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span { color: var(--text); }

/* 로고 */
.brand { align-items: center; }
.brand-mark { display: block; flex: none; width: 36px; height: 36px; object-fit: contain; margin-right: 2px; }

/* 문의 입력창 */
.page--form { max-width: 680px; margin: 0 auto; padding-bottom: 56px; }
.page--form .page-title { text-align: center; margin-top: 40px; }
.page--form .prose { text-align: center; color: var(--muted); }
.mailform-box { margin: 24px 0 8px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 10px 32px rgba(12,42,91,.09); }
.mailform { display: grid; gap: 18px; }
.mailform label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; color: var(--text); margin: 0; }
.mailform input:not([type=checkbox]), .mailform select, .mailform textarea { width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 16px; font-weight: 400; color: var(--text); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.mailform textarea { height: auto; min-height: 160px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.mailform input:focus, .mailform select:focus, .mailform textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180,73,31,.16); }
.mf-row { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mf-row { grid-template-columns: 1fr 1fr; } }
.mf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mailform .mf-consent { display: flex; gap: 10px; align-items: center; font-weight: 500; color: var(--muted); padding: 13px 14px; background: var(--bg); border-radius: 10px; }
.mf-consent input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.mf-send { display: block; width: 100%; height: 52px; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-size: 17px; font-weight: 800; }
.mf-send:disabled { opacity: .6; cursor: default; }
.mf-status { margin: 0; padding: 14px 16px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.mf-ok { background: #e6f4ea; color: #14532d; }
.mf-err { background: #fdecea; color: #7f1d1d; }
@media (prefers-color-scheme: dark) { .mf-ok { background: #12301d; color: #b7e4c7; } .mf-err { background: #3a1613; color: #f5b5ad; } }
.mf-row--single { grid-template-columns: 1fr !important; }
input[type=hidden] { display: none !important; }

/* 데일리 브리핑 */
.bhead { background: #12325c; color: #fff; padding: 22px 24px; border-radius: var(--radius); margin: 8px 0 20px; }
.bhead h1 { margin: 0 0 4px; font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.02em; }
.bhead p { margin: 0; opacity: .85; font-size: 15px; }
.bcards { display: grid; gap: 16px; }
.bcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.bcard h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.4; letter-spacing: -0.01em; }
.bnum { display: inline-block; margin-right: 8px; color: var(--accent); font-weight: 800; }
.bsrc { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.bcard ul { margin: 0 0 12px; padding-left: 20px; }
.bcard li { margin: 4px 0; line-height: 1.65; }
.bimpact { margin: 0 0 8px; padding: 10px 12px; background: var(--accent-soft); border-radius: 8px; font-size: 15px; line-height: 1.6; }
.btags { margin: 0; font-size: 13px; color: var(--muted); }
.bnote { margin: 20px 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.bnav { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0; font-size: 15px; }
.brand-logo { display: block; height: 40px; width: auto; }
