/* ============================================================
   kabuyohou テーマ — Bloomberg Terminal 日本語版
   コンセプト: 「投資家の深夜の作業部屋」ダーク金融ターミナル
   読み込み順: theme.css → components.css → pt-{page_type}.css
   ============================================================ */

:root {
  /* ── コアカラー（既存変数名を維持・後方互換） ── */
  --bg-primary:    #0f1117;
  --bg-secondary:  #1a1d27;
  --bg-tertiary:   #252836;
  --text-primary:  #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:    #64748b;

  /* ── セマンティックカラー（Stitch DESIGN.md準拠 — 全サイト共通） ── */
  --color-status-positive: #3fb950;  /* 上昇・推奨・合格 */
  --color-status-negative: #f85149;  /* 下落・警告・リスク */
  --color-status-neutral:  #d29922;  /* 中立市場・注意（黄アンバー） */

  /* アクセントカラー（後方互換エイリアス） */
  --positive:      var(--color-status-positive);  /* ← #3fb950 */
  --positive-bg:   #052e16;
  --negative:      var(--color-status-negative);  /* ← #f85149 */
  --negative-bg:   #2d0a0a;
  --neutral:       #94a3b8;  /* グレーニュートラル（color-status-neutralとは別物）*/
  --accent:        #3b82f6;
  --accent-hover:  #2563eb;
  --accent-dark:   #1e40af;

  /* センチメントゲージ用 */
  --bullish:            #22c55e;
  --slightly-bullish:   #86efac;
  --sentiment-neutral:  #fbbf24;
  --slightly-bearish:   #fb923c;
  --bearish:            #ef4444;

  /* ── 新フレームワーク変数 ── */
  --surface:         rgba(255,255,255,0.04);
  --border-color:    rgba(255,255,255,0.08);
  --shadow-sm:       rgba(0,0,0,0.2);
  --shadow-md:       rgba(0,0,0,0.3);
  --shadow-lg:       rgba(0,0,0,0.5);

  --header-bg:       #0f1117;
  --header-height:   56px;
  --logo-color:      #3b82f6;
  --footer-bg:       #0a0d14;
  --footer-text:     #64748b;

  --table-header-bg:   #1d2233;
  --table-header-text: #e2e8f0;
  --highlight-row-bg:  rgba(59,130,246,0.08);
  --card-bg:           #1a1d27;
  --badge-bg:          rgba(255,255,255,0.08);
  --star-color:        #f5a623;

  --cta-bg:     linear-gradient(135deg, #3b82f6, #1d4ed8);
  --cta-text:   #fff;
  --cta-shadow: rgba(59,130,246,0.35);
  --cta-block-start: #0a1628;
  --cta-block-end:   #1e3a5f;

  --char-comment-bg:   rgba(59,130,246,0.06);
  --accent-light-bg:   rgba(59,130,246,0.08);
  --accent-border:     rgba(59,130,246,0.2);
  --accent-fade:       rgba(59,130,246,0.12);

  --hero-gradient: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,0.12) 0%, transparent 70%);

  /* ターミナル風 */
  --terminal-green: #00d4aa;
  --terminal-border: #30363d;

  /* ── レビューページ用 ── */
  --rv-max-w:   760px;

  /* ── 等幅フォント（金融数値・データ表示用） ── */
  --font-mono: 'Consolas', 'Courier New', 'SFMono-Regular', monospace;

  /* ── タイポグラフィ ── */
  --font-body:    'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Noto Sans JP', -apple-system, sans-serif;
  --line-height:  1.7;

  /* ── 8pxグリッドスペーシング（Stitch DESIGN.md準拠） ── */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-7: 3.5rem;   /* 56px */
  --space-8: 4rem;     /* 64px */

  /* ── スペーシング（既存変数） ── */
  --radius:       8px;
  --radius-sm:    4px;
  --radius-full:  9999px;
  --max-width:    1200px;
  --max-width-narrow: 860px;
  --container-pad: 24px;
}

/* ── 静的ページ（static-body）— ライトテーマ変数上書き ── */
/* 記事・ガイドページは白背景 + WCAG AA準拠カラーでオーバーライド */
.static-body {
  /* 背景・テキスト: ダークテーマ変数をライト値に上書き（FAQなどコンポーネントが継承する） */
  --bg-primary:    #ffffff;
  --bg-secondary:  #f8fafc;   /* FAQアイテム背景・テーブルhover等 */
  --bg-tertiary:   #f1f5f9;
  --text-primary:  #1e293b;   /* 白背景で約15:1 */
  --text-secondary: #475569;  /* 白背景で約6.5:1 WCAG AA確保 */
  --text-muted:    #64748b;   /* 補足テキスト */
  --border-color:  #e2e8f0;
  /* リンク・アクセント: 白背景で WCAG AA準拠（コントラスト比 約7:1） */
  --accent:       #3b5bdb;
  --accent-hover: #2b4bc0;
  --accent-dark:  #1e40af;
  /* 金融データ: セマンティック色を明環境向けに調整 */
  --color-status-positive: #16a34a;
  --color-status-negative: #dc2626;
  --color-status-neutral:  #d97706;
}

/* ── ターミナル風見出しの追加スタイル ── */
.terminal-heading {
  font-family: 'Consolas', 'Courier New', 'SFMono-Regular', monospace;
  color: var(--terminal-green);
  letter-spacing: 0.06em;
}
.terminal-heading::before { content: '> '; opacity: 0.5; }

/* ── みくターミナルカード（日次レポート用） ── */
.miku-terminal-card {
  background: #0d1117;
  border: 1px solid var(--terminal-border);
  border-left: 3px solid var(--terminal-green);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #d1fae5;
}
.miku-terminal-label {
  font-size: 0.68rem;
  color: var(--terminal-green);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.miku-terminal-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--terminal-green);
  animation: blink 1.5s ease-in-out infinite;
}

/* みくコメントボックス（既存クラス、オーバーライド） */
.miku-comment-box,
.miku-comment-section {
  background: rgba(0,212,170,0.05);
  border-left: 3px solid var(--terminal-green);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-primary);
}

/* ── マーケットスナップバー ── */
.market-snapshot-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.78rem;
}
.market-snapshot-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  gap: 24px;
  overflow-x: auto;
  align-items: center;
}
.market-snap-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.market-snap-name { color: var(--text-muted); font-size: 0.7rem; }
.market-snap-val { color: var(--text-primary); font-weight: 700; }
.market-snap-chg.up  { color: var(--positive); }
.market-snap-chg.down { color: var(--negative); }

/* ── サイトロゴ（terminal感） ── */
.site-logo {
  font-family: 'Consolas', 'Courier New', monospace;
  letter-spacing: 0.04em;
}
