@import url('trend_following.css');

.lsr-tool {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lsr-hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--bg-canvas);
  border-left: 4px solid var(--accent);
}

.lsr-hero-ratio {
  text-align: center;
  min-width: 88px;
}

.lsr-hero-ratio span {
  display: block;
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.lsr-hero-ratio em {
  font-size: 11px;
  color: var(--fg-muted);
  font-style: normal;
}

.lsr-hero-copy h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.lsr-hero-copy p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.lsr-split-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.lsr-split-long {
  background: #22c55e;
}

.lsr-split-short {
  background: #ef4444;
}

.lsr-split-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  font-family: var(--mono);
  color: var(--fg-muted);
}

.lsr-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.lsr-stat {
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--bg-canvas);
}

.lsr-stat-label {
  display: block;
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.lsr-stat strong {
  font-family: var(--mono);
  font-size: 16px;
}

.lsr-stat.is-long { border-left: 3px solid #22c55e; }
.lsr-stat.is-ratio { border-left: 3px solid var(--accent); }
.lsr-stat.is-cl { border-left: 3px solid #16a34a; }
.lsr-stat.is-cs { border-left: 3px solid #dc2626; }

.lsr-toolbar .lsr-toolbar-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lsr-search {
  flex: 1;
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--bg-default);
  color: var(--fg-default);
  font: inherit;
  font-size: 12px;
}

.lsr-table .is-long { color: #22c55e; font-family: var(--mono); }
.lsr-table .is-short { color: #ef4444; font-family: var(--mono); }
.lsr-table .is-up { color: #22c55e; }
.lsr-table .is-down { color: #ef4444; }
.lsr-mono { font-family: var(--mono); font-size: 12px; }

.lsr-bias {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lsr-bias.is-long {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.lsr-bias.is-short {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.lsr-bias.is-neutral {
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.06);
}

.lsr-row {
  cursor: pointer;
}

.lsr-row.is-selected {
  background: rgba(88, 166, 255, 0.08);
}

.lsr-detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.lsr-detail-long,
.lsr-detail-short {
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border-default);
}

.lsr-detail-long { border-left: 3px solid #22c55e; }
.lsr-detail-short { border-left: 3px solid #ef4444; }

.lsr-detail-long span,
.lsr-detail-short span {
  display: block;
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 4px;
}

.lsr-detail-long strong,
.lsr-detail-short strong {
  font-family: var(--mono);
  font-size: 18px;
}

.lsr-detail-list {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.lsr-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.lsr-detail-list dt {
  color: var(--fg-muted);
}

.lsr-detail-list dd {
  margin: 0;
  font-family: var(--mono);
}

.lsr-spark h4 {
  margin: 0 0 8px;
  font-size: 12px;
}

.lsr-spark-track {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 72px;
  padding: 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.lsr-spark-bar {
  flex: 1;
  min-width: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}

.lsr-spark-bar.is-long { background: #22c55e; }
.lsr-spark-bar.is-short { background: #ef4444; }

/* Tool guide */
.lsr-tool > .tf-guide-box {
  margin-top: 4px;
}

.lsr-tool .tf-guide-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-emphasis);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  color: var(--fg-muted);
}

.lsr-tool .tf-guide-box summary {
  cursor: pointer;
  color: var(--fg-default);
  font-weight: 600;
  font-size: 13px;
  list-style: none;
}

.lsr-tool .tf-guide-box summary::-webkit-details-marker {
  display: none;
}

.lsr-tool .tf-guide-content {
  margin-top: 12px;
}

.lsr-tool .tf-guide-intro {
  margin: 0 0 14px;
  line-height: 1.6;
  max-width: 90ch;
}

.lsr-tool .tf-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
}

.lsr-tool .tf-guide-heading {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-default);
}

.lsr-tool .tf-guide-list {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
}

.lsr-tool .tf-guide-list li + li {
  margin-top: 6px;
}

.lsr-tool .tf-guide-list-consider li::marker {
  color: var(--accent-emphasis);
}

@media (max-width: 760px) {
  .lsr-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .lsr-tool .tf-guide-grid {
    grid-template-columns: 1fr;
  }
}
