.bt-shell { max-width: 1280px; margin: auto; padding: 0 36px 36px; }
.bt-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 80px; border-bottom: 1px solid var(--line); }
.bt-brand { color: var(--green-deep); font-size: 16px; font-weight: 700; text-decoration: none; }
.bt-header nav { display: flex; gap: 24px; font-size: 13px; }
.bt-header nav a { color: var(--muted); text-decoration: none; }
.bt-header nav a:hover { color: var(--green); }
.bt-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 38px 0 26px; }
.bt-heading h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -.02em; }
.bt-heading p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.bt-readonly { white-space: nowrap; color: var(--green-deep); font-size: 12px; background: var(--green-soft); padding: 8px 12px; border-radius: 6px; }
.bt-form { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 18px 24px; background: var(--card); padding: 24px; border-radius: 14px; border: 1px solid var(--line); }
.bt-form label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; min-width: 0; }
.bt-form input, .bt-form select { width: 100%; min-width: 0; height: 44px; border: 1px solid #cbd7d0; border-radius: 7px; background: #fff; padding: 8px 12px; color: var(--ink); font-size: 14px; }
.bt-form .bt-fund { grid-column: 1 / -1; }
.bt-form .bt-fund select { font-weight: 600; }
.bt-form > button { align-self: end; height: 44px; }
.bt-presets { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.bt-presets span { margin-right: 8px; }
.bt-presets button, .bt-chart-switch button { border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--green-deep); padding: 7px 12px; font-size: 12px; }
.bt-chart-switch button[aria-pressed=true] { color: #fff; background: var(--green-deep); border-color: var(--green-deep); }
.bt-status { padding: 15px 0; color: var(--muted); font-size: 13px; min-height: 50px; }
.bt-status.is-error { color: var(--red); }
.bt-result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 16px 0; }
.bt-result-heading h2 { font-size: 23px; }
.bt-result-heading p { color: var(--muted); font-size: 12px; margin-top: 8px; }
.bt-basis { color: #835a1d; font-size: 12px; margin: 12px 0 20px; }
.bt-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bt-summary > div { padding: 18px 18px 18px 0; }
.bt-summary dt { font-size: 12px; color: var(--muted); }
.bt-summary dd { margin: 8px 0 0; font-size: clamp(19px, 2vw, 25px); font-weight: 600; font-variant-numeric: tabular-nums; }
.bt-summary dd small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 5px; }
.bt-positive { color: var(--red); }.bt-negative { color: var(--green); }
.bt-section { margin: 30px 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; min-width: 0; }
.bt-section > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.bt-section h2 { font-size: 18px; }.bt-section header p { font-size: 12px; color: var(--muted); margin-top: 7px; max-width: 65ch; }
.bt-chart-switch { display: flex; gap: 6px; flex-shrink: 0; }
.bt-chart { width: 100%; height: 320px; min-width: 0; }
.bt-recovery-layout { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 28px; }
.bt-recovery { border-top: 2px solid var(--green); padding-top: 14px; font-size: 13px; }
.bt-recovery h3 { font-size: 15px; margin-bottom: 15px; }.bt-recovery p { margin: 10px 0; color: var(--muted); }.bt-recovery b { color: var(--ink); font-weight: 600; }
.bt-recovery ol { list-style: none; padding: 0; margin: 16px 0; }.bt-recovery li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.bt-details { padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.bt-details summary { cursor: pointer; color: var(--green-deep); font-weight: 600; margin-bottom: 12px; }
.bt-table-scroll { overflow-x: auto; max-width: 100%; }
.bt-table-scroll table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bt-table-scroll th { color: var(--muted); font-weight: 500; background: #f4f7f5; }.bt-table-scroll th, .bt-table-scroll td { padding: 12px; border-bottom: 1px solid var(--line); }.bt-table-scroll th:first-child, .bt-table-scroll td:first-child { text-align: left; }
.bt-table-scroll tbody tr:hover { background: #f8faf8; }.bt-trades-scroll { max-height: 360px; }.bt-trades-scroll thead { position: sticky; top: 0; }
.bt-sources { color: var(--muted); line-height: 1.8; }.bt-sources ul { padding-left: 18px; max-width: 75ch; }.bt-sources a { color: var(--green-deep); }
.bt-footer { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: 12px; }
.backtest-page [hidden] { display: none !important; }
@media(max-width: 760px) { .bt-shell { padding: 0 16px 24px; }.bt-header { align-items: start; flex-direction: column; justify-content: center; padding: 16px 0; gap: 12px; }.bt-header nav { gap: 20px; }.bt-heading { padding-top: 26px; align-items: start; }.bt-readonly { display: none; }.bt-form { padding: 18px; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }.bt-form > button { grid-column: 1 / -1; }.bt-form label { font-size: 12px; }.bt-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }.bt-section { padding: 18px 12px; }.bt-section > header { align-items: start; flex-direction: column; }.bt-recovery-layout { grid-template-columns: 1fr; gap: 12px; }.bt-chart { height: 280px; }.bt-recovery { padding: 18px 6px 0; }.bt-result-heading { align-items: start; }.bt-result-heading h2 { font-size: 19px; }.bt-result-heading button { font-size: 11px; white-space: nowrap; }.bt-summary dd { font-size: 20px; } }
