:root {
  --bg: #071014; --surface: #0d181e; --surface-2: #111f26; --line: #263841;
  --text: #f3f7f8; --muted: #9db0b8; --green: #35d7a0; --blue: #4cbcff;
  --red: #ff7070; --amber: #efb955; font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body { min-width: 320px; margin: 0; background: var(--bg); font-size: 15px; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; letter-spacing: 0; }
.shell { width: min(1480px, calc(100% - 40px)); margin: 0 auto; }
.topbar { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(7,16,20,.97); }
.topbar-inner { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #2e705c; border-radius: 6px; background: #123b30; font-size: 12px; font-weight: 900; }
.brand b { font-size: 17px; }
.top-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.top-meta a { padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); }
main { padding: 32px 0 72px; }
.hero { min-height: 178px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 32px; border: 1px solid #285342; background: #0d211b; }
.hero p, .section-heading p { margin: 0 0 7px; color: var(--green); font-size: 11px; font-weight: 900; }
.hero h1 { margin: 0; font-size: 34px; line-height: 1.25; }
.hero > div > span { display: block; margin-top: 12px; color: var(--muted); }
.hero-facts { min-width: 260px; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 8px 12px; padding-left: 28px; border-left: 1px solid #315a4c; }
.hero-facts b { color: var(--green); font-size: 24px; }
.hero-facts span { color: var(--muted); font-size: 13px; }
.fund-tabs { position: sticky; z-index: 10; top: 62px; display: flex; gap: 6px; overflow-x: auto; margin: 0 0 30px; padding: 12px 0; background: var(--bg); scrollbar-width: none; }
.fund-tabs::-webkit-scrollbar { display: none; }
.fund-tabs button { flex: none; padding: 9px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); cursor: pointer; }
.fund-tabs button b { margin-right: 5px; color: var(--text); }
.fund-tabs button.active { border-color: #2e705c; background: #123b30; color: var(--green); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 26px 0 16px; }
.section-heading h2 { margin: 0; font-size: 26px; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.summary-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.stat { min-height: 106px; padding: 19px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat span, .stat small { display: block; color: var(--muted); }
.stat span { font-size: 11px; }
.stat strong { display: block; margin: 8px 0 5px; font-size: 22px; }
.stat small { font-size: 11px; }
.positive { color: var(--green) !important; } .negative { color: var(--red) !important; } .neutral { color: var(--blue) !important; }
.panel { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); }
.panel > header { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel h3 { margin: 0; font-size: 17px; }
.panel header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.filter-panel { margin: 0 0 16px; }
.filter-panel > header { min-height: 64px; }
.filter-grid { display: grid; grid-template-columns: 1.15fr 1.35fr repeat(4, minmax(130px, .8fr)); gap: 12px; padding: 16px 18px 18px; }
.filter-grid label, .filter-field { min-width: 0; display: grid; align-content: start; gap: 7px; }
.filter-grid label > span, .filter-field > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-grid input, .filter-grid select { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; outline: none; background: var(--surface-2); color: var(--text); font: inherit; }
.filter-grid input:focus, .filter-grid select:focus { border-color: #38866d; }
.segmented { height: 40px; display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 5px; }
.segmented button { border: 0; border-left: 1px solid var(--line); background: var(--surface-2); color: var(--muted); cursor: pointer; }
.segmented button:first-child { border-left: 0; }
.segmented button.active { background: #15513f; color: #fff; }
.reset-button { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--text); cursor: pointer; }
.reset-button:hover { border-color: #38866d; color: var(--green); }
.filter-result { padding: 0 18px 15px; color: var(--muted); font-size: 12px; }
.filter-result strong { color: var(--green); }
.range-panel { margin-top: 0; margin-bottom: 28px; }
.range-controls { display: flex; align-items: flex-end; gap: 9px; color: var(--muted); font-size: 12px; }
.range-controls label { display: grid; gap: 5px; }
.range-controls select { min-width: 104px; height: 38px; padding: 0 30px 0 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--text); font: inherit; }
.range-note { margin: 14px 18px 0; padding: 12px 14px; border-left: 3px solid var(--amber); background: rgba(239,185,85,.07); color: var(--muted); font-size: 12px; line-height: 1.6; }
.range-note strong { margin-right: 8px; color: var(--amber); }
.range-panel .summary-strip { margin: 14px 18px 0; }
.range-panel .chart-wrap { min-height: 300px; }
.range-panel .chart-wrap svg { height: 280px; }
.legend { display: flex; gap: 13px; color: var(--muted); font-size: 11px; }
.legend span::before { width: 9px; height: 9px; display: inline-block; margin-right: 6px; border-radius: 2px; content: ""; }
.legend .v1::before { background: var(--green); } .legend .hold::before { background: var(--blue); }
.chart-wrap { min-height: 340px; padding: 14px 12px 8px; overflow: hidden; }
.chart-wrap svg { width: 100%; height: 320px; display: block; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-grid .panel { min-width: 0; }
.axis-label { fill: var(--muted); font-size: 11px; }
.grid-line { stroke: #20323a; stroke-width: 1; }
.zero-line { stroke: #70858e; stroke-width: 1; }
.bar { cursor: pointer; transition: opacity .15s; } .bar:hover { opacity: .75; }
.bar-v1 { fill: var(--green); } .bar-hold { fill: var(--blue); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
th { color: var(--muted); font-size: 11px; font-weight: 700; }
td { font-size: 13px; font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.table-link { color: var(--text); text-decoration: underline; text-decoration-color: #3b5c69; text-underline-offset: 3px; cursor: pointer; }
.table-link:hover { color: var(--green); }
.lev { display: inline-flex; min-width: 31px; justify-content: center; margin-left: 7px; padding: 3px 5px; border: 1px solid var(--line); border-radius: 4px; font-size: 10px; }
.lev-1 { color: var(--blue); } .lev-2 { color: var(--amber); } .lev-3 { color: var(--red); }
.thin { color: var(--amber); }
.empty { min-height: 180px; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }
.partial { display: inline-block; margin-left: 6px; padding: 3px 5px; border-radius: 3px; background: rgba(239,185,85,.12); color: var(--amber); font-size: 9px; }
.fund-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.fund-heading p { margin: 0 0 6px; color: var(--green); font-size: 11px; font-weight: 900; }
.fund-heading h2 { margin: 0; font-size: 30px; }
.fund-heading span { color: var(--muted); font-size: 13px; }
.risk-panel { margin-bottom: 16px; }
.risk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.risk-grid article { min-height: 150px; padding: 18px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.risk-grid article:nth-child(-n+4) { border-top: 0; }
.risk-grid article:nth-child(4n+1) { border-left: 0; }
.risk-grid article > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.risk-grid article > h3 { margin: 7px 0 16px; font-size: 15px; }
.risk-grid article > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.risk-grid article > div > b { min-width: 0; padding: 9px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); text-align: center; font-size: 13px; }
.risk-grid article small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.metric-guide { display: grid; grid-template-columns: repeat(3, 1fr); }
.metric-guide article { min-height: 128px; padding: 18px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.metric-guide article:nth-child(-n+3) { border-top: 0; }
.metric-guide article:nth-child(3n+1) { border-left: 0; }
.metric-guide h4 { margin: 0 0 8px; font-size: 14px; }
.metric-guide p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.explain-band { margin-top: 42px; padding-top: 4px; border-top: 1px solid var(--line); }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; border: 1px solid var(--line); list-style: none; background: var(--surface); }
.flow li { min-height: 112px; display: flex; align-items: center; gap: 14px; padding: 18px; border-left: 1px solid var(--line); }
.flow li:first-child { border-left: 0; }
.flow li > b { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #153d32; color: var(--green); }
.flow strong, .flow small { display: block; } .flow small { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.notes div { padding: 20px; border-left: 1px solid var(--line); } .notes div:first-child { border-left: 0; }
.notes h3 { margin: 0 0 9px; font-size: 15px; } .notes p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tooltip { position: fixed; z-index: 50; display: none; pointer-events: none; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: #15242b; box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 12px; }
.tooltip.show { display: block; }
@media (max-width: 960px) {
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(odd) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .flow { grid-template-columns: repeat(2, 1fr); } .flow li:nth-child(odd) { border-left: 0; } .flow li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .notes { grid-template-columns: 1fr; } .notes div { border-top: 1px solid var(--line); border-left: 0; } .notes div:first-child { border-top: 0; }
  .risk-grid { grid-template-columns: repeat(2, 1fr); }
  .risk-grid article:nth-child(-n+4) { border-top: 1px solid var(--line); }
  .risk-grid article:nth-child(-n+2) { border-top: 0; }
  .risk-grid article:nth-child(odd) { border-left: 0; }
  .metric-guide { grid-template-columns: 1fr 1fr; }
  .metric-guide article:nth-child(-n+3) { border-top: 1px solid var(--line); }
  .metric-guide article:nth-child(-n+2) { border-top: 0; }
  .metric-guide article:nth-child(3n+1) { border-left: 1px solid var(--line); }
  .metric-guide article:nth-child(odd) { border-left: 0; }
}
@media (max-width: 640px) {
  body { font-size: 14px; } .shell { width: min(100% - 24px, 1480px); }
  .top-meta span { display: none; } main { padding-top: 18px; }
  .hero { min-height: 0; display: block; padding: 23px 18px; } .hero h1 { font-size: 27px; }
  .hero-facts { margin-top: 22px; padding: 18px 0 0; border-top: 1px solid #315a4c; border-left: 0; }
  .fund-tabs { top: 62px; margin-bottom: 22px; }
  .section-heading, .fund-heading { display: block; } .section-heading > span, .fund-heading > span { display: block; margin-top: 8px; }
  .summary-strip { grid-template-columns: 1fr 1fr; } .stat { min-height: 98px; padding: 15px; } .stat strong { font-size: 19px; }
  .chart-wrap { min-width: 690px; }
  .chart-panel, .range-panel { max-width: 100%; overflow-x: auto; contain: inline-size; }
  .panel > header { position: sticky; left: 0; }
  .flow { grid-template-columns: 1fr; } .flow li { border-top: 1px solid var(--line); border-left: 0; } .flow li:first-child { border-top: 0; }
  .range-panel > header { display: block; }
  .range-controls { margin-top: 14px; flex-wrap: wrap; }
  .range-controls label { flex: 1; }
  .range-controls select { width: 100%; }
  .range-note { margin: 12px; }
  .range-panel .summary-strip { margin: 12px; }
  .filter-panel > header { position: static; }
  .filter-grid { grid-template-columns: 1fr; padding: 14px 12px; }
  .filter-result { padding: 0 12px 13px; }
  .risk-grid { grid-template-columns: 1fr 1fr; }
  .metric-guide { grid-template-columns: 1fr; }
  .metric-guide article, .metric-guide article:nth-child(-n+2), .metric-guide article:nth-child(3n+1) { border-top: 1px solid var(--line); border-left: 0; }
  .metric-guide article:first-child { border-top: 0; }
}
