/* detail-body-fix — 실적·배당·13F·수출입 전용 본문 보정 (앱 전용 본문과 구성 통일) */

/* ============================================================
   실적발표
   ============================================================ */
.cv2-earnings-block-header--split { align-items: center; justify-content: space-between; }

/* 잠정·안내 배너: 본문 블록(.cv2-earnings-block)과 같은 흰 카드 여백(20px). 배너 좌우가 블록 콘텐츠 시작선과 일치 */
.cv2-event-page--earnings .cv2-earnings-notice-wrap {
  padding: 16px 20px;
  margin-bottom: 8px;
  background: var(--cv2-surface-1);
}
.cv2-event-page--earnings .cv2-earnings-notice-card {
  padding: 12px 14px;
  border-radius: var(--cv2-radius-md);
}

/* 'AI 분석' 뱃지 */
.cv2-ebadge-ai {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 4px;
  font-size: 11px; font-weight: 600; line-height: 1.4;
  color: var(--cv2-accent); background: var(--cv2-surface-accent);
}
.cv2-ebadge-ai--text { font-size: 12px; font-weight: 700; }

/* KPI 하단: 서프라이즈·전년비 행 */
.cv2-ekpi-estline { margin-top: 2px; font-size: 11px; font-weight: 500; color: var(--cv2-text-3); }
.cv2-ekpi-bottom { display: grid; margin-top: 12px; }
.cv2-ekpi-bottom-cell { padding: 0 6px; text-align: center; position: relative; }
.cv2-ekpi-bottom-cell + .cv2-ekpi-bottom-cell::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--cv2-surface-3);
}
.cv2-ekpi-surprise-slot { min-height: 26px; margin-bottom: 6px; display: flex; align-items: center; justify-content: center; }
.cv2-ekpi-surprise {
  display: inline-block; padding: 3px 8px; border-radius: 4px;
  font-size: 13px; font-weight: 800; line-height: 1.3; word-break: keep-all;
}
.cv2-ekpi-surprise.up   { color: var(--cv2-up);   background: color-mix(in srgb, var(--cv2-up) 12%, transparent); }
.cv2-ekpi-surprise.down { color: var(--cv2-down); background: color-mix(in srgb, var(--cv2-down) 12%, transparent); }
.cv2-ekpi-surprise.flat { color: var(--cv2-text-3); background: var(--cv2-subtle-bg); font-size: 11px; }
.cv2-ekpi-yoy { min-height: 16px; font-size: 11px; font-weight: 500; color: var(--cv2-text-3); word-break: keep-all; }
.cv2-ekpi-yoy strong { font-weight: 700; }
.cv2-ekpi-yoy strong.up   { color: var(--cv2-up); }
.cv2-ekpi-yoy strong.down { color: var(--cv2-down); }

.cv2-earnings-footnote--plain { border-top: 0; padding-top: 0; }
.cv2-earnings-footnote--notice { text-align: right; line-height: 1.5; }
.cv2-earnings-src-link { color: var(--cv2-down); text-decoration: underline; }

