/* Meat Trend — 빨강 브랜드, 트렌디한 시세 사이트(2026-10-14 개편). 정본: DESIGN.md (라이트 고정, 구획은 선) */
:root {
  --paper: #FFFFFF; --surface: #FFFFFF; --ink: #111111; --ink-2: #4A4A48; --muted: #86847E;
  --rule: #111111; --hair: #ECECEC; --brand: #E11D2E;
  --up: #D1242F; --down: #1F5FBF;
  --good: #0B7A3B; --good-bg: #E8F3EC; --bad: #B42318; --bad-bg: #FBEAE8; --neutral-bg: #F0EEE8; --warn: #C98500;
  --s-us: #2A78D6; --s-retail: #EB6834; --s-a: #1BAF7A; --s-b: #EDA100; --s-c: #E87BA4; --s-fair: #008300; --s-au: #6250D6; --s-fx: #9A988F;
  --critical: var(--bad); --accent: var(--brand); --line: var(--hair); --line-2: #CFCBC1;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --serif: var(--sans);   /* 세리프를 쓰지 않는다 — 제목도 굵은 산세리프 */
}
* { box-sizing: border-box; }
html { scroll-padding-top: 140px; -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, .kpi .v { font-variant-numeric: tabular-nums; }

/* 머리: 날짜 줄 → 제호 → 섹션 메뉴 → 시세 띠 */
.hdr { background: var(--brand); color: #fff; }
.hdr .dateline, .hdr .dateline a, .hdr .pill { color: rgba(255,255,255,.85) !important; }
.hdr .logo, .hdr .logo i { color: #fff; }
.hdr .logo small { color: rgba(255,255,255,.8); }
.dateline { max-width: 1200px; margin: 0 auto; padding: 10px 28px 0; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12.5px; }
.masthead { max-width: 1200px; margin: 0 auto; padding: 6px 28px 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.logo { font-family: var(--sans); font-weight: 900; font-size: 32px; letter-spacing: -0.045em; line-height: 1; color: var(--ink); }
.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(--brand); }
.logo small { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 10px; }
.navbar { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--hair); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.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: 11px 12px 10px; font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; border-bottom: 3px solid transparent; }
.cats a:hover { color: var(--ink); text-decoration: none; }
.cats a.on { color: var(--ink); font-weight: 800; border-bottom-color: var(--brand); }
.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: 36px; 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; }
.pill { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pill .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--good); margin-right: 5px; vertical-align: 2px; }
.pill.stale .dot { background: var(--warn); }

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 { font-family: var(--serif); color: var(--ink); }

/* 제목·본문 */
h1 { font-family: var(--sans); font-size: 32px; line-height: 1.28; margin: 4px 0 6px; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 18px; font-weight: 800; margin: 36px 0 10px; padding-top: 10px; border-top: 2px solid var(--ink); letter-spacing: -0.025em; }
h2 small, h3 small, .h-note { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 8px; letter-spacing: 0; }
h3 { font-size: 15px; font-weight: 800; margin: 18px 0 8px; }
.sub { color: var(--ink-2); font-size: 13.5px; }
.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-family: var(--sans); font-size: 21px; font-weight: 800; line-height: 1.5; margin: 10px 0 8px; letter-spacing: -0.015em; }
.point { font-size: 16px; font-weight: 700; margin: 2px 0 10px; }
.up { color: var(--up); } .down { color: var(--down); } .ok { color: var(--good); font-weight: 700; }

/* 구획: 상자 대신 선 */
.grid { display: grid; gap: 0 28px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid.k4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.two { display: grid; gap: 0 32px; grid-template-columns: 1fr 1fr; }
.three { display: grid; gap: 0 28px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .two, .three { grid-template-columns: 1fr; } }
.card { padding: 12px 0 14px; border-top: 1px solid var(--hair); }
.card.link { display: block; } .card.link:hover { text-decoration: none; } .card.link:hover b { text-decoration: underline; }
.kpi .k { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 1px 0; }
.kpi .v small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.kpi .d { font-size: 13px; color: var(--ink-2); }
.empty { color: var(--muted); }
.box { padding: 4px 0; }
.note { background: #F4F1EA; border-left: 3px solid var(--ink); padding: 12px 16px; font-size: 14px; margin-top: 12px; line-height: 1.7; }
.list { margin: 0; padding-left: 20px; } .list li { margin: 4px 0; }
details summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }

/* 판정 배지: 색 + 기호 + 글자 */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 0 6px; border-radius: 2px; font-size: 12px; font-weight: 800; white-space: nowrap; line-height: 1.7; }
.badge.비싸다 { color: var(--bad); background: var(--bad-bg); } .badge.비싸다::before { content: "▲"; font-size: 9px; }
.badge.적정 { color: var(--ink-2); background: var(--neutral-bg); } .badge.적정::before { content: "●"; font-size: 7px; }
.badge.싸다 { color: var(--good); background: var(--good-bg); } .badge.싸다::before { content: "▼"; font-size: 9px; }

