/* Invest Trend: 짙은 초록 머리 띠 + 금색 점, 흰 지면. 정본: DESIGN.md (라이트 고정, 구획은 선) */
:root {
  --band: #0E4D36; --gold: #F2C14E;
  --paper: #FFFFFF; --surface: #FFFFFF; --ink: #10201A; --ink-2: #3C4A44; --muted: #69766F;
  --rule: #10201A; --hair: #E4E9E6; --line-2: #C9D2CD; --brand: #0E4D36; --brand-2: #E8F2ED; --gold-ink: #8A6100;
  --up: #D1242F; --down: #1F5FBF; --warn: #C98500;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 60px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 var(--sans); -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.num, td.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

/* 머리 띠: 날짜 줄 → 제호 → 메뉴 (모두 어두운 띠 안) */
.hdr { background: var(--band); color: #fff; }
.dateline { max-width: 1200px; margin: 0 auto; padding: 10px 28px 0; display: flex; justify-content: space-between; gap: 12px; color: rgba(255,255,255,.78); font-size: 12.5px; }
.dateline a { color: #fff; font-weight: 700; }
.masthead { max-width: 1200px; margin: 0 auto; padding: 6px 28px 6px; }
.logo { font-weight: 900; font-size: 30px; letter-spacing: -0.03em; line-height: 1; color: #fff; }
.logo:hover { text-decoration: none; }
.logo .mk { width: .9em; height: .9em; vertical-align: -0.1em; margin-right: .25em; border-radius: 22%; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.logo i { font-style: normal; color: var(--gold); }
.logo small { font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.72); letter-spacing: 0; margin-left: 10px; }
.navbar { position: sticky; top: 0; z-index: 10; background: var(--band); }
.cats { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { padding: 10px 12px 9px; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.75); white-space: nowrap; border-bottom: 3px solid transparent; }
.cats a:hover { color: #fff; text-decoration: none; }
.cats a.on { color: #fff; font-weight: 800; border-bottom-color: var(--gold); }
.pill { white-space: nowrap; }
.pill .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 5px; vertical-align: 2px; }
.pill.stale .dot { background: var(--warn); }
.ticker { border-bottom: 1px solid var(--hair); background: var(--surface); }
.ticker-in { max-width: 1200px; margin: 0 auto; padding: 0 28px; display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; height: 38px; align-items: center; font-size: 13px; white-space: nowrap; }
.ticker-in::-webkit-scrollbar { display: none; }
.tk { display: inline-flex; gap: 6px; align-items: baseline; color: var(--ink-2); }
.tk b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }

main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 22px 28px 64px; }
.foot { border-top: 1px solid var(--hair); }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 18px 28px 40px; color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-in b { color: var(--ink); font-weight: 900; }

h1 { font-size: 30px; line-height: 1.3; margin: 4px 0 6px; font-weight: 900; letter-spacing: -0.025em; }
h2 { font-size: 17px; font-weight: 800; margin: 36px 0 10px; padding-top: 9px; border-top: 2px solid var(--rule); letter-spacing: -0.01em; }
h2 small { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 8px; letter-spacing: 0; }
.desc { color: var(--ink-2); font-size: 14.5px; margin: 2px 0 14px; max-width: 760px; }
.meta { color: var(--muted); font-size: 12.5px; }
.lead { font-size: 27px; font-weight: 800; line-height: 1.35; margin: 6px 0 10px; letter-spacing: -0.025em; }
.kicker { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--brand); letter-spacing: 0.02em; }
.up { color: var(--up); } .down { color: var(--down); }
.empty { color: var(--muted); }
.list { margin: 0; padding-left: 20px; } .list li { margin: 4px 0; }

.two { display: grid; gap: 0 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.three { display: grid; gap: 0 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.front { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 36px; }
.front > aside { border-left: 1px solid var(--hair); padding-left: 28px; }
@media (max-width: 900px) { .two, .three, .front { grid-template-columns: minmax(0, 1fr); } .front > aside { border-left: 0; padding-left: 0; } }

.chart { background: var(--surface); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 14px 4px 10px; height: 320px; position: relative; }
.chart.sm { height: 240px; } .chart.xs { height: 190px; }
.src { color: var(--muted); font-size: 12px; margin: 7px 0 0; line-height: 1.55; }
.src::before { content: "출처 · "; font-weight: 700; color: var(--ink-2); }
.src a { text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.scroll { overflow-x: auto; background: var(--surface); border-top: 2px solid var(--rule); border-bottom: 1px solid var(--hair); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--hair); text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { text-align: left; padding-left: 4px; }
th { color: var(--ink-2); font-weight: 700; font-size: 12.5px; background: var(--surface); position: sticky; top: 0; }
table.txt td, table.txt th { text-align: left; white-space: normal; }
td.wrap { white-space: normal; text-align: left; min-width: 220px; }
.quote td { padding: 8px 2px; } .quote td:first-child { white-space: normal; }

.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line-2); background: var(--surface); border-radius: 2px; padding: 4px 11px; cursor: pointer; color: var(--ink-2); min-height: 32px; }
.chips button.on { background: var(--band); color: #fff; border-color: var(--band); }
input.q { font: inherit; font-size: 14px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--surface); min-width: 180px; }

.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 4px; padding-top: 9px; border-top: 2px solid var(--rule); }
.sec-h h2 { margin: 0; padding: 0; border: 0; }
.sec-h a { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.feed { display: grid; }
.news { display: block; padding: 11px 0 12px; border-bottom: 1px solid var(--hair); }
.news:hover { text-decoration: none; } .news:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.news .t { font-weight: 700; font-size: 16px; line-height: 1.45; margin: 3px 0 2px; letter-spacing: -0.01em; }
.news .o { color: var(--muted); font-size: 12.5px; margin: 1px 0 2px; }
.news .m { color: var(--muted); font-size: 12.5px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 800; margin-right: 6px; color: var(--ink-2); }
.chip.주식 { color: var(--brand); } .chip.금리 { color: #5B3FA8; } .chip.환율 { color: #0F6E7A; } .chip.원자재 { color: var(--gold-ink); } .chip.코인 { color: #C2410C; } .chip.부동산 { color: #7A4B2A; } .chip.정책 { color: #44504B; }
.lang { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 5px; border-radius: 2px; margin-right: 6px; line-height: 1.7; background: #EEF1F5; color: var(--ink-2); }
.lang.en { background: var(--band); color: #fff; }

/* 시세판: 자산 · 값 · 기간 등락 */
.board td.name { white-space: normal; min-width: 150px; }
.board td.name .meta { display: block; font-size: 11.5px; }
.board tr.grp td { padding-top: 16px; font-weight: 800; font-size: 13px; color: var(--brand); border-bottom: 1px solid var(--rule); }
.flat { color: var(--muted); }
.note { color: var(--muted); font-size: 12.5px; margin: 8px 0 0; }
.big { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.gauge { height: 8px; background: linear-gradient(90deg, #1F5FBF 0 25%, #8FB0E0 25% 45%, #C9D2CD 45% 55%, #E89A9F 55% 75%, #D1242F 75%); border-radius: 4px; position: relative; margin: 10px 0 4px; }
.gauge i { position: absolute; top: -4px; width: 3px; height: 16px; background: var(--ink); }
.gauge-l { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; }
.stat { padding: 10px 0 12px; border-bottom: 1px solid var(--hair); }
.stat .lb { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.disc { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.tabs { position: sticky; top: 42px; z-index: 5; background: var(--paper); display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--hair); margin: 6px 0 0; }
.tabs a { padding: 9px 12px; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; }

/* 순위 목록 */
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.rank li:last-child { border-bottom: 0; }
.rank .n { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--brand); }
.rank .t { font-weight: 700; font-size: 14.5px; line-height: 1.45; }
.rank .s { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.repo { font-family: var(--mono); font-weight: 600; font-size: 13.5px; word-break: break-all; }

@media (max-width: 900px) {
  .dateline, .masthead, .ticker-in, .foot-in { padding-left: 16px; padding-right: 16px; }
  main { padding: 16px 16px 56px; }
  .cats { padding: 0 8px; }
  .logo { font-size: 26px; } .logo small { display: none; }
  h1 { font-size: 24px; } .lead { font-size: 21px; }
}
@media print { .hdr, .navbar, .foot, .ticker { display: none !important; } }