/* 실적 추이(막대) */
.cv2-etrend-seg {
  display: inline-flex; padding: 2px; border-radius: 7px; background: var(--cv2-subtle-bg);
}
.cv2-etrend-seg-btn {
  min-height: 26px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--cv2-text-3); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cv2-etrend-seg-btn.is-active { background: var(--cv2-surface-1); color: var(--cv2-accent); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.cv2-etrend-panel[hidden] { display: none; }
.cv2-etrend-plot { position: relative; height: 150px; margin: 26px 8px 0; display: flex; }
.cv2-etrend-plot.has-neg { margin-bottom: 18px; }
.cv2-etrend-zero { position: absolute; left: 0; right: 0; height: 1px; background: var(--cv2-border-2); }
.cv2-etrend-col { position: relative; flex: 1; min-width: 0; }
.cv2-etrend-bar {
  position: absolute; left: 50%; width: 45%; transform: translateX(-50%);
  min-height: 2px; background: var(--cv2-etrend-c); border-radius: 4px 4px 0 0;
}
.cv2-etrend-bar.is-past { opacity: .35; }
.cv2-etrend-bar.is-placeholder { opacity: .12; }
.cv2-etrend-bar.is-projected { opacity: .3; outline: 1px dashed var(--cv2-etrend-c); outline-offset: -1px; }
.cv2-etrend-val {
  position: absolute; left: 50%; transform: translateX(-50%);
  max-width: 100%; font-size: 11px; line-height: 14px; white-space: nowrap; letter-spacing: -.3px;
  color: var(--cv2-text-2);
}
.cv2-etrend-val.is-latest { font-weight: 700; color: var(--cv2-text-1); }
.cv2-etrend-val.is-projected, .cv2-etrend-val.is-placeholder { color: var(--cv2-text-3); }
.cv2-etrend-axis { display: flex; margin: 6px 8px 0; }
.cv2-etrend-axis span { flex: 1; min-width: 0; text-align: center; font-size: 10.5px; color: var(--cv2-text-3); white-space: nowrap; }

/* reasons */
.cv2-ereason-list { display: flex; flex-direction: column; gap: 18px; margin-top: 4px; }
.cv2-ereason-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--cv2-text-1); }
.cv2-ereason-body { margin-top: 6px; font-size: 13.5px; font-weight: 500; line-height: 1.6; color: var(--cv2-text-3); word-break: keep-all; }

/* 경량 마크업 강조(굵게·증가·감소·밑줄·기울임) */
.cv2-hl-b { font-weight: 700; color: var(--cv2-text-1); }
.cv2-hl-up   { color: var(--cv2-up); }
.cv2-hl-down { color: var(--cv2-down); }
.cv2-hl-u { text-decoration: underline; }
.cv2-hl-i { font-style: italic; }

/* outlook 카드 */
.cv2-eoutlook-card { padding: 16px; border-radius: 14px; background: var(--cv2-surface-1); border: 1px solid var(--cv2-border-2); }
.cv2-eoutlook-title { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--cv2-text-1); }
.cv2-eoutlook-body { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--cv2-text-2); word-break: keep-all; }

/* 형광펜 헤드라인(가이던스·시장의 목소리) */
.cv2-ehl-title { margin: 0 0 28px; text-align: center; font-size: 20px; font-weight: 800; line-height: 1.5; letter-spacing: -.3px; color: var(--cv2-text-1); word-break: keep-all; }
.cv2-ehl-mark {
  background-image: linear-gradient(transparent 62%, rgba(67,56,202,.16) 62%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
[data-color-mode="dark"] .cv2-ehl-mark, .dark .cv2-ehl-mark { background-image: linear-gradient(transparent 62%, rgba(129,140,248,.24) 62%); }

/* 가이던스 번호 흐름 */
.cv2-eguide-steps { list-style: none; margin: 0; padding: 0; }
.cv2-eguide-step { position: relative; padding-left: 34px; min-height: 22px; padding-bottom: 16px; }
.cv2-eguide-step:last-child { padding-bottom: 0; }
.cv2-eguide-step:not(:last-child)::before {
  content: ''; position: absolute; left: 10.5px; top: 24px; bottom: 0; width: 1px; background: var(--cv2-border-2);
}
.cv2-eguide-num {
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--cv2-text-3);
  background: var(--cv2-surface-1); border: 1px solid var(--cv2-border-2);
}
.cv2-eguide-step.is-muted .cv2-eguide-num { background: var(--cv2-subtle-bg); border: 0; }
.cv2-eguide-label { margin-bottom: 4px; font-size: 14px; font-weight: 700; color: var(--cv2-text-1); }
.cv2-eguide-step.is-muted .cv2-eguide-label { color: var(--cv2-text-3); }
.cv2-eguide-body { font-size: 14px; line-height: 1.65; color: var(--cv2-text-3); word-break: keep-all; }

/* 시장의 목소리 */
.cv2-evoice-list { margin: 0; padding: 0; list-style: none; }
.cv2-evoice-list li { position: relative; padding-left: 14px; margin-bottom: 8px; font-size: 13.5px; font-weight: 500; line-height: 1.6; color: var(--cv2-text-3); word-break: keep-all; }
.cv2-evoice-list li::before { content: '\2022'; position: absolute; left: 0; color: var(--cv2-text-3); }
.cv2-evoice-list li:last-child { margin-bottom: 0; }
.cv2-evoice-list strong { font-weight: 600; color: var(--cv2-text-1); }
.cv2-evoice-comments { display: flex; flex-direction: column; gap: 12px; }
.cv2-evoice-row { display: flex; align-items: flex-start; gap: 10px; }
.cv2-evoice-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: var(--cv2-surface-3); }
.cv2-evoice-bubble {
  padding: 9px 12px; background: var(--cv2-surface-2); color: var(--cv2-text-1);
  border-radius: 4px 14px 14px 14px; font-size: 14px; line-height: 1.5; word-break: keep-all;
}
.cv2-evoice-notice { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--cv2-text-3); }

