/* ============ 에스엠경제연구소 공통 스타일 ============ */
:root {
  --navy: #13246A;
  --navy-deep: #081238;
  --navy-deeper: #060D2A;
  --gold: #F2C46D;
  --gold-text: #8A5F1A;
  --ink: #14171C;
  --text: #3F454E;
  --muted: #4A5059;
  --paper: #F6F4EF;
  --paper-2: #EFECE4;
  --line: #DDD8CE;
  --line-soft: #ECE8DF;
  --white: #FFFFFF;
  --up: #C62828;
  --down: #1F5FBF;
  --on-dark: #D3DAEE;
  --on-dark-muted: #AEB8D6;
  --radius: 16px;
  --wrap: 1280px;
  --gutter: 80px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Noto Sans KR', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); }
a:hover { color: #0A1540; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- 데모 배너 ---------- */
.demo-banner {
  background: var(--gold); color: var(--navy-deep); text-align: center;
  font-size: 15px; font-weight: 700; padding: 8px 16px;
}

/* ---------- 헤더 ---------- */
.site-header { position: relative; z-index: 5; border-bottom: 1px solid rgba(255,255,255,0.12); }
.site-header.light { background: var(--navy-deep); }
.header-inner { height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--white); }
.brand:hover { color: var(--white); }
.brand img { width: 60px; height: 60px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name strong { font-weight: 900; font-size: 24px; letter-spacing: -0.5px; }
.brand-name small { font-size: 12px; color: var(--on-dark-muted); letter-spacing: 2px; }
.nav { display: flex; align-items: center; gap: 34px; font-size: 18px; font-weight: 500; }
.nav a { color: var(--white); text-decoration: none; }
.nav a:hover { color: var(--gold); }
.nav .btn-gold { color: var(--navy-deep); }
.nav .btn-gold:hover { color: var(--navy-deep); }
.menu-toggle {
  display: none; width: 48px; height: 48px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.3);
  background: transparent; color: var(--white); cursor: pointer; align-items: center; justify-content: center;
}

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 12px; font-weight: 700; font-size: 18px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #F6D086; color: var(--navy-deep); }
.btn-outline-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn-outline-light:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: #0E1B52; color: var(--white); }
.btn-lg { min-height: 64px; padding: 0 32px; font-size: 19px; }

/* ---------- 히어로 ---------- */
.hero { position: relative; background: var(--navy-deep); color: var(--white); overflow: hidden; }
.hero-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-chart svg { position: absolute; right: 0; bottom: 0; width: 100%; height: 78%; }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #081238 0%, #081238 36%, rgba(8,18,56,0.55) 62%, rgba(8,18,56,0.15) 100%);
}
.hero-glow {
  position: absolute; right: 4%; top: 150px; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(94,124,230,0.45) 0%, rgba(94,124,230,0) 70%);
}
.hero-inner { position: relative; }
.hero-main { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 80px 0 64px; }
.hero-copy { max-width: 760px; display: flex; flex-direction: column; gap: 28px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 17px; font-weight: 700; letter-spacing: 1px; color: var(--gold-text); }
.eyebrow::before { content: ""; width: 36px; height: 3px; background: currentColor; }
.hero .eyebrow { color: var(--gold); font-size: 18px; }
.hero h1 { margin: 0; font-weight: 900; font-size: clamp(40px, 5.3vw, 76px); line-height: 1.2; letter-spacing: -2.5px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { margin: 0; font-size: 22px; line-height: 1.7; color: var(--on-dark); max-width: 660px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.hero-logo { width: 380px; height: 380px; flex-shrink: 0; filter: drop-shadow(0 20px 50px rgba(0,0,0,0.45)); }
.ticker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-bottom: 56px; }
.ticker-item {
  background: rgba(8,18,56,0.82); border: 1px solid rgba(255,255,255,0.16); border-radius: 14px;
  padding: 22px 24px; display: flex; flex-direction: column; gap: 4px;
}
.ticker-item > span { font-size: 16px; color: var(--on-dark-muted); }
.ticker-item strong { font-size: 26px; font-weight: 700; }
.ticker-item .chg { font-size: 19px; margin-left: 6px; }
.ticker-item .chg.up { color: #FF7A7E; }
.ticker-item .chg.down { color: #7FA8FF; }
.brief-comment { padding: 0 0 56px; margin-top: -32px; color: var(--on-dark); font-size: 17px; }
.brief-comment b { color: var(--gold); margin-right: 8px; }

/* ---------- 섹션 공통 ---------- */
.section { padding: 112px 0; }
.section.white { background: var(--white); }
.section.sand { background: var(--paper-2); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head > div { display: flex; flex-direction: column; gap: 14px; }
.section-head > .tabs { flex-direction: row; gap: 10px; }
.section h2 { margin: 0; font-weight: 900; font-size: clamp(34px, 3.6vw, 52px); letter-spacing: -1.5px; line-height: 1.3; }
.note { margin: 24px 0 0; font-size: 16px; line-height: 1.7; color: var(--muted); }
.more-link { font-weight: 700; font-size: 18px; text-decoration: none; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); font-size: 18px; }

/* ---------- 소개 ---------- */
.about-top { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; margin-bottom: 60px; }
.about-top p { margin: 0; font-size: 20px; line-height: 1.8; color: var(--text); white-space: pre-line; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.pillar { background: var(--paper); border-radius: 18px; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.pillar .num { font-size: 36px; font-weight: 900; color: var(--navy); }
.pillar h3 { margin: 0; font-size: 27px; font-weight: 700; }
.pillar p { margin: 0; font-size: 19px; line-height: 1.75; color: var(--text); }
.ceo {
  margin-top: 60px; display: flex; align-items: center; gap: 32px; background: var(--navy); color: var(--white);
  border-radius: 18px; padding: 32px 40px;
}
.ceo-photo {
  width: 100px; height: 100px; border-radius: 50%; background: rgba(255,255,255,0.14); flex-shrink: 0;
  object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--on-dark); font-size: 15px;
}
.ceo-text { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; }
.ceo-text strong { font-size: 25px; }
.ceo-text span { font-size: 18px; line-height: 1.7; color: var(--on-dark); white-space: pre-line; }
.badge-license { font-size: 16px; border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; padding: 10px 18px; flex-shrink: 0; }

/* ---------- 추천주 표 ---------- */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tab {
  min-height: 50px; padding: 0 22px; border-radius: 999px; font-size: 17px; font-weight: 700; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid #C9C3B6;
}
.tab[aria-pressed="true"] { background: var(--navy); color: var(--white); border-color: var(--navy); }
.table-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.picks-row { display: grid; grid-template-columns: 1.1fr 2fr 1fr 1fr 1fr 1.1fr; gap: 12px; padding: 26px 32px; align-items: center; border-top: 1px solid var(--line-soft); font-size: 19px; }
.picks-row.head { background: var(--paper-2); font-size: 17px; font-weight: 700; color: var(--text); padding: 20px 32px; border-top: none; }
.picks-row .date { color: var(--muted); }
.picks-row .name strong { display: block; font-size: 21px; }
.picks-row .name small { font-size: 16px; color: var(--muted); }
.up { color: var(--up); font-weight: 700; }
.down { color: var(--down); font-weight: 700; }
.status { justify-self: start; font-size: 16px; font-weight: 700; padding: 7px 14px; border-radius: 999px; background: var(--paper-2); color: var(--text); white-space: nowrap; }
.status.hit { background: #FBE9E9; color: #A61B1B; }
.status.stop { background: #E7EEFA; color: #1A4FA0; }
.cell-label { display: none; }

/* ---------- 성과 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stat { background: var(--white); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.stat span { font-size: 18px; color: var(--muted); }
.stat strong { font-size: 48px; font-weight: 900; line-height: 1.1; }
.stat strong small { font-size: 22px; font-weight: 700; }
.closed-card { margin-top: 20px; background: var(--white); border-radius: 16px; padding: 32px 36px; }
.closed-card h3 { margin: 0 0 16px; font-size: 21px; }
.closed-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 12px; padding: 12px 0; font-size: 18px; color: var(--text); border-top: 1px solid var(--line-soft); }
.closed-row:first-of-type { border-top: none; }
.closed-row strong { color: var(--ink); }

/* ---------- 게시글 카드 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.post-card { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--ink); }
.post-card:hover { color: var(--ink); }
.post-card:hover h3 { text-decoration: underline; }
.post-thumb {
  height: 220px; border-radius: 16px; background: var(--navy); display: flex; align-items: flex-end; padding: 28px;
  color: var(--white); font-size: 30px; font-weight: 900; overflow: hidden; position: relative;
}
.post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-thumb.c1 { background: #8A5F1A; }
.post-thumb.c2 { background: #2C3440; }
.post-cat { font-size: 16px; color: var(--gold-text); font-weight: 700; }
.post-card h3 { margin: 0; font-size: 25px; line-height: 1.45; font-weight: 700; }
.post-meta { font-size: 16px; color: var(--muted); }

/* ---------- 후기 ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review { border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 18px; background: var(--paper); }
.review .q { font-size: 52px; font-weight: 900; line-height: 0.6; color: var(--navy); }
.review p { margin: 0; font-size: 19px; line-height: 1.8; color: var(--text); white-space: pre-line; flex-grow: 1; }
.review span { font-size: 17px; font-weight: 700; }
.review-form-toggle { margin-top: 32px; }
.form-card { margin-top: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: grid; gap: 18px; max-width: 760px; }

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 16px; font-weight: 700; color: var(--text); }
.field input, .field textarea, .field select {
  min-height: 52px; border-radius: 10px; border: 1px solid #C9C3B6; padding: 12px 16px; font-size: 17px; background: var(--white); color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--text); line-height: 1.6; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; }
.form-msg { font-size: 16px; font-weight: 700; min-height: 1.2em; }
.form-msg.ok { color: #1F7A3A; }
.form-msg.err { color: var(--up); }

/* ---------- 구독 ---------- */
.subscribe-box { background: var(--navy-deep); color: var(--white); border-radius: 24px; padding: 60px 64px; display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.subscribe-box h2 { font-size: clamp(28px, 3vw, 42px); }
.subscribe-box p { margin: 12px 0 0; font-size: 20px; color: var(--on-dark); }
.subscribe-form { display: flex; flex-direction: column; gap: 12px; min-width: 460px; }
.subscribe-row { display: flex; gap: 12px; }
.subscribe-row input { flex-grow: 1; height: 60px; border-radius: 12px; border: none; padding: 0 18px; font-size: 18px; }
.subscribe-form .check { color: var(--on-dark); }
.subscribe-form .check a { color: var(--gold); }
.subscribe-form .form-msg.ok { color: var(--gold); }
.subscribe-form .form-msg.err { color: #FF9A9D; }

/* ---------- 푸터 ---------- */
.site-footer { background: var(--ink); color: #AEB4BC; padding: 60px 0; font-size: 16px; line-height: 1.8; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-brand { display: flex; gap: 20px; align-items: flex-start; }
.footer-brand img { width: 80px; height: 80px; flex-shrink: 0; }
.footer-brand strong { display: block; color: var(--white); font-size: 22px; font-weight: 900; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: #D3D7DC; text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; }
.footer-legal { border-top: 1px solid #2C3038; margin-top: 28px; padding-top: 24px; font-size: 15px; }

/* ---------- 게시글 상세/목록 페이지 ---------- */
.page-hero { background: var(--navy-deep); color: var(--white); padding: 72px 0; }
.page-hero h1 { margin: 12px 0 0; font-size: clamp(32px, 4vw, 52px); font-weight: 900; letter-spacing: -1.5px; line-height: 1.3; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero .post-meta { color: var(--on-dark-muted); margin-top: 16px; }
.article { max-width: 820px; margin: 0 auto; padding: 72px 24px 112px; font-size: 20px; line-height: 1.9; color: #262A31; }
.article h2 { font-size: 30px; margin: 48px 0 16px; line-height: 1.4; }
.article h3 { font-size: 24px; margin: 36px 0 12px; }
.article p { margin: 0 0 22px; }
.article img { border-radius: 14px; margin: 24px 0; }
.article .summary { font-size: 21px; font-weight: 500; color: var(--text); border-left: 0; background: var(--paper-2); padding: 24px 28px; border-radius: 14px; margin-bottom: 36px; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.legal-doc { max-width: 860px; margin: 0 auto; padding: 72px 24px 112px; font-size: 18px; line-height: 1.9; }
.legal-doc h2 { font-size: 24px; margin-top: 40px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1180px) {
  :root { --gutter: 40px; }
  .nav { gap: 22px; font-size: 16px; }
  .hero-logo { width: 280px; height: 280px; }
  .subscribe-box { flex-direction: column; align-items: stretch; }
  .subscribe-form { min-width: 0; }
}
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--navy-deep); padding: 8px 24px 24px; border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 18px; }
  .nav .btn-gold { margin-top: 16px; border-bottom: none; }
  .hero-main { flex-direction: column-reverse; align-items: flex-start; padding-top: 48px; }
  .hero-logo { width: 160px; height: 160px; }
  .hero-glow { display: none; }
  .hero-chart { opacity: 0.35; }
  .ticker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-top { grid-template-columns: 1fr; gap: 24px; }
  .pillars, .post-grid, .review-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ceo { flex-direction: column; align-items: flex-start; }
  .picks-row.head { display: none; }
  .picks-row { grid-template-columns: 1fr 1fr 1fr; padding: 22px 24px; row-gap: 14px; }
  .picks-row .name { grid-column: 1 / -1; order: -1; }
  .picks-row .date { grid-column: 1 / -1; order: -2; font-size: 16px; }
  .picks-row .status { grid-column: 1 / -1; order: -3; }
  .cell-label { display: block; font-size: 14px; color: var(--muted); font-weight: 500; }
  .closed-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .header-inner { height: 80px; }
  .brand img { width: 48px; height: 48px; }
  .brand-name strong { font-size: 20px; }
  .hero p { font-size: 19px; }
  .hero-actions .btn { width: 100%; }
  .ticker { gap: 10px; padding-bottom: 40px; }
  .ticker-item { padding: 16px; }
  .ticker-item strong { font-size: 21px; }
  .section { padding: 72px 0; }
  .stats { grid-template-columns: 1fr; }
  .stat strong { font-size: 40px; }
  .subscribe-box { padding: 40px 24px; }
  .subscribe-row { flex-direction: column; }
  .subscribe-row .btn { width: 100%; }
  .pillar, .review, .form-card { padding: 26px; }
}
