/* 수익성 성적표·공통 보고 컴포넌트 모양 (W53, FeatureId fund.economics.presentation).
   기존 디자인 변수(styles.css의 :root)와 공용 클래스(.panel, .pill, .notice, .button)를 그대로 쓰고 이 컴포넌트에 필요한 틀만 더한다.
   사이트 CSP가 인라인 스타일을 막으므로 모든 모양은 이 파일의 클래스로 준다. 다른 화면에 번지지 않게 선택자는 fund-econ 접두어로 시작한다. */

.fund-econ { display: grid; gap: 14px; min-width: 0; }
.fund-econ h2 { margin: 0 0 8px; font-size: 15px; }
.fund-econ h3 { margin: 8px 0 6px; font-size: 13px; }
.fund-econ p { margin: 0; line-height: 1.6; }
.fund-econ-panel { display: grid; gap: 10px; min-width: 0; }
.fund-econ-status:empty { display: none; }
.fund-econ-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fund-econ-headline { font-size: 14px; font-weight: 700; color: var(--ink); }
.fund-econ-cert { font-size: 12px; color: var(--muted); }
.fund-econ-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; }

/* 카드 묶음: 넓은 화면은 여러 칸, 좁은 화면은 한 칸. */
.fund-econ-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }

/* 값 목록(이름 / 값). 숫자는 고정 폭 숫자로 줄을 맞춘다. */
.fund-econ-values {
  display: grid; grid-template-columns: minmax(130px, max-content) minmax(0, 1fr); gap: 4px 14px; margin: 0;
  font-size: 13px;
}
.fund-econ-values dt { color: var(--muted); }
.fund-econ-values dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* 이유·다음 평가 목록. */
.fund-econ-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fund-econ-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 0;
  border-bottom: 1px solid var(--line); font-size: 13px; min-width: 0;
}
.fund-econ-row:last-child { border-bottom: 0; }
.fund-econ-count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.fund-econ-notices { display: grid; gap: 4px; margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }

/* 계수 막대: 값(0~1)을 너비 단계 클래스로만 보인다. 색만으로 구분하지 않고 글자 값도 함께 보인다. */
.fund-econ-meter { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.fund-econ-meter > span { display: block; height: 100%; background: var(--green); width: 0; }
.fund-econ-meter .w0 { width: 0; }
.fund-econ-meter .w1 { width: 10%; }
.fund-econ-meter .w2 { width: 20%; }
.fund-econ-meter .w3 { width: 30%; }
.fund-econ-meter .w4 { width: 40%; }
.fund-econ-meter .w5 { width: 50%; }
.fund-econ-meter .w6 { width: 60%; }
.fund-econ-meter .w7 { width: 70%; }
.fund-econ-meter .w8 { width: 80%; }
.fund-econ-meter .w9 { width: 90%; }
.fund-econ-meter .w10 { width: 100%; }

/* 질문 버튼·recipe 카드. */
.fund-econ-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fund-econ-answer { display: grid; gap: 6px; }
.fund-econ-answer:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.fund-econ-recipe { display: grid; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fund-econ-recipe:last-child { border-bottom: 0; }
.fund-econ-modules { display: grid; gap: 2px; margin: 0; padding-left: 18px; font-size: 12px; }

.fund-econ-details summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.fund-econ-details p, .fund-econ-details li { font-size: 12px; color: var(--faint); word-break: break-all; }

/* 표: 좁은 화면에서는 표 상자 안에서만 가로로 밀어 본다(페이지 전체가 넘치지 않게). */
.fund-econ-table-wrap { overflow-x: auto; max-width: 100%; }
.fund-econ-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.fund-econ-table caption { padding-bottom: 6px; color: var(--muted); text-align: left; }
.fund-econ-table th, .fund-econ-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.fund-econ-table th { color: var(--muted); font-weight: 700; }

/* 초점 테두리(키보드 사용자). */
.fund-econ button:focus-visible, .fund-econ a:focus-visible, .fund-econ summary:focus-visible,
.fund-econ h2:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* 모바일: 한 줄 배치(USER_PAGES_PLAN §2). */
@media (max-width: 560px) {
  .fund-econ-values { grid-template-columns: 1fr; }
  .fund-econ-values dd { margin-bottom: 4px; }
  .fund-econ-actions .button { flex: 1 1 auto; }
  .fund-econ-count { margin-left: 0; }
}
