/* ============================================
   섹터별 이슈 브리핑 - 디자인 시스템
   Editorial Financial Modern
   ============================================ */

:root {
  /* Colors */
  --bg: #fafaf7;
  --bg-card: #ffffff;
  --ink: #111111;
  --ink-2: #444444;
  --ink-3: #888888;
  --line: #e8e6e0;
  --line-strong: #1a1a1a;
  --accent: #1a1a1a;

  /* 등락 컬러 (한국식) */
  --up: #c0392b;
  --up-bg: #fbeae7;
  --down: #1565c0;
  --down-bg: #e3edf7;
  --neutral: #555;
  --neutral-bg: #efefef;

  /* Tag/Sentiment */
  --positive: #1e7e34;
  --positive-bg: #e3f1e6;
  --negative: #c0392b;
  --negative-bg: #fbeae7;

  /* Layout */
  --container: 1240px;
  --radius: 6px;
  --radius-sm: 4px;

  /* Typography */
  --font-sans: 'Pretendard', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================
   Header
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark, .brand-mark-link .brand-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: var(--bg);
  padding: 4px 8px;
  border-radius: 3px;
}
.brand-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}
.brand-name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-size: 13px;
}
.meta-divider { color: var(--line); }
.date {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink-2);
}
.dept { color: var(--ink-3); }
.back-link {
  color: var(--ink-2);
  font-weight: 500;
  transition: color 0.15s;
}
.back-link:hover { color: var(--ink); }

/* ============================================
   Main / Hero
   ============================================ */
.main-content { padding: 56px 28px 80px; }
.hero { margin-bottom: 56px; }
.hero-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
  line-height: 1.2;
}
.hero-sub {
  color: var(--ink-3);
  font-size: 15px;
  margin: 0 0 24px 0;
}
.search-bar {
  max-width: 480px;
}
.search-bar input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}
.search-bar input:focus {
  border-color: var(--ink);
}

/* ============================================
   Sector Groups (메인페이지)
   ============================================ */
.sector-groups {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.group-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}
.group-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.group-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}
.card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.card-path {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
}
.card-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-stats {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.card-stats strong {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================
   Sector Page
   ============================================ */
.sector-page { padding: 32px 28px 80px; }
.breadcrumb {
  font-size: 12px;
  color: var(--ink-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.bc-sep { color: var(--line); }
.bc-current { color: var(--ink); font-weight: 600; }

.sector-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 32px 0;
}

/* ============================================
   Summary Box (Gemini 요약) - Editorial Card
   ============================================ */
.summary-box {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 22px 26px 24px 28px;
  margin-bottom: 48px;
  box-shadow: 0 2px 14px rgba(20, 20, 20, 0.04);
}
.summary-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.summary-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--bg);
  padding: 3px 8px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.summary-tag::before {
  content: '✦';
  font-size: 11px;
}
.summary-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.summary-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-left: auto;
}
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-list li {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.55;
  padding-left: 22px;
  position: relative;
  color: var(--ink);
}
.summary-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--ink);
  border-radius: 50%;
}

/* ============================================
   Show More Button
   ============================================ */
.show-more-btn {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.show-more-btn:hover { border-color: var(--ink); color: var(--ink); }
.show-more-btn .show-less-text { display: none; }
.show-more-btn.expanded .show-more-text { display: none; }
.show-more-btn.expanded .show-less-text { display: inline; }
.news-item.news-hidden { display: none; }

/* ============================================
   Block (섹션 단위)
   ============================================ */
.block { margin-bottom: 48px; }
.block-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
  gap: 16px;
}
.block-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.block-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.block-controls {
  display: flex;
  gap: 8px;
}
.block-search, .block-sort {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
}
.block-search:focus, .block-sort:focus { border-color: var(--ink); }

/* ============================================
   News List
   ============================================ */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color 0.15s;
}
.news-item:hover { border-color: var(--ink-3); }
.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 8px;
}
.news-date, .news-source {
  color: var(--ink-3);
  font-family: var(--font-mono);
}
.news-source { color: var(--ink-2); font-weight: 500; }
.news-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.4;
}
.news-title:hover { text-decoration: underline; }
.news-summary {
  color: var(--ink-2);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}

/* Tags */
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.tag-positive { background: var(--positive-bg); color: var(--positive); }
.tag-negative { background: var(--negative-bg); color: var(--negative); }
.tag-neutral { background: var(--neutral-bg); color: var(--neutral); }

