/* ========== ValueMind — Futunn Style ========== */
:root {
  --bg: #FFFFFF;
  --bg-secondary: #F8F8F8;
  --text-primary: #333333;
  --text-secondary: #999999;
  --text-muted: #BBBBBB;
  --border: #EEEEEE;
  --border-dark: #DDDDDD;
  --green: #00B074;
  --red: #FF3B30;
  --yellow: #FF9500;
  --green-bg: rgba(0,176,116,0.06);
  --red-bg: rgba(255,59,48,0.06);
  --yellow-bg: rgba(255,149,0,0.06);
  --ticker-bg: #1A1A1A;
  --font-cn: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  --font-en: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: rgba(0,176,116,0.15); }

body {
  font-family: var(--font-cn);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}

/* ===== Typography ===== */
h1, h2, h3, h4 { font-family: var(--font-cn); font-weight: 600; }
.font-mono, .mono { font-family: var(--font-mono); }
.font-en { font-family: var(--font-en); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }
.text-muted { color: var(--text-secondary); }
.text-light { color: var(--text-muted); }

/* ===== Layout ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== Ticker Tape ===== */
.ticker-tape {
  background: var(--ticker-bg);
  color: rgba(255,255,255,0.9);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 0;
  overflow: hidden;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 100;
}
.ticker-scroll {
  display: inline-block;
  animation: tickerScroll 50s linear infinite;
}
.ticker-scroll:hover { animation-play-state: paused; }
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.ticker-item .label { color: rgba(255,255,255,0.45); }
.ticker-item .price { font-weight: 500; }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 30px;
  z-index: 90;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: between;
  height: 50px;
}
.header-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.header-right { display: flex; align-items: center; gap: 16px; }
.logo { font-size: 18px; font-weight: 700; letter-spacing: -0.5px; }
.date-display { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); }

/* Language Toggle */
.lang-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 2px;
  padding: 2px;
}
.lang-btn {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}
.lang-btn.active {
  background: var(--text-primary);
  color: #fff;
}

/* ===== Main Tabs ===== */
.main-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.main-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.main-tab:hover { color: var(--text-primary); }
.main-tab.active {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--text-primary);
}

/* ===== Page Content ===== */
.page { padding: 24px 0; display: none; }
.page.active { display: block; }

/* ===== Section Headers ===== */
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}
.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.section-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ===== Market Snapshot Grid ===== */
.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.snapshot-item {
  background: var(--bg);
  padding: 12px 8px;
  text-align: center;
}
.snapshot-item .name { font-size: 12px; color: var(--text-secondary); margin-bottom: 2px; }
.snapshot-item .value { font-size: 15px; font-weight: 700; font-family: var(--font-mono); }
.snapshot-item .change { font-size: 12px; font-weight: 500; }

/* ===== Sentiment Bar ===== */
.sentiment-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--bg);
  margin-bottom: 24px;
}
.sentiment-label { font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.sentiment-value { font-size: 18px; font-weight: 700; font-family: var(--font-mono); }
.sentiment-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.sentiment-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
}

