/* ==========================================================================
   新手股票看板 · 样式
   设计原则：大字号、大间距、结论用颜色+图标双重强调，不做花哨图表。
   ========================================================================== */

:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #14181f;
  --text-2: #4b5563;
  --muted: #8b93a1;
  --line: #e6e9ef;
  --line-2: #f1f3f7;

  --up: #e02f2f;      /* 涨 / 看多 */
  --down: #0a9e6e;    /* 跌 / 看空 */
  --wait: #e08600;    /* 等回调 */
  --watch: #6b7280;   /* 观望 */
  --avoid: #475569;   /* 回避 */

  --up-bg: #fdeceb;
  --down-bg: #e8f7f1;
  --wait-bg: #fdf3e2;
  --watch-bg: #f0f1f4;
  --avoid-bg: #eceff3;

  --brand: #111827;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 14px; }

/* ------------------------------ 顶栏 ------------------------------ */

.topbar {
  background: var(--brand);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-logo { font-size: 24px; line-height: 1; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 17px; letter-spacing: .3px; }
.brand-text small { font-size: 12px; color: #9aa4b2; }

/* ------------------------------ 搜索 ------------------------------ */

.searchwrap { position: relative; margin: 16px 0 14px; }

.searchbox {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0 12px;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.searchbox:focus-within { border-color: var(--brand); }
.sicon { font-size: 16px; opacity: .55; }

#q {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 16px;                     /* >=16px 防止 iOS 自动放大 */
  font-family: inherit;
  color: var(--text);
  padding: 15px 0;
  min-width: 0;
}
#q::-webkit-search-cancel-button { display: none; }
#q::placeholder { color: var(--muted); font-size: 14px; }

.clear {
  border: 0; background: #eef1f6; color: var(--text-2);
  width: 26px; height: 26px; border-radius: 50%;
  font-size: 17px; line-height: 1; cursor: pointer; padding: 0;
  flex: none;
}
.clear:active { background: #dfe3ea; }

.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  background: var(--card); border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(16, 24, 40, .28);
  overflow: hidden; z-index: 40;
  max-height: 60vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sg-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; cursor: pointer; border-bottom: 1px solid var(--line-2);
}
.sg-item:last-child { border-bottom: 0; }
.sg-item:active, .sg-item.on { background: #f6f8fb; }
.sg-code { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; width: 62px; flex: none; }
.sg-name { font-weight: 600; flex: 1; }
.sg-type {
  font-size: 11px; color: var(--muted);
  background: #f2f4f8; border-radius: 6px; padding: 2px 6px; flex: none;
}

/* ------------------------------ 卡片 ------------------------------ */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card.warm { background: linear-gradient(180deg, #fffdf6, #fff); border: 1px solid #f1e6cd; }

.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 16px; margin: 0; letter-spacing: .2px; }
.card-note { font-size: 12px; color: var(--muted); flex: none; }

.tip { font-size: 13px; color: var(--text-2); margin: 12px 0 0; }
.tip b { color: var(--text); }

/* ------------------------------ 大盘 ------------------------------ */

.indexes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ix {
  border-radius: 12px; padding: 10px 8px; text-align: center;
  background: #f7f8fb; border: 1px solid var(--line-2);
}
.ix-name { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.ix-price { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.ix-chg { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 1px; }

/* ------------------------------ 精选列表 ------------------------------ */

.board { display: flex; flex-direction: column; }
.brow {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 4px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; font-family: inherit; font-size: 15px; color: inherit;
}
.brow:last-child { border-bottom: 0; }
.brow:active { background: #f6f8fb; }
.brow-main { flex: 1; min-width: 0; }
.brow-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.brow-code { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.brow-right { text-align: right; flex: none; display: flex; align-items: center; gap: 10px; }
.brow-price { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; }

.pill {
  display: inline-block; font-size: 12.5px; font-weight: 700;
  padding: 4px 9px; border-radius: 8px; white-space: nowrap;
}
.pill-mini {
  display: inline-block; font-size: 12px; font-weight: 700; font-style: normal;
  padding: 1px 7px; border-radius: 6px; white-space: nowrap;
}
.tone-buy   { background: var(--up-bg);    color: var(--up); }
.tone-wait  { background: var(--wait-bg);  color: var(--wait); }
.tone-watch { background: var(--watch-bg); color: var(--watch); }
.tone-avoid { background: var(--avoid-bg); color: var(--avoid); }

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }

/* ------------------------------ 个股结果 ------------------------------ */

.backbar { margin: 14px 0 10px; }
.backbtn {
  border: 0; background: var(--card); color: var(--text-2);
  padding: 9px 14px; border-radius: 10px; font-size: 14px; font-family: inherit;
  cursor: pointer; box-shadow: var(--shadow); font-weight: 600;
}
.backbtn:active { background: #f0f2f6; }

.stock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stock-title { font-size: 21px; font-weight: 700; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stock-sub { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }
.stock-price { text-align: right; }
.stock-price .p { font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.8px; line-height: 1.15; }
.stock-price .c { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 结论横幅 —— 全站最重要的元素 */
.verdict {
  margin-top: 14px; border-radius: 14px; padding: 15px 16px;
  display: flex; align-items: flex-start; gap: 12px;
}
.verdict.tone-buy   { background: var(--up-bg);    border: 1.5px solid #f6c9c6; }
.verdict.tone-wait  { background: var(--wait-bg);  border: 1.5px solid #f2ddb4; }
.verdict.tone-watch { background: var(--watch-bg); border: 1.5px solid #dcdfe6; }
.verdict.tone-avoid { background: var(--avoid-bg); border: 1.5px solid #d5dae1; }

.verdict-icon { font-size: 26px; line-height: 1.1; flex: none; }
.verdict-body { flex: 1; min-width: 0; }
.verdict-label { font-size: 25px; font-weight: 800; letter-spacing: 1px; line-height: 1.2; }
.verdict.tone-buy   .verdict-label { color: var(--up); }
.verdict.tone-wait  .verdict-label { color: var(--wait); }
.verdict.tone-watch .verdict-label { color: var(--watch); }
.verdict.tone-avoid .verdict-label { color: var(--avoid); }
.verdict-headline { font-size: 14.5px; margin-top: 6px; color: var(--text); line-height: 1.65; }

.scoreline { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.scoreline .lab { font-size: 12.5px; color: var(--text-2); flex: none; }
.bar { flex: 1; height: 7px; border-radius: 99px; background: #dfe3ea; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(.3,.9,.3,1); }
.bar > i.tone-buy { background: var(--up); }
.bar > i.tone-wait { background: var(--wait); }
.bar > i.tone-watch { background: var(--watch); }
.bar > i.tone-avoid { background: var(--avoid); }
.scoreline .val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }

/* 走势图 */
.chartcard { margin-top: 16px; }
.chart-title { font-size: 13px; color: var(--text-2); margin-bottom: 6px; display: flex; justify-content: space-between; }
.chart-title .rng { font-variant-numeric: tabular-nums; color: var(--muted); }
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; height: 132px; }
.chart-axis {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 3px;
}
.chart-cap { font-size: 11.5px; color: var(--muted); margin-top: 6px; text-align: center; }
.chart-cap i { font-style: normal; }
.chart-cap .k1 { color: var(--text-2); font-weight: 700; }
.chart-cap .k2 { color: #b9bfc9; font-weight: 700; }

/* 三个关键价格 */
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.key {
  border-radius: 12px; padding: 11px 9px; text-align: center;
  background: #f7f8fb; border: 1px solid var(--line-2);
}
.key .k-lab { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.key .k-val { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.key .k-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.key.buy  .k-val { color: var(--up); }
.key.stop .k-val { color: var(--down); }
.key.tgt  .k-val { color: var(--wait); }

/* 步骤 */
.sect { margin-top: 20px; }
.sect h3 { font-size: 15px; margin: 0 0 9px; letter-spacing: .2px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: st; }
.steps li {
  position: relative; padding: 10px 0 10px 34px; border-bottom: 1px dashed var(--line);
  font-size: 14.5px; line-height: 1.7; counter-increment: st;
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(st);
  position: absolute; left: 0; top: 11px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 12.5px; font-weight: 700; line-height: 22px; text-align: center;
}

/* 理由 */
.reasons { margin: 0; padding: 0; list-style: none; }
.reasons li {
  display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px dashed var(--line);
  font-size: 14.5px; line-height: 1.72;
}
.reasons li:last-child { border-bottom: 0; }
.reasons .ri { flex: none; font-size: 15px; line-height: 1.5; }
.reasons li.good .rt { color: var(--text); }
.reasons li.warn .rt { color: var(--text); }
.reasons li.bad  .rt { color: var(--text); }

/* 关键数字 */
.kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; margin: 0; }
.kv > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.kv dt { color: var(--text-2); margin: 0; }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 提示条 */
.notice {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: #f7f8fb; border: 1px solid var(--line);
  font-size: 13px; color: var(--text-2); line-height: 1.7;
}
.notice b { color: var(--text); }

/* 骨架屏 */
.skel {
  background: linear-gradient(90deg, #eef0f4 25%, #f6f7fa 50%, #eef0f4 75%);
  background-size: 200% 100%; animation: sh 1.3s infinite linear; border-radius: 10px;
}
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-idx { height: 62px; }
.skel-row { height: 46px; margin-bottom: 6px; }

.err { padding: 18px 4px; text-align: center; color: var(--text-2); font-size: 14.5px; }
.err .big { font-size: 30px; display: block; margin-bottom: 8px; }

/* 页脚 */
.foot { padding: 22px 0 34px; }
.disclaim { font-size: 11.5px; line-height: 1.8; color: var(--muted); margin: 0; }
.disclaim b { color: var(--text-2); }
.foot-meta { font-size: 11.5px; color: #a8aeb9; margin: 8px 0 0; text-align: center; }

/* 折叠 */
details.more { margin-top: 16px; }
details.more > summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-2);
  padding: 11px 14px; background: #f7f8fb; border-radius: 12px; list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: " ▾"; color: var(--muted); }
details.more[open] > summary::after { content: " ▴"; }
details.more > div { padding: 4px 2px 0; }

.rules { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.rules li { margin-bottom: 9px; }
.rules li:last-child { margin-bottom: 0; }
.rules b { color: var(--text); }

.howto { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.8; color: var(--text-2); }
.howto li { margin-bottom: 8px; }
.howto b { color: var(--text); }

/* 小屏微调 */
@media (max-width: 400px) {
  .ix-price { font-size: 15px; }
  .verdict-label { font-size: 22px; }
  .stock-price .p { font-size: 24px; }
  .key .k-val { font-size: 15px; }
  .brand-text small { display: none; }
}

/* ==========================================================================
   Jev 每日信号（AI 模型）
   原则：与系统一致时低调注脚；不一致（尤其硬冲突）才用颜色抢注意力。
   ========================================================================== */

.jev-loading { color: var(--muted); font-size: 13.5px; }

.jev-meta { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 8px; }

.jev-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.jev-item {
  flex: 1 1 150px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--line-2);
}
.jev-item .k { font-size: 12px; color: var(--muted); }
.jev-item .v { font-size: 16px; font-weight: 800; margin-top: 4px; }
.jev-item .v.tone-up   { color: var(--up); }
.jev-item .v.tone-down { color: var(--down); }
.jev-item .v.tone-flat { color: var(--watch); }

.jev-vs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.jev-vs .vs { color: var(--muted); }

.jev-match { margin-top: 12px; font-size: 13px; color: var(--muted); }
.jev-match b { color: var(--text-2); }

.jev-alert { border-radius: 12px; padding: 11px 13px; margin-top: 12px; font-size: 13.5px; line-height: 1.7; }
.jev-alert.hard { background: var(--up-bg); border: 1.5px solid #f6c9c6; color: #8c2822; }
.jev-alert.soft { background: var(--wait-bg); border: 1.5px solid #f2ddb4; color: #7a5200; }

/* 首页清单上的 jev 小徽标：跟在系统结论徽标后面，冲突时带 ⚠️ */
.pill.pill-jev { margin-left: 5px; opacity: .92; }
.pill.pill-jev.conflict { outline: 1.5px solid currentColor; }

.jev-disc { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

.foot a { color: #cdd3dd; }