/* ============================================
   US Movers (collapsible cards, click to expand description)
   ============================================ */
.us-movers-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.us-mover-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.us-mover-card:hover { border-color: var(--ink-3); }
.us-mover-card[open] { border-color: var(--ink); }
.us-mover-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
  flex-wrap: wrap;
}
.us-mover-summary::-webkit-details-marker { display: none; }
.us-mover-toggle {
  font-family: var(--font-mono);
  color: var(--ink-3);
  font-size: 14px;
  margin-left: auto;
  transition: transform 0.15s;
}
.us-mover-card[open] .us-mover-toggle {
  transform: rotate(180deg);
  color: var(--ink);
}
.us-mover-detail {
  padding: 14px 16px 16px 16px;
  border-top: 1px dashed var(--line);
  background: var(--bg);
}
.us-mover-desc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.us-mover-desc {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ============================================
   Flow Table (거래대금 7일)
   ============================================ */
.flow-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.flow-table th, .flow-table td {
  padding: 6px 10px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.flow-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.flow-table th:first-child, .flow-table td:first-child {
  text-align: left;
}
.flow-table .flow-date {
  color: var(--ink-3);
  font-weight: 500;
}
.flow-table tr:last-child td { border-bottom: none; }
.flow-table .change-up { color: var(--up); font-weight: 700; }
.flow-table .change-down { color: var(--down); font-weight: 700; }
@media (max-width: 640px) {
  .flow-table { font-size: 11px; }
  .flow-table th, .flow-table td { padding: 5px 8px; }
}
.ticker {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  background: var(--ink);
  color: var(--bg);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.us-name {
  font-size: 15px;
  font-weight: 600;
}
.change {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
}
.change-up { color: var(--up); background: var(--up-bg); }
.change-down { color: var(--down); background: var(--down-bg); }
.badge-high {
  background: var(--up-bg);
  color: var(--up);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}
.badge-low {
  background: var(--down-bg);
  color: var(--down);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}
.us-reason {
  color: var(--ink-2);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   Stock List (종목별 상세)
   ============================================ */
.stock-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stock-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s;
}
.stock-card:hover { border-color: var(--ink-3); }
.stock-card[open] { border-color: var(--ink); }

.stock-summary {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  gap: 16px;
}
.stock-summary::-webkit-details-marker { display: none; }
.stock-summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--ink-3);
  font-weight: 300;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.stock-card[open] .stock-summary::after {
  content: '−';
  color: var(--ink);
}
.stock-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.stock-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--line);
}
.stock-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.stock-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-left: 16px;
  flex-shrink: 0;
}
.price-num {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.market-cap {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #999;
  margin-left: 2px;
}
.stock-counts {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 3px;
}

.stock-detail {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.detail-row { margin-bottom: 24px; }
.detail-row:last-child { margin-bottom: 0; }
.detail-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px 0;
  color: var(--ink);
}
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.detail-list li {
  font-size: 13px;
  color: var(--ink-2);
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

/* Chart */
.chart-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-tabs {
  display: flex;
  gap: 4px;
}
.chart-range-change {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.chart-range-change .change-up,
.chart-range-change .change-down {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
}
.chart-range-change .change-up { color: var(--up); background: var(--up-bg); }
.chart-range-change .change-down { color: var(--down); background: var(--down-bg); }
.chart-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.chart-tab:hover { border-color: var(--ink-3); color: var(--ink); }
.chart-tab.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chart-placeholder {
  height: 220px;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0;
  background: var(--bg-card);
}
.site-footer .container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-3);
}
.footer-divider { color: var(--line); }

/* ============================================
   Loading / Empty / Error states
   ============================================ */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
  font-size: 14px;
}
.loading-state.error {
  color: var(--negative);
}
.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* New dot (오늘자 신규 표시) */
.new-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--up);
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 2px;
}
.card-new-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--up);
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}
.stat-sub {
  color: var(--ink-3);
  font-weight: 400;
}

/* US price */
.us-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