/* 차트·표 면 */
.chart { background: var(--surface); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 14px 4px 10px; height: 360px; position: relative; }
.chart.sm { height: 260px; } .chart.xs { height: 200px; }
.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: none; }
.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.cheap, td.cheap a { color: var(--good); font-weight: 800; } td.dear, td.dear a { color: var(--bad); font-weight: 800; }
tr.click { cursor: pointer; } tr.click:hover td { background: #F7F5EF; } tr.sel td { background: #F1EEE6; }
.cheap { color: var(--good); font-weight: 700; } .dear { color: var(--bad); font-weight: 700; }

/* 필터 */
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 10px 0; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: var(--surface); padding: 5px 12px; color: var(--ink); cursor: pointer; border-right: 1px solid var(--ink); min-height: 32px; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.check input { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
select, input[type=text], input:not([type]) { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 2px; background: var(--surface); }

/* 뉴스 목록: 헤드라인 줄 */
.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 .m { color: var(--muted); font-size: 12.5px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 800; margin-right: 6px; color: var(--brand); }
.chip.가격 { color: #1F5FBF; } .chip.관세 { color: #B4232A; } .chip.공급 { color: #0B7A3B; } .chip.유통 { color: #8A5A00; } .chip.정책 { color: #5B3FB8; } .chip.해외 { color: #4A4A48; }
.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(--ink); color: #fff; border-color: var(--ink); }
.kw { display: inline-block; font-size: 13.5px; font-weight: 600; margin: 0 12px 6px 0; color: var(--ink); }
.movers { margin: 0; padding: 0; }
.movers li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--hair); font-size: 14px; list-style: none; }
.movers li:last-child { border-bottom: 0; }
.daily { display: block; }
.daily:hover { text-decoration: none; } .daily:hover .lead { text-decoration: underline; text-underline-offset: 4px; }
.kicker { font-size: 12.5px; font-weight: 800; color: var(--brand); letter-spacing: 0.02em; }

/* 홈 지면 */
.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) { .front { grid-template-columns: 1fr; } .front > aside { border-left: 0; padding-left: 0; } }
.quote { width: 100%; font-size: 14px; }
.quote td { padding: 8px 2px; }
.quote td:first-child { white-space: normal; }

/* 리포트 */
.report-sec { margin-top: 26px; }
.report-sec > h2 { display: flex; align-items: baseline; gap: 8px; }
.report-sec > h2 .no { color: var(--brand); font-size: 14px; font-weight: 900; }
.commentary { font-size: 15.5px; line-height: 1.8; white-space: pre-wrap; padding: 4px 0; }

/* 글(desk) */
.article { max-width: 760px; }
.article h1 { font-size: 30px; }
.article h2 { font-size: 18px; }
.article table { font-size: 13.5px; margin: 10px 0; }
.article table th, .article table td { white-space: normal; text-align: left; }
.article blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--line-2); color: var(--ink-2); background: #F7F5EF; }
.article pre { white-space: pre-wrap; background: #F4F1EA; padding: 12px 14px; font-size: 13.5px; }
.article code { font-size: 13px; }
.article a { color: var(--down); text-decoration: underline; text-underline-offset: 2px; }

@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: 18px; }
}
@media (max-width: 600px) { .grid.k4 { grid-template-columns: 1fr 1fr; gap: 0 16px; } .kpi .v { font-size: 22px; } }
@media print {
  .hdr, .navbar, .foot, .ticker { display: none !important; }
  body { background: #fff; } main { padding: 0 !important; max-width: none; }
  .chart, .card, .note, .scroll, table, tr { break-inside: avoid; } h2 { break-after: avoid; }
}

/* 그래프 · 목록 · 시트 탭 (specs/meat-data-views) */
.mw-view { margin-bottom: 14px; }
.mw-tabs { display: flex; margin: 4px 0 6px; }
.mw-tabs button { font: inherit; font-size: 12.5px; padding: 4px 12px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink-2); cursor: pointer; margin-left: -1px; }
.mw-tabs button:first-child { margin-left: 0; border-radius: 4px 0 0 4px; } .mw-tabs button:last-child { border-radius: 0 4px 4px 0; }
.mw-tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mw-view:not([data-view="chart"]) > .chart, .mw-view:not([data-view="list"]) > .mw-list, .mw-view:not([data-view="sheet"]) > .mw-sheet { display: none; }
.mw-list { border-top: 2px solid var(--rule); }
.mw-sheet .scroll { max-height: 520px; }
.mw-sheet th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.mw-sheet td { font-variant-numeric: tabular-nums; } .mw-sheet td.l { text-align: left; white-space: nowrap; }
.mw-foot { display: flex; gap: 12px; justify-content: space-between; margin-top: 6px; font-size: 12px; }
.seg button:disabled { opacity: .4; cursor: default; }
.src .anon { cursor: help; }