/* 관련 뉴스 */
.cv2-enews-summary { margin-bottom: 8px; padding: 14px 16px; border-radius: 12px; background: var(--cv2-surface-2); font-size: 14px; line-height: 1.55; color: var(--cv2-text-1); word-break: keep-all; }
.cv2-enews-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: .5px solid var(--cv2-surface-3); text-decoration: none; color: inherit; }
.cv2-enews-row:last-child { border-bottom: 0; }
.cv2-enews-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cv2-enews-title { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--cv2-text-1); word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cv2-enews-meta { font-size: 11px; font-weight: 500; color: var(--cv2-text-3); }
.cv2-enews-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--cv2-surface-3); }

/* ============================================================
   배당
   ============================================================ */
.cv2-dividend-dday {
  flex-shrink: 0; padding: 3px 10px; border-radius: 4px;
  font-size: 12px; font-weight: 600; line-height: 1.3;
  color: var(--cv2-text-3); background: var(--cv2-subtle-bg);
}
.cv2-dividend-dday.is-today { color: var(--cv2-accent); background: var(--cv2-surface-accent); }
a.cv2-dividend-calc-banner { text-decoration: none; color: #fff; }
.cv2-dividend-calc-banner-wrap { margin-top: 12px; }

/* ============================================================
   13F
   ============================================================ */
/* 초보자 해설 배너: 인트로 밖 독립 블록 */
.cv2-13f-beginner-wrap { padding-top: 12px; padding-bottom: 12px; }
.cv2-13f-beginner-wrap .cv2-13f-beginner-banner { margin: 0; }

/* 분기 수익률 */
.cv2-13f-ret-up   { color: var(--cv2-up); }
.cv2-13f-ret-down { color: var(--cv2-down); }
.cv2-13f-ret-flat { color: var(--cv2-text-2); }
.cv2-13f-return-solo { margin-top: 10px; }
.cv2-13f-return-card {
  margin-top: 10px; padding: 14px 16px; border-radius: 12px;
  background: var(--cv2-surface-accent); border: 1px solid rgba(67,56,202,.1);
}
.cv2-13f-return-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cv2-13f-return-title { font-size: 12px; font-weight: 700; letter-spacing: .2px; color: var(--cv2-text-1); }
.cv2-13f-return-note { font-size: 10px; color: var(--cv2-text-3); white-space: nowrap; }
.cv2-13f-return-vs { display: flex; align-items: center; margin-top: 14px; }
.cv2-13f-return-side { flex: 1; min-width: 0; text-align: center; }
.cv2-13f-return-name { font-size: 12px; font-weight: 600; color: var(--cv2-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv2-13f-return-val { margin-top: 4px; font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.cv2-13f-return-mid { width: 56px; display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.cv2-13f-return-line { width: 1px; height: 14px; background: rgba(67,56,202,.2); }
.cv2-13f-return-vs-badge {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--cv2-accent);
  background: var(--cv2-surface-1); border: 1px solid rgba(67,56,202,.3);
}
.cv2-13f-return-verdict {
  margin-top: 14px; padding: 8px 12px; border-radius: 8px; text-align: center;
  font-size: 13px; font-weight: 500; color: var(--cv2-text-1);
  background: var(--cv2-surface-1); border: 1px solid rgba(67,56,202,.08);
}
.cv2-13f-return-verdict strong { font-weight: 800; }

/* 전체(all) 인기 종목 표 */
.cv2-13f-sym-head {
  display: grid; grid-template-columns: 3fr 1fr 1fr 1fr; gap: 8px;
  padding: 4px 0 8px; border-bottom: 1px solid var(--cv2-border);
  font-size: 11px; color: var(--cv2-text-muted); text-align: right;
}
.cv2-13f-sym-head .cv2-13f-sym-head-main { text-align: left; }
.cv2-13f-sym-list--table .cv2-13f-sym-row { display: grid; grid-template-columns: 3fr 1fr 1fr 1fr; gap: 8px; }
.cv2-13f-sym-list--table .cv2-13f-holding-info { min-width: 0; }
.cv2-13f-sym-list--table .cv2-13f-holding-sector { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv2-13f-sym-cell { font-size: 12px; text-align: right; color: var(--cv2-text-2); white-space: nowrap; }
.cv2-13f-sym-cell--accent { font-weight: 700; color: var(--cv2-accent); }

/* 옵션 포지션 / 섹터 보조 */
.cv2-13f-opt-note { margin: -6px 0 6px; font-size: 11px; color: var(--cv2-text-muted); }
.cv2-13f-sector-change--flat { color: var(--cv2-text-muted); }
.cv2-13f-sector-row--filer .cv2-13f-sector-bar-wrap { height: 10px; }
.cv2-13f-sector-row--filer .cv2-13f-sector-pct { width: auto; min-width: 44px; }
.cv2-13f-sector-row--filer .cv2-13f-sector-change { width: auto; min-width: 48px; }

/* ============================================================
   수출입동향
   ============================================================ */
.cv2-trade-kr-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 20px; }
.cv2-trade-kr-section-head .cv2-trade-kr-section-title { margin-bottom: 0; }
.cv2-trade-kr-unit { font-size: 11px; color: var(--cv2-text-3); white-space: nowrap; }

/* 수입 동향: 행 + 전년 대비 중첩 막대 */
.cv2-tk-imp--up   { --tk: var(--cv2-up); }
.cv2-tk-imp--down { --tk: var(--cv2-down); }
.cv2-tk-imp--neu  { --tk: var(--cv2-text-3); }
.cv2-tk-imp-bars { --tk-up: var(--cv2-up); --tk-down: var(--cv2-down); --tk-neu: var(--cv2-text-3); }
.cv2-tk-imp-rows { display: flex; flex-direction: column; gap: 8px; }
.cv2-tk-imp-row { display: flex; align-items: center; gap: 7px; }
.cv2-tk-imp-dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; background: var(--tk); }
.cv2-tk-imp-dot--light { background: color-mix(in srgb, var(--tk) 18%, transparent); }
.cv2-tk-imp-label { font-size: 13px; font-weight: 600; color: var(--cv2-text-2); margin-right: 1px; }
.cv2-tk-imp-value { font-size: 15px; font-weight: 700; color: var(--cv2-text-1); font-variant-numeric: tabular-nums; margin-left: 1px; }
.cv2-tk-imp-bars { display: flex; justify-content: center; align-items: flex-end; gap: 28px; margin: 18px 0 4px; }
.cv2-tk-imp-bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cv2-tk-imp-bar-slot { width: 26px; display: flex; align-items: flex-end; }
.cv2-tk-imp-bar-total { position: relative; width: 26px; border-radius: 6px 6px 0 0; background: color-mix(in srgb, var(--tk) 18%, transparent); }
.cv2-tk-imp-bar-energy { position: absolute; left: 0; right: 0; bottom: 0; background: var(--tk-energy); }
.cv2-tk-imp-bar-energy.is-full { border-radius: 6px 6px 0 0; }
.cv2-tk-imp-bar-lbl { font-size: 11px; color: var(--cv2-text-3); }

/* 왜 이런 결과가 나왔나요 — 플랫 목록 */
.cv2-tk-reason-list { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.cv2-tk-reason-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--cv2-text-1); }
.cv2-tk-reason-body { margin-top: 6px; font-size: 14px; line-height: 1.7; color: var(--cv2-text-2); word-break: keep-all; }

/* 환율로 본 수출 시트 */
.cv2-fx-sheet { padding-bottom: 8px; }
.cv2-fx-rate { display: inline-block; margin-bottom: 14px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--cv2-accent); background: var(--cv2-surface-accent); }
.cv2-fx-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 14px 16px; border-radius: 12px; background: var(--cv2-surface-2); }
.cv2-fx-code { font-size: 15px; font-weight: 700; color: var(--cv2-text-1); }
.cv2-fx-val { display: flex; flex-direction: column; align-items: flex-end; }
.cv2-fx-cmp { font-size: 11px; color: var(--cv2-text-3); }
.cv2-fx-val strong { font-size: 18px; font-weight: 800; color: var(--cv2-text-1); }
.cv2-fx-effect { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 12px 16px; border-radius: 10px; background: var(--cv2-surface-accent); font-size: 14px; font-weight: 600; color: var(--cv2-text-1); }
.cv2-fx-effect strong { font-weight: 800; color: var(--cv2-accent); }
.cv2-fx-summary { margin: 14px 0 0; font-size: 14px; line-height: 1.7; color: var(--cv2-text-2); word-break: keep-all; }

