/* The Trade chart shares the app's graphite surface and uses mint for payout only. */
.desk-trade-details summary {
  min-height: 40px;
  padding-block: 10px 8px;
  color: var(--text);
  font-weight: 550;
}

.desk-trade-details summary::marker {
  color: var(--muted);
}

.desk-trade-details[open] > summary::marker {
  color: var(--desk-positive, #9bcdbf);
}

.desk-payoff-figure {
  --payoff-mint: #a2d9c9;
  --payoff-quiet: #aeb5b3;
  margin: 0;
  padding: 12px 13px 10px;
  border: 1px solid #2c3030;
  border-radius: 3px;
  background:
    radial-gradient(ellipse at 55% 0%, #202b261f, transparent 67%),
    #0b0c0c;
}

.desk-payoff-axis-heading,
.desk-payoff-caption {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.3;
}

.desk-payoff-axis-heading {
  margin: 0 0 4px;
  font-weight: 550;
}

.desk-payoff-chart {
  display: block;
  width: 100%;
  height: clamp(178px, 18vw, 224px);
  overflow: hidden;
}

.desk-payoff-grid,
.desk-payoff-grid line,
.desk-payoff-grid path {
  stroke: #2d3634;
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.desk-payoff-tick,
.desk-payoff-tick text {
  fill: var(--payoff-quiet);
  stroke: none;
  font: 10.5px var(--mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
}

.desk-payoff-area {
  fill: url("#desk-payoff-fill");
  stroke: none;
}

#desk-payoff-fill stop:first-child {
  stop-color: #7fb9a9;
  stop-opacity: .3;
}

#desk-payoff-fill stop:last-child {
  stop-color: #577d71;
  stop-opacity: .015;
}

.desk-payoff-line {
  fill: none;
  stroke: var(--payoff-mint);
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.desk-payoff-guide,
.desk-payoff-guide line,
.desk-payoff-guide path {
  fill: none;
  stroke: #8ab5a799;
  stroke-dasharray: 3 4;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.desk-payoff-marker,
.desk-payoff-marker circle {
  fill: #0b1412;
  stroke: #d0f5e9;
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.desk-payoff-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 5px 14px;
  padding-top: 7px;
  border-top: 1px solid #242827;
}

.desk-payoff-axis-caption {
  color: var(--payoff-quiet);
}

.desk-payoff-scenario-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c6dbd5;
}

.desk-payoff-legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border: 1px solid #d0f5e9;
  border-radius: 50%;
  background: #162221;
}

.desk-trade-details > p {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 540px) {
  .desk-payoff-figure { padding: 10px 8px 8px; }
  .desk-payoff-chart { height: 172px; }
}

@media (prefers-reduced-motion: reduce) {
  .desk-payoff-chart *,
  .desk-payoff-figure {
    animation: none !important;
    transition: none !important;
  }
}