/* ===== Divider ===== */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ===== News List ===== */
.news-list {
  border: 1px solid var(--border);
  background: var(--bg);
}
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--bg-secondary); }
.news-time {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  flex-shrink: 0;
  width: 50px;
  padding-top: 2px;
}
.news-content { flex: 1; }
.news-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  text-decoration: none;
  display: block;
}
.news-title:hover { color: var(--green); }
a.news-title { cursor: pointer; }
.news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.news-source { font-size: 12px; color: var(--text-secondary); }
.news-tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 2px;
  font-weight: 500;
}
.tag-positive { background: var(--green-bg); color: var(--green); }
.tag-negative { background: var(--red-bg); color: var(--red); }
.tag-neutral { background: var(--yellow-bg); color: var(--yellow); }
.tag-default { background: #F0F0F0; color: var(--text-secondary); }

/* ===== Impact Table ===== */
.impact-table {
  width: 100%;
  border: 1px solid var(--border);
  border-collapse: collapse;
  font-size: 14px;
}
.impact-table th {
  background: var(--bg-secondary);
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.impact-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.impact-table tr:last-child td { border-bottom: none; }

/* ===== Value Investor Card ===== */
.vi-card {
  border: 2px solid var(--text-primary);
  padding: 20px;
  margin-bottom: 20px;
}
.vi-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.vi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.vi-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 14px;
}
.vi-box-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* ===== Signal Wall ===== */
.master-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.master-btn {
  padding: 6px 20px;
  border-radius: 2px;
  border: 1px solid var(--border-dark);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.master-btn:hover { border-color: var(--text-primary); color: var(--text-primary); }
.master-btn.active {
  background: var(--text-primary);
  color: #fff;
  border-color: var(--text-primary);
}

.signal-card {
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.signal-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.signal-card-clickable {
  cursor: pointer;
  user-select: none;
}
.signal-card-clickable:active {
  transform: scale(0.99);
  box-shadow: none;
}
.signal-card.type-green { border-left: 3px solid var(--green); }
.signal-card.type-yellow { border-left: 3px solid var(--yellow); }
.signal-card.type-red { border-left: 3px solid var(--red); }
.signal-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.signal-title { font-size: 14px; font-weight: 500; margin-bottom: 6px; line-height: 1.5; }
.signal-quote { font-size: 13px; color: var(--text-secondary); font-style: italic; line-height: 1.5; }
.signal-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.btn-analyze {
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 500;
  background: var(--text-primary);
  color: #fff;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-analyze:hover { opacity: 0.85; }

.signal-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 10px;
}
.signal-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ===== Deep Analysis ===== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.search-input {
  flex: 1;
  border: 1px solid var(--border);
  padding: 10px 16px;
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--text-primary); }
.btn-search {
  padding: 10px 24px;
  background: var(--text-primary);
  color: #fff;
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-search:hover { opacity: 0.85; }

/* Ticker Suggestions */
.ticker-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.ticker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-mono);
}
.ticker-chip:hover {
  border-color: var(--text-primary);
  background: #fff;
}
.ticker-chip-symbol {
  font-weight: 600;
  color: var(--text-primary);
}

/* Quote Header */
.quote-header {
  border: 1px solid var(--border);
  background: var(--bg);
}
.quote-main {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
}
.quote-symbol { font-size: 28px; font-weight: 700; letter-spacing: -1px; }
.quote-exchange { font-size: 10px; color: var(--text-secondary); font-family: var(--font-mono); background: var(--bg-secondary); padding: 2px 8px; border: 1px solid var(--border); margin-left: 10px; }
.quote-name { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.quote-price { font-size: 32px; font-weight: 700; font-family: var(--font-mono); text-align: right; }
.quote-change { font-size: 14px; font-weight: 600; font-family: var(--font-mono); }

.quote-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--border);
}
.quote-stat {
  padding: 8px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.quote-stat:last-child { border-right: none; }
.quote-stat-label { font-size: 11px; color: var(--text-secondary); }
.quote-stat-value { font-size: 13px; font-weight: 600; font-family: var(--font-mono); }

/* Deep Sub Tabs */
.deep-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  overflow-x: auto;
}
.deep-tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}
.deep-tab:hover { color: var(--text-primary); }
.deep-tab.active {
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--text-primary);
}

.deep-content {
  border: 1px solid var(--border);
  border-top: none;
  background: var(--bg);
  padding: 20px;
}
.deep-panel { display: none; }
.deep-panel.active { display: block; }

/* AI Summary Box */
.ai-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
}
.ai-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  background: var(--text-primary);
  color: #fff;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.ai-text { font-size: 14px; line-height: 1.7; color: #555; }

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.metric-box {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: center;
}
.metric-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.metric-value { font-size: 18px; font-weight: 700; font-family: var(--font-mono); }
.metric-note { font-size: 12px; margin-top: 2px; }