/* Detail list lines (공시/리포트/컨센) */
.detail-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: -0.01em;
  flex-wrap: wrap;
}
.detail-list li a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.1s;
}
.detail-list li a:hover { border-color: var(--ink); }
.line-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.line-broker {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
.empty-line {
  color: var(--ink-3);
  font-size: 12px;
  font-style: italic;
  background: transparent !important;
  border: none !important;
  padding: 4px 0 !important;
}

/* News keyword tag */
.news-kw-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #e8e8ff;
  color: #4040b0;
  flex-shrink: 0;
}
/* News summary toggle */
.news-summary-toggle { margin-top: 6px; }
.news-summary-btn {
  font-size: 11px;
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.news-summary-btn::-webkit-details-marker { display: none; }
.news-summary-btn::before { content: '▸ '; }
.news-summary-toggle[open] .news-summary-btn::before { content: '▾ '; }
.news-summary-box {
  margin-top: 6px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
}
/* US mover news links */
.us-mover-news {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
}
.us-news-link {
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-3);
  padding-bottom: 1px;
  display: inline-block;
}
.us-news-link:hover { border-color: var(--ink); }
.us-mover-reason {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.5;
  padding: 6px 10px;
  background: #fffbe6;
  border-left: 3px solid #f5c542;
  border-radius: 2px;
  font-weight: 600;
}
/* Empty state */
.empty-state {
  font-size: 12px;
  color: var(--ink-3);
  padding: 16px 0;
  text-align: center;
  font-style: italic;
}
/* Show more button */
.show-more-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.15s;
}
.show-more-btn:hover { border-color: var(--ink); color: var(--ink); }
.show-more-btn .show-less-text { display: none; }
.show-more-btn.expanded .show-more-text { display: none; }
.show-more-btn.expanded .show-less-text { display: inline; }
/* Consensus 2-column 그리드 */
.cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cons-side {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.cons-side-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.cons-empty {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--ink-3);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

/* Consensus 라인 */
.cons-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cons-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  flex-wrap: wrap;
  padding: 4px 0;
  background: transparent !important;
  border: none !important;
}
.cons-period {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  color: var(--ink-2);
  font-weight: 600;
  flex-shrink: 0;
  font-family: var(--font-sans);
}
.cons-arrow {
  color: var(--ink);
  font-weight: 500;
}
.cons-pct {
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}

/* Report (펼치기) */
.report-item {
  display: block !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  padding: 10px 12px !important;
  border-radius: var(--radius-sm) !important;
}
.report-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.report-title {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.1s;
}
a.report-title:hover { border-color: var(--ink); }
.report-toggle {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-2);
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font-mono);
  transition: all 0.15s;
  flex-shrink: 0;
}
.report-toggle:hover { border-color: var(--ink); color: var(--ink); }
.report-detail {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.report-item.expanded .report-detail { display: block; }
.report-keypoints {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.report-keypoints li {
  display: list-item !important;
  list-style: none !important;
  font-size: 12px;
  color: var(--ink);
  padding: 0 0 0 14px !important;
  position: relative;
  background: transparent !important;
  border: none !important;
  font-family: var(--font-sans) !important;
}
.report-keypoints li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--ink-3);
  font-size: 9px;
  top: 4px;
}
.report-summary {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 종목별 뉴스 (펼침 안에서) */
.stock-news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stock-news-item {
  background: var(--bg-card) !important;
  border: 1px solid var(--line) !important;
  padding: 10px 12px !important;
  border-radius: var(--radius-sm) !important;
  display: block !important;
  font-family: var(--font-sans) !important;
}
.stock-news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
}
.stock-news-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.4;
}
a.stock-news-title:hover { text-decoration: underline; }
.stock-news-summary {
  font-size: 12px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.5;
}

/* Mobile - consensus 1-column 스택 */
@media (max-width: 640px) {
  .cons-grid { grid-template-columns: 1fr; }
}

/* Chart wrap */
.chart-wrap {
  position: relative;
  height: 240px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  pointer-events: none;
}

/* ============================================
   Responsive
   ============================================ */
/* Tablet & below */
@media (max-width: 900px) {
  :root { --container: 100%; }
  .container { padding: 0 20px; }
  .main-content { padding: 40px 20px 60px; }
  .sector-page { padding: 24px 20px 60px; }
  .hero-title { font-size: 30px; }
  .sector-title { font-size: 32px; }
}

