/* CFTC Commitments of Traders — teaser + dedicated page */

.cot-block {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border, rgba(0, 229, 255, 0.12));
}

.cot-block--embed {
  margin-top: 1.25rem;
  padding-top: 0;
  border-top: none;
}

.tv-market-context .cot-block-head h3 {
  font-size: 1rem;
}

.cot-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}

.cot-block-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text, #e8f4ff);
}

.cot-updated,
.cot-meta {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.68rem;
  color: var(--text-dim, #5a7a8a);
  letter-spacing: 0.02em;
}

.cot-intro {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted, #8aaabb);
  max-width: 52rem;
}

.cot-empty,
.cot-loading {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted, #8aaabb);
}

.cot-teaser-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cot-teaser-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border, rgba(0, 229, 255, 0.15));
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(255, 170, 60, 0.05) 0%, transparent 55%),
    rgba(5, 8, 16, 0.92);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cot-teaser-link:hover {
  border-color: rgba(255, 170, 60, 0.35);
}

.cot-teaser-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cot-teaser-main strong {
  font-size: 0.84rem;
  color: var(--text, #e8f4ff);
}

.cot-teaser-meta {
  font-size: 0.75rem;
  color: var(--text-muted, #8aaabb);
}

.cot-teaser-change {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.72rem;
  white-space: nowrap;
  color: var(--text-dim, #5a7a8a);
}

.cot-teaser-change.is-up {
  color: #5dffb0;
}

.cot-teaser-change.is-down {
  color: #ff8a80;
}

.cot-cta {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
}

.cot-cta a {
  color: var(--accent, #00e5ff);
}

.cot-page {
  min-height: 100vh;
  background: var(--bg, #050810);
  color: var(--text, #e8f4ff);
}

.cot-page-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.cot-page-inner > header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cot-page-inner > header .sub {
  margin: 0 0 1rem;
  max-width: 46rem;
  line-height: 1.55;
  color: var(--text-muted, #8aaabb);
}

.cot-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.cot-panel {
  border: 1px solid var(--border, rgba(0, 229, 255, 0.15));
  border-radius: 10px;
  background: rgba(5, 8, 16, 0.92);
  padding: 1rem 1.05rem;
}

.cot-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.cot-market-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.cot-picker-btn {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 170, 60, 0.25);
  background: rgba(255, 170, 60, 0.05);
  color: var(--text-muted, #8aaabb);
  cursor: pointer;
}

.cot-picker-btn.is-active,
.cot-picker-btn:hover {
  border-color: rgba(255, 170, 60, 0.45);
  color: #ffd099;
  background: rgba(255, 170, 60, 0.1);
}

.cot-table-wrap {
  overflow-x: auto;
}

.cot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.cot-table th,
.cot-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid rgba(0, 229, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.cot-table thead th {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim, #5a7a8a);
}

.cot-table--overview tbody tr {
  cursor: pointer;
}

.cot-table--overview tbody tr:hover,
.cot-table--overview tbody tr.is-active {
  background: rgba(255, 170, 60, 0.06);
}

.cot-row-group {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-dim, #5a7a8a);
}

.cot-change.is-up {
  color: #5dffb0;
}

.cot-change.is-down {
  color: #ff8a80;
}

.cot-detail-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.cot-detail-sub {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--text-dim, #5a7a8a);
}

.cot-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.cot-detail-stats div {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.03);
}

.cot-detail-stats dt {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim, #5a7a8a);
}

.cot-detail-stats dd {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.cot-detail-stats .cot-change {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 400;
}

.cot-detail-chart-label {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  color: var(--text-muted, #8aaabb);
}

.cot-position-bar {
  display: flex;
  width: 100%;
  height: 1.1rem;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.cot-bar-seg {
  display: block;
  height: 100%;
}

.cot-bar-seg--comm {
  background: linear-gradient(180deg, #4fc3f7, #0288d1);
}

.cot-bar-seg--spec {
  background: linear-gradient(180deg, #ffb74d, #f57c00);
}

.cot-bar-seg--other {
  background: linear-gradient(180deg, #90a4ae, #546e7a);
}

.cot-bar-legend {
  list-style: none;
  margin: 0.55rem 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.72rem;
  color: var(--text-muted, #8aaabb);
}

.cot-bar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cot-legend-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 2px;
}

.cot-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted, #8aaabb);
}

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

  .cot-detail-stats {
    grid-template-columns: 1fr;
  }
}