/* 52-Week Range */
.range-bar { padding: 14px; border: 1px solid var(--border); margin-bottom: 16px; }
.range-track { height: 4px; background: var(--border); position: relative; margin: 8px 0; }
.range-fill { height: 4px; background: rgba(0,0,0,0.15); position: absolute; top: 0; left: 0; }
.range-marker {
  width: 10px; height: 10px;
  background: var(--text-primary);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Stats Two-Column */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.stats-box { border: 1px solid var(--border); padding: 14px; }
.stats-box-title { font-size: 12px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-bottom: 10px; }
.stat-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.stat-label { color: var(--text-secondary); }
.stat-value { font-family: var(--font-mono); font-weight: 600; }

/* Chart */
.chart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.chart-period-btn {
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
}
.chart-period-btn:hover { background: var(--bg-secondary); }
.chart-period-btn.active { background: var(--text-primary); color: #fff; }

.chart-legend { display: flex; gap: 12px; font-size: 10px; color: var(--text-secondary); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; }

/* SVG Chart */
.chart-grid-line { stroke: var(--border); stroke-width: 0.5; }
.candle-up { fill: var(--green); stroke: var(--green); }
.candle-down { fill: var(--red); stroke: var(--red); }
.candle-wick { stroke-width: 1; }
.volume-bar-up { fill: rgba(0,176,116,0.2); }
.volume-bar-down { fill: rgba(255,59,48,0.2); }
.sparkline { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Value Analysis */
.checklist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: var(--bg-secondary);
  font-size: 13px;
}
.check-icon { color: var(--green); font-weight: 700; }

.question-item {
  border-left: 3px solid var(--border);
  padding: 10px 14px;
  margin-bottom: 6px;
}
.question-item.positive { border-left-color: var(--green); background: var(--green-bg); }
.question-item.uncertain { border-left-color: var(--yellow); background: var(--yellow-bg); }
.question-item.negative { border-left-color: var(--red); background: var(--red-bg); }
.question-header { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.question-answer { font-size: 13px; color: #666; }

.cross-item {
  border-left: 3px solid var(--border);
  padding: 10px 14px;
  background: var(--bg-secondary);
  margin-bottom: 6px;
}
.cross-name { font-size: 14px; font-weight: 600; }
.cross-verdict { font-size: 12px; padding: 2px 8px; border-radius: 2px; font-weight: 500; }
.cross-quote { font-size: 13px; color: #888; font-style: italic; margin-top: 4px; line-height: 1.5; }

.verdict-box {
  border: 2px solid var(--text-primary);
  padding: 16px;
}
.verdict-code {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 12px;
}
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  text-align: center;
}
.verdict-cell {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 8px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.about-section {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

/* ===== Last Updated ===== */
.last-updated {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-align: right;
  padding: 8px 0;
}

/* Section heading (h2 level) */
.section-heading {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Signal group */
.signal-group-text { font-size: 14px; font-weight: 600; }
.signal-group-count { font-size: 13px; }
.signal-ticker { font-size: 12px; }

/* VI card values */
.vi-temp-value { font-size: 24px; font-weight: 700; }
.vi-temp-unit { font-size: 13px; }
.vi-action { font-size: 16px; font-weight: 700; }
.vi-note { font-size: 13px; }
.vi-commentary { font-size: 14px; line-height: 1.7; color: #555; }

/* ===== Responsive ===== */
/* Hide on mobile */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
  .snapshot-grid { grid-template-columns: repeat(3, 1fr); }
  .vi-grid { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
  .quote-main { flex-direction: column; gap: 12px; }
  .quote-price { text-align: left; }
  .quote-stats { grid-template-columns: repeat(3, 1fr); }
  .checklist-grid { grid-template-columns: repeat(2, 1fr); }
  .verdict-grid { grid-template-columns: repeat(3, 1fr); }
  .container { padding: 0 12px; }
  .header-inner { height: 44px !important; }
  .logo { font-size: 16px; }
  .main-tab { padding: 8px 14px; font-size: 12px; }
  .search-bar { flex-direction: column; }
  .search-input { width: 100%; }
  .btn-search { width: 100%; text-align: center; }
  .quote-symbol { font-size: 22px; }
  .quote-price { font-size: 24px; }
  .deep-tab { padding: 8px 12px; font-size: 11px; }
  .master-selector { flex-wrap: wrap; }
  .master-btn { padding: 5px 14px; font-size: 12px; }
  .signal-card { padding: 12px; }
  .vi-card { padding: 14px; }
  .vi-box { padding: 10px; }
  .section-title { font-size: 18px; }
  .sentiment-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .impact-table { font-size: 12px; }
  .impact-table th, .impact-table td { padding: 8px 10px; }
  .news-list { font-size: 12px; }
  .ticker-tape { font-size: 11px; }
  .header { top: 28px; }
}
@media (max-width: 480px) {
  .snapshot-grid { grid-template-columns: repeat(3, 1fr); }
  .quote-stats { grid-template-columns: repeat(3, 1fr); }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 8px; }
}

/* ===== Utility Classes ===== */
.text-10 { font-size: 10px; }
.text-11 { font-size: 11px; }
.text-12 { font-size: 12px; }
.text-13 { font-size: 13px; }
.text-14 { font-size: 14px; }
.text-16 { font-size: 16px; }
.text-18 { font-size: 18px; }
.text-20 { font-size: 20px; }
.text-22 { font-size: 22px; }
.text-24 { font-size: 24px; }
.text-28 { font-size: 28px; }
.text-32 { font-size: 32px; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.uppercase { text-transform: uppercase; }
.ls-1 { letter-spacing: 1px; }
.ls-05 { letter-spacing: 0.5px; }
.lh-16 { line-height: 1.6; }
.lh-18 { line-height: 1.8; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mb-2 { margin-bottom: 2px; }
.mb-4 { margin-bottom: 4px; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.pt-20 { padding-top: 20px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Section number badge (01, 02, 03...) */
.section-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--yellow);
}
.section-num-lg {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--yellow);
}

/* ===== Additional Component Classes ===== */
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.snapshot-grid-5 { grid-template-columns: repeat(5, 1fr); }
.analysis-section { border: 1px solid var(--border); padding: 16px; }
.cross-green { border-left-color: var(--green); }
.cross-yellow { border-left-color: var(--yellow); }
.cross-red { border-left-color: var(--red); }
.chart-svg { width: 100%; max-height: 320px; }
.legend-green { background: var(--green); }
.legend-yellow { background: var(--yellow); }
.valuation-thermo { height: 6px; background: var(--border); position: relative; border-radius: 3px; overflow: visible; }
.valuation-thermo-track { position: absolute; inset: 0; display: flex; border-radius: 3px; overflow: hidden; }
.valuation-thermo-green { flex: 1; background: var(--green-bg); }
.valuation-thermo-yellow { flex: 1; background: var(--yellow-bg); }
.valuation-thermo-red { flex: 1; background: var(--red-bg); }
.vi-commentary { color: #555; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 50px; }

/* ===== Headline Summary ===== */
.headline-summary {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: none;
  padding: 16px;
}
.headline-summary-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.headline-summary-text {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
}
.headline-summary-text strong { color: var(--text-primary); }

/* Sector Tags */
.sector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
}
.sector-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg);
  transition: all 0.15s;
}
.sector-tag:hover { border-color: var(--text-primary); }
.sector-tag .sector-dot { width: 6px; height: 6px; border-radius: 50%; }
.sector-tag-hot { border-color: var(--red); }
.sector-tag-hot .sector-dot { background: var(--red); }
.sector-tag-active { border-color: var(--green); }
.sector-tag-active .sector-dot { background: var(--green); }
.sector-tag-neutral .sector-dot { background: var(--yellow); }

/* ===== Earnings Panel ===== */
.earnings-header {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.earnings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.earnings-item {
  border: 1px solid var(--border);
  padding: 14px;
  background: var(--bg);
}
.earnings-metric {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.earnings-val {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.earnings-val span { font-size: 14px; font-weight: 600; }
.earnings-beat {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.earnings-note {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}
.earnings-guidance, .earnings-highlight, .earnings-risk {
  padding: 10px 14px;
  border-left: 3px solid var(--border);
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}
.earnings-guidance { border-left-color: var(--green); background: var(--green-bg); }
.earnings-highlight { border-left-color: var(--yellow); background: var(--yellow-bg); }
.earnings-risk { border-left-color: var(--red); background: var(--red-bg); }

/* ===== Financial Health ===== */
.fin-health-grid {
  border: 1px solid var(--border);
  padding: 12px;
  margin-bottom: 12px;
}
.fin-health-summary {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

/* ===== Moat Analysis ===== */
.moat-header {
  font-size: 16px;
  margin-bottom: 8px;
}
.moat-type {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.moat-analysis {
  font-size: 14px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 12px;
}
.moat-risk {
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 14px;
  background: var(--red-bg);
  border-left: 3px solid var(--red);
}

/* ===== Valuation Methods ===== */
.valuation-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.val-method {
  border: 1px solid var(--border);
  padding: 14px;
}
.val-method-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.val-method-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.val-method-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.val-method-note {
  font-size: 12px;
  line-height: 1.4;
}
.val-margin {
  font-size: 14px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  line-height: 1.6;
}
.val-verdict {
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  line-height: 1.6;
}

/* ===== Responsive additions ===== */
@media (max-width: 768px) {
  .earnings-grid { grid-template-columns: 1fr; }
  .valuation-methods { grid-template-columns: 1fr; }
}

/* ===== Animation ===== */
.fade-in {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 13px;
}
.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