/* Mobile */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .container { padding: 0 16px; }
  .main-content { padding: 32px 16px 48px; }
  .sector-page { padding: 20px 16px 48px; }

  /* Header 압축 */
  .site-header .container { height: 56px; }
  .brand { gap: 10px; }
  .brand-name { font-size: 13px; }
  .brand-mark { font-size: 11px; padding: 3px 6px; }
  .meta { font-size: 11px; gap: 8px; }
  .dept { display: none; }
  .meta-divider:first-of-type { display: none; }

  /* Hero */
  .hero { margin-bottom: 36px; }
  .hero-title { font-size: 24px; }
  .hero-sub { font-size: 13px; margin-bottom: 16px; }
  .search-bar input { padding: 10px 14px; font-size: 13px; }

  /* Sector page */
  .breadcrumb { font-size: 11px; flex-wrap: wrap; }
  .sector-title { font-size: 26px; margin-bottom: 24px; }

  /* Summary box */
  .summary-box { padding: 18px 20px; margin-bottom: 32px; }
  .summary-list li { font-size: 14px; }

  /* Group / Card grid */
  .sector-groups { gap: 32px; }
  .group-title { font-size: 17px; }
  .card-grid { grid-template-columns: 1fr; gap: 8px; }
  .card { padding: 14px 16px; }
  .card-name { font-size: 16px; }

  /* Block */
  .block { margin-bottom: 32px; }
  .block-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .block-title { font-size: 17px; }
  .block-controls { width: 100%; }
  .block-search { flex: 1; min-width: 0; }

  /* News */
  .news-item { padding: 14px 16px; }
  .news-meta { flex-wrap: wrap; gap: 8px; }
  .news-title { font-size: 14px; }
  .news-summary { font-size: 13px; }

  /* US movers */
  .us-mover { padding: 12px 16px; }
  .us-mover-head { gap: 8px; }
  .us-name { font-size: 13px; }
  .us-reason { font-size: 12px; }

  /* Stock card - 2단으로 재배치 */
  .stock-summary {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px 12px;
  }
  .stock-summary::after {
    position: absolute;
    top: 12px;
    right: 14px;
  }
  .stock-card { position: relative; }
  .stock-head { gap: 8px; }
  .stock-name { font-size: 15px; }
  .stock-price {
    margin-left: 0;
  }
  .price-num { font-size: 14px; }
  .stock-counts {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
    gap: 4px;
  }
  .badge { font-size: 10px; padding: 2px 6px; }

  /* Stock detail */
  .stock-detail { padding: 16px; }
  .detail-row { margin-bottom: 20px; }
  .chart-placeholder { height: 180px; font-size: 12px; }
  .chart-tab { padding: 4px 10px; font-size: 11px; }

  /* Footer */
  .site-footer { padding: 18px 0; }
  .site-footer .container {
    flex-wrap: wrap;
    font-size: 11px;
    gap: 8px;
  }
}

/* ============================================
   v9 추가: sector return, fwd PE, has-new dot, cons line chart, global research
   ============================================ */

/* 섹터 등락률 헤더 배지 */
.sector-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sector-return-badge {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sector-return-badge .change-up,
.sector-return-badge .change-down {
  padding: 4px 10px;
  border-radius: 4px;
}
.sector-return-badge .change-up { background: var(--up-bg); color: var(--up); }
.sector-return-badge .change-down { background: var(--down-bg); color: var(--down); }
.sr-note { font-size: 10px; font-weight: 500; color: var(--ink-3); }

/* index 카드 등락률 */
.card-return {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  margin: 4px 0 6px 0;
  display: inline-block;
}
.card-return.change-up { color: var(--up); }
.card-return.change-down { color: var(--down); }

/* fwd PE */
.fwd-pe {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #999;
  margin-left: 2px;
}

/* 종목 카드 빨간점 (신규 이슈) */
.stock-card .card-new-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c0392b;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}
.stock-card.has-new {
  border-left: 3px solid #c0392b;
}

/* 컨센서스 라인차트 */
.cons-side-header {
  display: flex;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.cons-period-label {
  font-weight: 700;
  color: var(--ink);
}
.cons-latest {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-weight: 600;
}
.cons-chart {
  width: 100%;
  height: 120px;
  max-height: 120px;
}
/* Chart.js가 canvas를 wrapper 기준으로 resize하도록 */
.cons-side {
  position: relative;
  overflow: hidden;
}

/* 독점 글로벌 리서치 카테고리 태그 */
.gr-cat {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 600;
  background: #fef3e0;
  color: #b87a00;
  margin-right: 4px;
}
/* stock meta tag (시총/PE 라인) */
.stock-meta-row {
  font-size: 11px;
  color: #999;
  font-family: var(--font-mono);
  margin-left: 8px;
  white-space: nowrap;
}
.stock-meta-tag {
  color: #999;
}

/* US Earnings table */
.us-earnings-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  margin: 10px 0 4px 0;
}
.us-earnings-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.us-earnings-table th, .us-earnings-table td {
  padding: 4px 8px;
  text-align: right;
  border-bottom: 1px solid var(--line);
}
.us-earnings-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--ink-2);
  font-size: 10px;
}
.us-earnings-table th:first-child, .us-earnings-table td:first-child {
  text-align: left;
}
.us-earnings-table tr:last-child td { border-bottom: none; }

