.trip-fx {
  position: relative;
  margin: 0 0 32px;
  padding: clamp(22px, 5vw, 30px);
  border: 1px solid rgba(228, 184, 91, .28);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 0, rgba(228, 184, 91, .17), transparent 38%),
    linear-gradient(145deg, rgba(31, 39, 47, .97), rgba(16, 21, 27, .93));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .27), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.trip-fx::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -110px;
  bottom: -140px;
  border: 1px solid rgba(228, 184, 91, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 25px rgba(228, 184, 91, .025), 0 0 0 60px rgba(228, 184, 91, .018);
  pointer-events: none;
}

.trip-fx-head,
.trip-fx-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.trip-fx-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .16em;
}

.trip-fx h2 {
  margin: 0;
  font-size: clamp(1.32rem, 4vw, 1.8rem);
  letter-spacing: -.04em;
}

.trip-fx-state {
  flex: none;
  margin-top: 2px;
  padding: 6px 10px;
  border: 1px solid rgba(228, 184, 91, .25);
  border-radius: 999px;
  color: #d8cfbf;
  background: rgba(228, 184, 91, .07);
  font-size: .7rem;
  font-weight: 700;
}

.trip-fx[data-state="ready"] .trip-fx-state {
  color: #cfe8d7;
  border-color: rgba(102, 197, 138, .3);
  background: rgba(102, 197, 138, .08);
}

.trip-fx[data-state="error"] .trip-fx-state {
  color: #f0c4b8;
  border-color: rgba(223, 127, 104, .35);
  background: rgba(223, 127, 104, .08);
}

.trip-fx-quote {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 26px 0 12px;
}

.trip-fx-quote p {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.trip-fx-quote p > span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.trip-fx-quote strong {
  color: var(--ink);
  font-size: clamp(2.65rem, 10vw, 4.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.075em;
  line-height: .9;
}

.trip-fx-quote small {
  color: var(--gold);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.trip-fx-change {
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.trip-fx-change[data-direction="up"] { color: #8fd6a8; }
.trip-fx-change[data-direction="down"] { color: #eaa18f; }

.trip-fx-chart {
  position: relative;
  z-index: 1;
  margin: 10px 0 22px;
}

.trip-fx-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.trip-fx-grid {
  fill: none;
  stroke: rgba(244, 238, 225, .08);
  stroke-width: 1;
}

.trip-fx-area { fill: url(#trip-fx-fill); }

.trip-fx-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(228, 184, 91, .22));
}

.trip-fx-dot {
  fill: var(--gold);
  stroke: #1a2027;
  stroke-width: 3;
}

.trip-fx-axis {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  color: #80786c;
  font-size: .67rem;
  font-variant-numeric: tabular-nums;
}

.trip-fx-footer {
  align-items: center;
  padding-top: 18px;
  border-top: 1px solid rgba(244, 238, 225, .11);
}

.trip-fx-ranges {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(244, 238, 225, .1);
  border-radius: 999px;
  background: rgba(7, 10, 13, .28);
}

.trip-fx-ranges button {
  appearance: none;
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  color: #9d9486;
  background: transparent;
  font: inherit;
  font-size: .72rem;
  font-weight: 750;
  cursor: pointer;
}

.trip-fx-ranges button[aria-pressed="true"] {
  color: #171b20;
  background: var(--gold);
  box-shadow: 0 5px 15px rgba(228, 184, 91, .22);
}

.trip-fx-ranges button:focus-visible {
  outline: 2px solid rgba(228, 184, 91, .72);
  outline-offset: 2px;
}

.trip-fx-footer p {
  max-width: 30ch;
  margin: 0;
  color: #80786c;
  font-size: .68rem;
  line-height: 1.55;
  text-align: right;
}

@media (max-width: 560px) {
  .trip-fx-quote,
  .trip-fx-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .trip-fx-quote {
    gap: 11px;
  }

  .trip-fx-footer p {
    max-width: none;
    text-align: left;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .trip-fx-line,
  .trip-fx-area,
  .trip-fx-dot {
    transition: d .3s ease, cx .3s ease, cy .3s ease;
  }
}
