/* stock.css — 個股 SEO 頁 /stock/{symbol} 樣式。
   對外站 CSP style-src 'self' 涵蓋此同源外部檔（無需 hash）；頁面禁任何 inline style。
   設計 token 對齊 board.css / landing.css（深色 #07070b / accent #2563ff / 多空紅綠黃）。字級一律 >=16px。 */

:root {
  --bg: #07070b;
  --surface: #0e0e15;
  --surface-2: #14141d;
  --hairline: rgba(216, 218, 224, 0.09);
  --text: #d8dae0;
  --text-2: #b0b4c0;
  --text-3: #80849a;
  --accent: #2563ff;
  --accent-2: #4f7bff;
  --accent-glow: rgba(37, 99, 255, 0.40);
  --accent-tint: rgba(37, 99, 255, 0.14);
  --long: #ff3b5c;
  --short: #00d97e;
  --neutral: #8a90a6;
  --diverge: #f5b83d;
  --font-display: "Space Grotesk", "Inter", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-sans: "Inter", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(ellipse 1200px 600px at 50% -200px, var(--accent-tint), transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color-scheme: dark;
}
a { color: inherit; text-decoration: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============ topbar（對齊 board / landing） ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 32px;
  background: rgba(7, 7, 11, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--hairline);
}
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; box-shadow: 0 4px 16px var(--accent-glow);
}
.logo-name {
  background: linear-gradient(120deg, var(--text) 35%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.topnav { display: flex; gap: 4px; margin-left: 14px; }
.topnav a { font-size: 16px; color: var(--text-3); padding: 8px 13px; border-radius: 8px; transition: color .15s, background .15s; }
.topnav a:hover { color: var(--text); background: var(--surface-2); }
.spacer { flex: 1; }
.btn-ghost {
  font-size: 16px; color: var(--text-2); padding: 9px 18px;
  border: 1px solid var(--hairline); border-radius: 10px; transition: border-color .15s, color .15s;
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--text); }
.btn-cta {
  font-size: 16px; font-weight: 600; color: #fff; padding: 9px 20px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 18px var(--accent-glow); transition: transform .15s, box-shadow .15s;
}
.btn-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--accent-glow); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }
main { padding: 34px 0 60px; }

/* ============ 頁首 ============ */
.crumb { font-size: 16px; color: var(--text-3); margin-bottom: 16px; }
.crumb a { color: var(--accent-2); }
.crumb a:hover { text-decoration: underline; }
.stock-head { margin-bottom: 24px; }
.stock-head h1 {
  font-family: var(--font-display); font-size: clamp(26px, 4vw, 38px);
  line-height: 1.25; letter-spacing: -0.01em; font-weight: 700;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.s-code {
  font-family: var(--font-mono); font-size: clamp(20px, 3vw, 28px);
  color: var(--accent-2); font-weight: 600;
}
.meta-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.mchip {
  font-size: 16px; color: var(--text-2); padding: 5px 14px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--hairline);
}
.mchip.long { color: var(--long); }
.mchip.short { color: var(--short); }
.mchip.neutral { color: var(--text-2); }
.lead { font-size: 17px; color: var(--text-2); margin-top: 16px; max-width: 720px; }

/* ============ section 共用 ============ */
.stock-sec { margin-bottom: 40px; }
.sec-h {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.empty { font-size: 16px; color: var(--text-3); }
.chip { font-size: 16px; font-weight: 600; padding: 3px 13px; border-radius: 999px; white-space: nowrap; }
.chip.long { color: var(--long); background: rgba(255, 59, 92, 0.12); }
.chip.short { color: var(--short); background: rgba(0, 217, 126, 0.10); }
.chip.neutral { color: var(--text-2); background: rgba(138, 144, 166, 0.14); }

/* ============ 提及時間線 table ============ */
table.stock { width: 100%; border-collapse: collapse; }
table.stock th {
  text-align: left; font-size: 16px; font-weight: 600; color: var(--text-3);
  padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: bottom;
}
table.stock td { padding: 14px 12px; border-bottom: 1px solid var(--hairline); font-size: 17px; vertical-align: middle; }
table.stock tr:last-child td { border-bottom: 0; }
.tl-date { font-family: var(--font-mono); font-size: 16px; white-space: nowrap; }
.tl-date .board-link { color: var(--accent-2); }
.tl-date .board-link:hover { text-decoration: underline; }
.mention { font-size: 16px; color: var(--text-3); white-space: nowrap; }
.dist { display: flex; flex-wrap: wrap; gap: 8px; }
.dchip { font-size: 16px; font-weight: 600; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.dchip.long { color: var(--long); background: rgba(255, 59, 92, 0.12); }
.dchip.short { color: var(--short); background: rgba(0, 217, 126, 0.10); }
.dchip.neutral { color: var(--text-2); background: rgba(138, 144, 166, 0.14); }

/* ============ 觀點卡 ============ */
.op-list { display: flex; flex-direction: column; gap: 14px; }
.op-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 18px 20px;
}
.op-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.op-channel { font-size: 17px; font-weight: 600; color: var(--text); }
.op-date { font-family: var(--font-mono); font-size: 16px; color: var(--text-3); margin-left: auto; }
.op-thesis { font-size: 17px; color: var(--text-2); line-height: 1.7; }
.op-locked {
  font-size: 16px; color: var(--text-3); line-height: 1.7;
  background: rgba(245, 184, 61, 0.05); border: 1px dashed rgba(245, 184, 61, 0.35);
  border-radius: 10px; padding: 12px 16px;
}
.lock-cta { color: var(--accent-2); margin-left: 8px; }
.lock-cta:hover { text-decoration: underline; }
.op-none { font-size: 16px; color: var(--text-3); font-style: italic; }
.more-hint { font-size: 16px; color: var(--text-3); margin-top: 14px; }

/* ============ 延伸 CTA ============ */
.stock-cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 36px; }
.stock-cta .btn-ghost, .stock-cta .btn-cta { font-size: 16px; padding: 12px 22px; border-radius: 12px; }

/* ============ 免責 + footer ============ */
.disclaimer-sec { padding: 8px 0 0; }
.disclaimer-card {
  max-width: 760px; padding: 18px 22px;
  border: 1px solid rgba(245, 184, 61, 0.35); border-left: 4px solid var(--diverge);
  border-radius: 12px; background: rgba(245, 184, 61, 0.05);
  font-size: 16px; color: var(--text-2);
}
.disclaimer-card b { color: var(--text); }
footer { border-top: 1px solid var(--hairline); padding: 34px 0; margin-top: 40px; }
.foot-bottom {
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  font-size: 16px; color: var(--text-3);
}
.foot-bottom .copy { margin-left: auto; }

/* ============ RWD ============ */
@media (max-width: 640px) {
  .topnav { display: none; }
  .wrap { padding: 0 20px; }
  .topbar { padding: 14px 20px; }
  main { padding: 24px 0 44px; }
  .foot-bottom .copy { margin-left: 0; }
  .op-date { margin-left: 0; }
  /* 手機藏「提及頻道」次要欄，保核心（日期 + 多空分佈） */
  table.stock th:nth-child(2), table.stock td:nth-child(2) { display: none; }
}