/* ============================================
   v13 추가: meta-kv, us-mover-meta-row
   ============================================ */
/* 종목 시총/PE — detail 내부 */
.stock-meta-detail-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 0 12px 0;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 14px;
}
.meta-kv {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.meta-k {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 5px;
  white-space: nowrap;
}
.meta-v {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

/* US mover meta row */
.us-mover-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}
.us-meta-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 1px 5px;
}
.us-meta-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

/* US mover meta grid — 가로 배치 */
.us-mover-meta-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

/* ============================================
   v15: 통일 detail-row-inner (US mover 내부)
   ============================================ */
.us-mover-detail {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.us-detail-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.detail-row-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-row-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.detail-row-val {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  font-weight: 600;
}
.us-news-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ============================================
   시장 데이터 (차트 2열 그리드 + 메모리 테이블)
   ============================================ */
.mkt-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.mkt-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow: hidden;
}
.mkt-chart-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.mkt-chart-unit {
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 500;
}
.mkt-chart-wrap {
  width: 100%;
  min-height: 80px;
}
.mkt-chart-latest {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.mkt-chart-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.mkt-chart-chg {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

/* 메모리 테이블 */
.mkt-tables-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.mkt-table-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.mkt-table-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  padding: 10px 14px 6px;
}
.mkt-table-update {
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 6px;
}
.mkt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.mkt-table th, .mkt-table td {
  padding: 4px 10px;
  border-top: 1px solid var(--line);
}
.mkt-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--ink-3);
  font-size: 10px;
  text-align: left;
}
.mkt-td-item {
  font-weight: 600;
  color: var(--ink);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mkt-td-num {
  font-family: var(--font-mono);
  text-align: right;
  font-weight: 600;
}
@media (max-width: 640px) {
  .mkt-charts-grid { grid-template-columns: 1fr; }
  .mkt-tables-wrap { grid-template-columns: 1fr; }
}

/* ── 시장데이터: 전일대비 카드 (v17) ── */
.mkt-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin-bottom: 14px; }
.mkt-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mkt-card[open] { border-color: var(--ink-3); }
.mkt-card-summary { display: flex; flex-direction: column; padding: 10px 14px; cursor: pointer; list-style: none; }
.mkt-card-summary::-webkit-details-marker { display: none; }
.mkt-card-title { font-size: 11px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.02em; margin-bottom: 4px; }
.mkt-card-row { display: flex; align-items: baseline; gap: 6px; }
.mkt-card-val { font-family: var(--font-mono); font-size: 18px; font-weight: 800; color: var(--ink); }
.mkt-card-unit { font-size: 10px; color: var(--ink-3); }
.mkt-card-chg { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.mkt-up .mkt-card-chg { color: var(--up); }
.mkt-down .mkt-card-chg { color: var(--down); }
.mkt-up .mkt-card-val { color: var(--up); }
.mkt-down .mkt-card-val { color: var(--down); }
.mkt-card-sub { font-size: 10px; color: var(--ink-3); margin-top: 2px; font-family: var(--font-mono); }
.mkt-card-detail { padding: 0 14px 14px; min-height: 100px; }
@media (max-width: 640px) { .mkt-cards-grid { grid-template-columns: repeat(2, 1fr); } }
.mkt-td-item { white-space: nowrap; }
.mkt-table td, .mkt-table th { white-space: nowrap; font-size: 10px; }

/* 종목 브리핑 — AI생성 디자인 */
.briefing-row {
  padding: 14px 0 14px 0;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 10px;
}
.briefing-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.7;
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, #f6f3ff 0%, #eef6ff 100%);
  border: 1px solid #e0daff;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 500;
  position: relative;
}
.briefing-text::before {
  content: '✦';
  position: absolute;
  top: -8px;
  left: 12px;
  background: #fff;
  padding: 0 6px;
  font-size: 14px;
  color: #7c6dff;
}
a.briefing-text:hover { background: linear-gradient(135deg, #ede8ff 0%, #e4f0ff 100%); border-color: #c8bfff; }
.block-sub { font-size: 10px; color: var(--ink-3); font-weight: 500; margin-left: 8px; }
