/* 올레터 스타일: 올레버 4 화이트 테마 */
:root {
  --bg: #ffffff;
  --text: #111111;
  --sub: #666666;
  --sub2: #4a4a4a;
  --line: #e6e2da;
  --divider: #f1eee8;
  --box: #f5f3ef;
  --accent: #4a6274;
  --up: #c8372d;
  --down: #2f5fa8;
  --daily-bg: #e6ecf0; --daily: #3e5566;
  --weekly-bg: #f1eadf; --weekly: #7a6036;
  --monthly-bg: #e9e1d3; --monthly: #4e463b;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.6; font-variant-numeric: tabular-nums;
  word-break: keep-all; overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: #fff; padding: 8px 12px; z-index: 10; }
.up { color: var(--up); }
.down { color: var(--down); }
.meta { font-size: 13px; color: var(--sub); }
.empty { color: var(--sub); }

/* 머리말 */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 40px; height: 64px; }
.logo { font-size: 21px; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-by { font-size: 12px; font-weight: 500; color: var(--sub); letter-spacing: 0; }
.main-nav { display: flex; gap: 28px; font-size: 16px; font-weight: 500; color: var(--sub2); }
.main-nav a { min-height: 44px; display: flex; align-items: center; white-space: nowrap; }
.main-nav a[aria-current="page"] { color: var(--text); font-weight: 700; }

main { padding-top: 28px; padding-bottom: 64px; }

/* 속보 띠 */
.breaking { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; }
.breaking a { font-weight: 600; flex: 1; min-width: 0; }
.tag { display: inline-block; border-radius: 6px; padding: 2px 7px; font-size: 12px; font-weight: 700; flex: none; }
.tag-breaking { background: #fbe9e7; color: #a5281f; }

/* 요약 */
.summary-date { margin: 0; font-size: 15px; color: var(--sub); }
.summary-title { margin: 6px 0 18px; font-size: 28px; line-height: 1.35; font-weight: 800; letter-spacing: -0.02em; }
.indices { display: flex; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 0; overflow-x: auto; }
.index { padding: 4px 20px; border-left: 1px solid var(--line); flex: none; }
.index:first-child { border-left: 0; }
.index-name { display: block; font-size: 14px; color: var(--sub); }
.index-value { display: block; font-size: 19px; font-weight: 700; white-space: nowrap; }
.index-value span { font-size: 15px; }
.indices-note { margin: 8px 0 0; font-size: 13px; color: var(--sub); }

/* 카드 */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; }
.card-head h2, .card-title { margin: 0; font-size: 19px; font-weight: 800; }
.card-title { margin-bottom: 8px; }
.more { min-height: 44px; display: flex; align-items: center; font-size: 14px; color: var(--sub2); }
.sub-head { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--sub); }

.badge { display: inline-block; border-radius: 6px; padding: 3px 8px; font-size: 13px; font-weight: 700; flex: none; line-height: 1.4; }
.badge-daily { background: var(--daily-bg); color: var(--daily); }
.badge-weekly { background: var(--weekly-bg); color: var(--weekly); }
.badge-monthly { background: var(--monthly-bg); color: var(--monthly); }

.report-feature { display: block; background: var(--box); border-radius: 12px; padding: 18px; margin-top: 4px; }
.report-feature:hover { text-decoration: none; }
.report-feature:hover .feature-title { text-decoration: underline; }
.feature-top { display: flex; gap: 8px; align-items: center; }
.feature-title { display: block; margin-top: 8px; font-size: 18px; line-height: 1.45; font-weight: 700; }
.feature-summary { display: block; margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--sub2); }

.report-list, .news-list { list-style: none; margin: 0; padding: 0; }
.report-row a { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; }
.report-row + .report-row a { border-top: 1px solid var(--divider); }
.report-row a:hover { text-decoration: none; }
.report-row a:hover .report-row-title { text-decoration: underline; }
.report-row-text { display: block; min-width: 0; }
.report-row-title { display: block; font-size: 16px; line-height: 1.5; font-weight: 600; }
.report-row-summary { display: block; margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--sub2); }
.report-list-big .report-row-title { font-size: 18px; }