/* ============================================================
   제목 태그 리셋 — 본문 제목 요소를 h2·h3 로 쓰면서 브라우저 기본 margin·굵기·크기가 섞이지 않게 한다.
   :where 로 명시도를 0 으로 두어, 각 제목 클래스가 정한 margin·font-size 는 그대로 우선한다.
   ============================================================ */
:where(h2, h3).cv2-h { margin: 0; font: inherit; }

/* markdown AI 본문: 제목 태그를 한 단계 내린 뒤에도 원래 레벨 기준 크기를 유지 */
.cv2-ai-body.is-markdown :is(.cv2-md-h1, .cv2-md-h2, .cv2-md-h3, .cv2-md-h4, .cv2-md-h5, .cv2-md-h6) {
  font-weight: 700;
  color: var(--cv2-text-1);
  margin: 16px 0 6px;
  line-height: 1.4;
}
.cv2-ai-body.is-markdown :is(.cv2-md-h1, .cv2-md-h2, .cv2-md-h3, .cv2-md-h4, .cv2-md-h5, .cv2-md-h6):first-child { margin-top: 0; }
.cv2-ai-body.is-markdown .cv2-md-h1 { font-size: 20px; }
.cv2-ai-body.is-markdown .cv2-md-h2 { font-size: 18px; }
.cv2-ai-body.is-markdown .cv2-md-h3 { font-size: 16px; }
.cv2-ai-body.is-markdown :is(.cv2-md-h4, .cv2-md-h5, .cv2-md-h6) { font-size: 15px; color: var(--cv2-text-2); }

/* JSON 이 아닌 AI 본문(평문 폴백)의 '#' 제목 줄 */
.cv2-ai-text-plain .cv2-ai-plain-h { font-weight: 700; }
