.tf-tool {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
}

.tf-tf-tabs {
  display: flex;
  gap: 4px;
}

.tf-tf-tab,
.tf-filter {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--fg-muted);
  border-radius: var(--radius);
  font: inherit;
  font-size: 11px;
  padding: 5px 10px;
  cursor: pointer;
}

.tf-tf-tab:hover,
.tf-filter:hover {
  color: var(--fg-default);
  border-color: var(--fg-subtle);
}

.tf-tf-tab.is-active,
.tf-filter.is-active {
  color: var(--fg-default);
  border-color: var(--accent-emphasis);
  background: var(--bg-muted);
}

.tf-meta {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11px;
  color: var(--fg-muted);
}

.tf-meta strong {
  color: var(--fg-default);
  font-weight: 600;
}

.tf-top-pick {
  display: none;
}

.tf-top-pick.is-visible {
  display: block;
}

.tf-top-card {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-emphasis);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.tf-top-card.is-long { border-left-color: var(--success); }
.tf-top-card.is-short { border-left-color: var(--danger); }

.tf-top-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.tf-top-card-head h3 {
  margin: 0;
  font-size: 14px;
}

.tf-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  font-size: 11px;
}

.tf-top-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
}

.tf-top-grid .label,
.tf-top-grid .k {
  display: block;
  color: var(--fg-subtle);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tf-top-grid .value,
.tf-top-grid .v {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
}

.tf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 10px;
  align-items: start;
}

.tf-panel {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  min-height: 320px;
}

.tf-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-muted);
}

.tf-panel-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.tf-count {
  font-size: 10px;
  color: var(--fg-subtle);
}

.tf-table-wrap {
  overflow: visible;
}

.tf-ranking-panel {
  min-height: auto;
}

.tf-table tbody td,
.tf-table thead th {
  padding: 5px 6px;
}

.tf-table tbody tr {
  cursor: pointer;
}

.tf-table tbody tr:hover {
  background: var(--bg-subtle);
}

.tf-table tbody tr.is-selected {
  background: var(--bg-muted);
}

.tf-table td,
.tf-table th {
  white-space: nowrap;
}

.tf-bias {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--border-default);
}

.tf-bias.is-long {
  color: var(--success);
  border-color: var(--success-muted);
}

.tf-bias.is-short {
  color: var(--danger);
  border-color: #8b2f2a;
}

.tf-bias.is-neutral {
  color: var(--fg-muted);
}

.tf-score-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 72px;
}

.tf-score-bar .peps-bar {
  flex: 1;
  min-width: 40px;
}

.tf-align {
  font-size: 10px;
  color: var(--fg-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-detail-panel {
  position: sticky;
  top: 12px;
}

.tf-detail-body {
  padding: 10px;
  font-size: 12px;
}

.tf-detail-symbol {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.tf-detail-sub {
  color: var(--fg-muted);
  font-size: 11px;
  margin: 0 0 10px;
}

.tf-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-muted);
}

.tf-section h4 {
  margin: 0 0 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-subtle);
}

.tf-kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}

.tf-kv div {
  background: var(--bg-subtle);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius);
  padding: 6px 8px;
}

.tf-kv .k {
  display: block;
  color: var(--fg-subtle);
  font-size: 10px;
}

.tf-kv .v {
  font-family: var(--mono);
  font-size: 11px;
}

.tf-notes {
  margin: 0;
  padding-left: 16px;
  color: var(--fg-muted);
  font-size: 11px;
  line-height: 1.5;
}

.tf-confirm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 11px;
}

.tf-confirm-row:last-child {
  border-bottom: none;
}

.tf-guide-box,
.tf-strategy-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 11px;
  color: var(--fg-muted);
}

.tf-guide-box {
  border-left: 3px solid var(--accent-emphasis);
}

.tf-guide-box summary,
.tf-strategy-box summary {
  cursor: pointer;
  color: var(--fg-default);
  font-weight: 600;
}

.tf-guide-content {
  margin-top: 8px;
}

.tf-guide-intro {
  margin: 0 0 10px;
  line-height: 1.55;
  color: var(--fg-muted);
}

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

.tf-guide-list {
  margin: 0 0 12px;
  padding-left: 18px;
  line-height: 1.55;
}

.tf-guide-list:last-child {
  margin-bottom: 0;
}

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

.tf-strategy-content {
  margin-top: 8px;
}

.tf-strategy-content dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 4px 12px;
  margin: 0;
}

.tf-strategy-content dt {
  color: var(--fg-subtle);
}

.tf-strategy-content dd {
  margin: 0;
  font-family: var(--mono);
}

.tf-empty {
  color: var(--fg-muted);
  text-align: center;
  padding: 16px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .tf-layout {
    grid-template-columns: 1fr;
  }

  .tf-detail-panel {
    position: static;
  }

  .tf-meta {
    margin-left: 0;
    width: 100%;
  }
}