.news-item { padding: 11px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.news-item + .news-item { border-top: 1px solid var(--divider); }
.news-title { font-size: 15px; line-height: 1.5; font-weight: 500; flex: 1 1 70%; min-width: 0; }
.news-item .meta { flex-basis: 100%; }
.news-summary { flex-basis: 100%; font-size: 14px; line-height: 1.6; color: var(--sub2); }
.news-report { flex-basis: 100%; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: underline; min-height: 40px; display: flex; align-items: center; }
.news-list-big .news-title { font-size: 17px; font-weight: 600; }

/* 목록 페이지 */
.page-head h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.page-desc { margin: 6px 0 0; color: var(--sub); }
.tabs { display: flex; gap: 8px; margin: 20px 0 24px; overflow-x: auto; }
.tabs a { min-height: 40px; display: flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--sub2); white-space: nowrap; }
.tabs a:hover { text-decoration: none; border-color: var(--accent); }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.two-col { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.month + .month { margin-top: 24px; }
.month-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--sub); }
.side { position: sticky; top: 88px; }

/* 레포트 상세 */
.report { max-width: 760px; margin: 0 auto; }
.crumbs { margin: 0 0 16px; font-size: 14px; color: var(--sub); }
.crumbs a { text-decoration: underline; }
.report-top { display: flex; gap: 10px; align-items: center; }
.report-title { margin: 10px 0 0; font-size: 32px; line-height: 1.35; font-weight: 800; letter-spacing: -0.02em; }
.sample-note { margin: 16px 0 0; padding: 10px 14px; border-radius: 10px; background: #fbf3e4; color: #6b4e16; font-size: 14px; }
.report-summary { margin: 20px 0 0; padding: 18px 20px; background: var(--box); border-radius: 12px; font-size: 17px; line-height: 1.7; font-weight: 500; }
.prose { margin-top: 12px; font-size: 17px; line-height: 1.8; }
.prose h2 { margin: 40px 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.prose h3 { margin: 28px 0 8px; font-size: 19px; font-weight: 700; }
.prose h4 { margin: 20px 0 6px; font-size: 17px; font-weight: 700; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 16px 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--sub2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose code { background: var(--box); padding: 1px 6px; border-radius: 4px; font-size: 0.92em; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--divider); white-space: nowrap; }
th { background: var(--box); font-weight: 700; color: var(--sub2); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
.share { margin-top: 40px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.share p { margin: 0; font-weight: 600; }
.share-buttons { display: flex; gap: 8px; }
.btn { min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.related { margin-top: 16px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.pager-link { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-weight: 600; line-height: 1.5; }
.pager-link .meta { display: block; font-weight: 400; }
.pager-next { text-align: right; }

/* 바닥글 */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 13px; color: var(--sub); line-height: 1.7; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { text-decoration: underline; }

/* 화면이 좁을 때 */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  /* 휴대폰: 머리말을 화면에 고정하지 않아 읽는 공간을 넓힙니다 */
  .site-header { position: static; }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 0; height: auto; padding-top: 10px; }
  .logo { font-size: 20px; }
  .main-nav { gap: 4px; width: 100%; overflow-x: auto; font-size: 15px; scrollbar-width: none; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { padding: 0 10px; }
  .main-nav a:first-child { padding-left: 0; }
  main { padding-top: 20px; }
  /* 홈 카드가 너무 길어지지 않게: 관련 기사 2건, 뉴스 카드 5건만 */
  .cards .card .sub-head + .news-list .news-item:nth-child(n+3) { display: none; }
  .cards .card:last-child .news-list .news-item:nth-child(n+6) { display: none; }
  .summary-title { margin-bottom: 14px; }
  .crumbs a { display: inline-block; padding: 6px 0; }
  .news-title { padding: 2px 0; }
  .share { padding: 16px; }
  .share-buttons { width: 100%; }
  .share-buttons .btn { flex: 1; }
  /* 휴대폰 표: 칸 여백과 글자를 줄여 4칸 표가 가로로 넘치지 않게 */
  table { font-size: 14px; }
  th, td { padding: 9px 10px; }
  .index-value { font-size: 16px; white-space: normal; }
  .index-value span { display: block; font-size: 14px; }
  .summary-title { font-size: 23px; }
  .indices { display: grid; grid-template-columns: repeat(3, 1fr); row-gap: 12px; padding: 14px 0; }
  .index { padding: 2px 14px; border-left: 0; }
  .index-value { font-size: 17px; }
  .card { padding: 18px; }
  .page-head h1 { font-size: 25px; }
  .report-title { font-size: 25px; }
  .prose { font-size: 16px; }
  .pager { grid-template-columns: 1fr; }
  .pager-next { text-align: left; }
  .breaking { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media (max-width: 400px) {
  .indices { grid-template-columns: repeat(2, 1fr); }
  .breaking .meta { flex-basis: 100%; }
}
