/* 策略回測 22 年版（/pages/backtest，js/bt22-ui.js）。字放大給 45–75 歲讀者；漲紅跌綠照全站 .up/.down */
.bt-main { padding: 18px 12px 40px; max-width: 900px; }
.bt-intro { padding: 14px 20px; font-size: 16px; color: #444; line-height: 1.8; }
.bt-muted { color: #888; font-size: 14px; }
.bt-badge { font-size: 13px; color: #163A2E; background: #e8efe9; border-radius: 999px; padding: 3px 10px; font-weight: 700; white-space: nowrap; }
.bt-badge.gold { background: linear-gradient(135deg, #F3E3B5, #E5C883); color: #5b4512; }

.bt-cats { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 4px; }
.bt-chip { font-size: 15px; padding: 7px 13px; border: 1.5px solid #cfd6d2; border-radius: 999px; background: #fff; color: #333; cursor: pointer; line-height: 1.2; }
.bt-chip small { color: #999; font-size: 12px; margin-left: 2px; }
.bt-chip.on { background: #1B4332; border-color: #1B4332; color: #fff; }
.bt-chip.on small { color: #cfe3d6; }
.bt-chip.sm { font-size: 14px; padding: 6px 11px; }
.bt-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 16px 16px; }
@media (max-width: 640px) { .bt-list { grid-template-columns: 1fr; } }
.bt-item { display: flex; align-items: center; gap: 10px; text-align: left; font-size: 16px; padding: 11px 12px; border: 1px solid #e0e3e8; border-radius: 8px; background: #fafbfa; color: #222; cursor: pointer; line-height: 1.45; }
.bt-item:hover { border-color: #1B4332; }
.bt-item.on { border-color: #1B4332; background: #eef5f0; box-shadow: inset 3px 0 0 #1B4332; }
.bt-no { flex: 0 0 auto; min-width: 30px; font-size: 13px; color: #888; }
.bt-nm { flex: 1 1 auto; }
.bt-free { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #b45309; background: #fff4e0; border: 1px solid #f2d39b; padding: 2px 7px; border-radius: 6px; }
.bt-lk { flex: 0 0 auto; font-size: 14px; opacity: .7; }

.bt-buildw { padding: 14px 16px 18px; }
.bt-whatnow { font-size: 15px; color: #555; background: #f6f8f7; border-radius: 8px; padding: 10px 12px; line-height: 1.7; margin-bottom: 12px; }
.bt-whatnow span { color: #163A2E; font-weight: 700; }
.bt-rules { display: flex; flex-direction: column; gap: 8px; }
.bt-rule { display: flex; align-items: center; gap: 10px; border: 1px solid #e0e3e8; border-radius: 8px; padding: 9px 10px; background: #fff; }
.bt-and { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #1B4332; background: #e8efe9; border-radius: 6px; padding: 3px 7px; }
.bt-rl { flex: 1 1 auto; font-size: 17px; color: #222; line-height: 1.9; }
.bt-num { width: 84px; font-size: 17px; padding: 5px 8px; border: 1.5px solid #cfd6d2; border-radius: 6px; text-align: right; margin: 0 3px; }
.bt-num:focus, .bt-sel:focus { outline: none; border-color: #1B4332; box-shadow: 0 0 0 3px rgba(27,67,50,.12); }
.bt-x { flex: 0 0 auto; width: 34px; height: 34px; border: none; border-radius: 50%; background: #f2f2f2; color: #888; font-size: 20px; line-height: 1; cursor: pointer; }
.bt-x:hover { background: #fde8e8; color: #c0392b; }
.bt-empty { font-size: 15px; color: #888; padding: 6px 2px; }
.bt-row { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 16px; flex-wrap: wrap; }
.bt-sel { font-size: 16px; padding: 8px 10px; border: 1.5px solid #cfd6d2; border-radius: 8px; background: #fff; color: #222; max-width: 100%; }
.bt-addsel { color: #1B4332; font-weight: 700; border-style: dashed; }
.bt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; margin-top: 16px; }
@media (max-width: 760px) { .bt-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .bt-grid { grid-template-columns: 1fr; } }
.bt-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bt-f > span:first-child { font-size: 14px; font-weight: 700; color: #163A2E; }
.bt-f .bt-sel { width: 100%; }
.bt-inl { display: flex; align-items: center; gap: 4px; font-size: 16px; }
.bt-inl .bt-sel { width: auto; flex: 1 1 auto; }
.bt-inds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.bt-run { display: block; width: 100%; margin-top: 18px; font-size: 19px; font-weight: 800; color: #fff; background: #1B4332; border: none; border-radius: 10px; padding: 14px; cursor: pointer; }
.bt-run:hover { background: #163A2E; }

.bt-resw { padding: 14px 16px 18px; }
.bt-wait { color: #888; padding: 24px 0; font-size: 16px; }
.bt-err { color: #b91c1c; padding: 16px 0; font-size: 16px; }
.bt-exbar { font-size: 14px; color: #6b4e0b; background: #fff8e6; border: 1px solid #f2dfa8; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; line-height: 1.7; }
.bt-what { font-size: 18px; font-weight: 800; color: #163A2E; line-height: 1.6; }
.bt-what span { font-size: 14px; font-weight: 400; color: #777; }
.bt-verdict { font-size: 17px; color: #333; line-height: 1.9; margin: 8px 0 14px; }
.bt-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
@media (max-width: 760px) { .bt-cards { grid-template-columns: 1fr 1fr; } }
.bt-card { border: 1px solid #e0e3e8; border-radius: 10px; padding: 12px; background: #fbfcfb; }
.bt-card .k { font-size: 14px; color: #666; }
.bt-card .v { font-size: 26px; font-weight: 800; color: #163A2E; margin: 4px 0 2px; line-height: 1.2; }
.bt-card .s { font-size: 13px; color: #888; line-height: 1.5; }
.bt-chhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.bt-chhead h3, .bt-h3 { font-size: 17px; color: #163A2E; margin: 14px 0 8px; }
.bt-log { font-size: 14px; color: #555; display: inline-flex; align-items: center; gap: 5px; }
.bt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: #444; margin-bottom: 4px; }
.bt-legend i { display: inline-block; width: 18px; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: 6px; }
.bt-chart { position: relative; }
.bt-chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.bt-tip { position: absolute; pointer-events: none; background: rgba(22,58,46,.94); color: #fff; font-size: 13px; line-height: 1.6; padding: 8px 10px; border-radius: 6px; white-space: nowrap; display: none; }
.bt-small { font-size: 13px; color: #888; line-height: 1.7; margin: 6px 0; }
.bt-tw { overflow-x: auto; }
.bt-yr { width: 100%; border-collapse: collapse; font-size: 16px; }
.bt-yr th { background: #f3f6f4; color: #163A2E; font-size: 14px; padding: 8px 6px; text-align: right; border-bottom: 2px solid #163A2E; }
.bt-yr th:first-child, .bt-yr td:first-child { text-align: left; }
.bt-yr td { padding: 7px 6px; text-align: right; border-bottom: 1px solid #eef0ee; }
.bt-yr td small { color: #999; font-size: 12px; }
.bt-win { font-size: 12px; font-weight: 700; color: #1B4332; background: #e8efe9; border-radius: 5px; padding: 1px 6px; }
.bt-ul { font-size: 15px; color: #444; line-height: 1.8; padding-left: 20px; }
.bt-holds { margin-top: 16px; border-top: 1px dashed #dfe4e0; padding-top: 14px; }
.bt-hbar { display: flex; align-items: center; gap: 10px; font-size: 16px; color: #163A2E; margin-bottom: 8px; }
.bt-hm { border-bottom: 1px solid #f0f2f0; padding: 8px 0; }
.bt-hmh { font-size: 15px; color: #555; margin-bottom: 5px; }
.bt-hcs { display: flex; flex-wrap: wrap; gap: 5px; }
.bt-hcs a { font-size: 14px; color: #163A2E; background: #f3f6f4; border-radius: 5px; padding: 3px 7px; text-decoration: none; }
.bt-more { font-size: 14px; border: none; background: none; color: #1B4332; text-decoration: underline; cursor: pointer; }
.bt-cta { display: inline-block; margin: 10px 8px 0 0; background: linear-gradient(135deg, #E5C883, #C9A24B); color: #10402F; font-weight: 800; font-size: 16px; padding: 11px 20px; border-radius: 10px; text-decoration: none; border: none; cursor: pointer; }
.bt-cta.ghost { background: #fff; border: 1.5px solid #1B4332; color: #1B4332; font-weight: 700; }
.bt-lock { border: 1px solid #ecd9a6; background: #fffbef; border-radius: 12px; padding: 18px; font-size: 16px; color: #333; line-height: 1.8; }
.bt-lock-h { font-size: 19px; font-weight: 800; color: #5b4512; margin-bottom: 6px; }
.bt-lock ul { list-style: none; padding-left: 0; margin: 8px 0; }
.bt-lock li { position: relative; padding-left: 26px; margin: 6px 0; }
.bt-lock li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: #1B4332; font-weight: 800; }
.bt-lock-sub { font-size: 14px; color: #666; margin-top: 10px; }
.bt-txt { padding: 10px 20px 16px; font-size: 16px; color: #444; line-height: 1.85; }
.bt-txt h3 { font-size: 16px; color: #163A2E; margin: 12px 0 2px; }
.bt-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; }
.bt-links a { font-size: 15px; color: #163A2E; background: #f3f6f4; border-radius: 8px; padding: 8px 12px; text-decoration: none; }
.bt-foot { text-align: center; color: #888; font-size: 13px; margin-top: 6px; line-height: 1.7; }
