.exchange-showcase {
  --exchange-bg: #0d1122;
  --exchange-surface: #151b30;
  --exchange-text: #f1f4ff;
  --exchange-muted: #aeb9d2;
  --exchange-line: #3e4966;
  --exchange-property: #7bdcf7;
  --exchange-client: #c6a3ff;
  --exchange-condition: #f0cd8a;
  --exchange-input: #10162b;
  color: var(--exchange-text);
  background: var(--exchange-bg);
  border-block: 1px solid var(--exchange-line);
  padding-block: clamp(64px, 8vw, 112px);
  scroll-margin-top: 72px;
}

[data-theme="light"] .exchange-showcase {
  --exchange-bg: #f2f3fb;
  --exchange-surface: #fff;
  --exchange-text: #202441;
  --exchange-muted: #505b77;
  --exchange-line: #a0a9c5;
  --exchange-property: #126881;
  --exchange-client: #6341a3;
  --exchange-condition: #815412;
  --exchange-input: #f4f2fa;
}

.exchange-shell { max-width: 1152px; }
.exchange-intro { margin-block-end: clamp(30px, 5vw, 58px); }
.exchange-intro h2 {
  font: 800 clamp(2.15rem, 5.2vw, 4.4rem)/1.05 Manrope, sans-serif;
  letter-spacing: -.04em;
  text-wrap: balance;
  margin: 0;
}
.exchange-intro h2 span {
  display: block;
  color: var(--exchange-client);
  font-size: .95rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: .02em;
  margin-block-end: 14px;
}
.exchange-intro p { max-width: 55ch; margin: 18px 0 0; color: var(--exchange-muted); font-size: clamp(.98rem, 1.6vw, 1.15rem); line-height: 1.6; }
.exchange-demo { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(0, 1fr); gap: clamp(26px, 4vw, 60px); align-items: center; }
.exchange-globe {
  min-width: 0;
  border: 1px solid var(--exchange-line);
  border-radius: 16px;
  background: var(--exchange-surface);
}
.exchange-globe-header, .exchange-globe-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  flex-wrap: wrap;
  color: var(--exchange-muted);
  font-size: .8rem;
  padding: 10px 16px;
}
.exchange-globe-header { min-height: 52px; border-bottom: 1px solid var(--exchange-line); }
.exchange-globe-footer { border-top: 1px solid var(--exchange-line); }
.exchange-globe-footer [role="group"] { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.exchange-key { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; }
.exchange-key li { display: flex; align-items: center; gap: 7px; }
.exchange-key li::before { content: ""; width: 8px; height: 8px; background: var(--exchange-property); border-radius: 50%; }
.exchange-key li[data-kind="client"]::before { background: var(--exchange-client); border-radius: 0; transform: rotate(45deg); }
.exchange-key li[data-kind="condition"]::before { background: var(--exchange-condition); border-radius: 0; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.exchange-sphere {
  position: relative;
  background: radial-gradient(ellipse at 51% 50%, color-mix(in srgb, var(--exchange-client) 8%, transparent), transparent 69%), var(--exchange-input);
}
.exchange-canvas { display: block; width: 100%; height: clamp(328px, 38vw, 448px); touch-action: pan-y pinch-zoom; cursor: grab; }
.exchange-canvas:active { cursor: grabbing; }
.exchange-canvas-hint { position: absolute; bottom: 16px; left: 16px; color: var(--exchange-muted); font-size: .78rem; margin: 0; pointer-events: none; }
.exchange-zoom { position: absolute; bottom: 12px; right: 12px; display: flex; align-items: center; gap: 5px; border: 1px solid var(--exchange-line); border-radius: 10px; background: var(--exchange-surface); }
.exchange-zoom output { width: 44px; text-align: center; font-size: .78rem; font-variant-numeric: tabular-nums; }
.exchange-showcase button { font: inherit; color: var(--exchange-text); background: transparent; border: 0; cursor: pointer; }
.exchange-showcase button:disabled { opacity: .5; cursor: default; }
.exchange-zoom button { width: 42px; height: 42px; border-radius: 9px; font-size: 1.15rem; }
.exchange-globe-footer button { min-height: 44px; padding: 0 4px; color: var(--exchange-client); }
.exchange-globe-footer [hidden] { display: none; }
.exchange-showcase :is(a, button, select, canvas):focus-visible { outline: 2px solid var(--exchange-property); outline-offset: 3px; }
.exchange-zoom button:hover:not(:disabled), .exchange-globe-footer button:hover:not(:disabled) { background: color-mix(in srgb, var(--exchange-client) 12%, transparent); }
.exchange-story { min-width: 0; }
.exchange-select-label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .88rem; }
.exchange-picker { display: block; width: 100%; padding: 10px 12px; min-height: 46px; color: var(--exchange-text); background: var(--exchange-input); border: 1px solid var(--exchange-line); border-radius: 9px; font: inherit; font-size: 1rem; }
.exchange-result { margin-top: 26px; }
.exchange-result .exchange-back { display: block; min-height: 44px; margin-bottom: 16px; padding: 8px 12px; color: var(--exchange-client); border: 1px solid var(--exchange-line); border-radius: 8px; font-size: .88rem; font-weight: 700; scroll-margin-block: 84px 16px; }
.exchange-result .exchange-back:hover { border-color: var(--exchange-client); background: var(--exchange-input); }
.exchange-result .exchange-back[hidden] { display: none; }
.exchange-relation { color: var(--exchange-client); font-size: .82rem; font-weight: 700; }
.exchange-result h3 { margin: 8px 0 5px; color: inherit; font: 800 clamp(1.55rem, 3vw, 2.25rem)/1.13 Manrope, sans-serif; letter-spacing: -.035em; text-wrap: balance; }
.exchange-result p, .exchange-result dd { color: var(--exchange-muted); margin: 0; line-height: 1.5; font-size: .95rem; }
.exchange-parties { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.exchange-parties [data-exchange-party] { color: var(--exchange-text); background: var(--exchange-input); border: 1px solid var(--exchange-line); border-radius: 8px; padding: 7px 10px; font-size: .82rem; line-height: 1.35; }
.exchange-parties strong { color: var(--exchange-client); }
.exchange-parties [data-exchange-party="property"] strong { color: var(--exchange-property); }
.exchange-parties[hidden], .exchange-parties [hidden] { display: none; }
.exchange-result dl { display: grid; gap: 4px; margin: 23px 0 0; border-top: 1px solid var(--exchange-line); padding-top: 17px; }
.exchange-result dl[hidden] { display: none; }
.exchange-result dt { font-size: .9rem; font-weight: 750; }
.exchange-result dd + dt { margin-top: 9px; }
.exchange-matches { margin-top: 23px; border-top: 1px solid var(--exchange-line); padding-top: 17px; scroll-margin-block: 84px 16px; }
.exchange-matches h4 { margin: 0 0 10px; font-size: .95rem; }
.exchange-matches ul { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.exchange-matches ul[hidden] { display: none; }
.exchange-matches li button { display: grid; gap: 3px; width: 100%; min-height: 44px; padding: 10px 12px; text-align: left; background: var(--exchange-input); border: 1px solid var(--exchange-line); border-radius: 8px; }
.exchange-matches li button:hover { border-color: var(--exchange-property); }
.exchange-matches strong { color: var(--exchange-property); font-size: .95rem; }
.exchange-matches small { color: var(--exchange-muted); font-size: .83rem; }
.exchange-demo-link { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; color: var(--exchange-client); font-weight: 750; margin-top: 15px; text-decoration: underline; text-underline-offset: 4px; }
.exchange-platform-link { display: inline-block; margin-top: 12px; color: inherit; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.exchange-in-view .px-chat-launch[aria-expanded="false"]:not(:focus-visible) { visibility: hidden; }

@media (max-width: 820px) {
  .exchange-demo { grid-template-columns: minmax(0, 1fr); }
  .exchange-canvas { height: clamp(290px, 76vw, 410px); }
}
@media (max-width: 500px) {
  .exchange-showcase { padding-block: 51px; }
  .exchange-globe-header { gap: 6px; align-items: flex-start; flex-direction: column; padding: 11px 12px; }
  .exchange-globe-footer { padding: 7px 12px 5px; }
  .exchange-canvas-hint { left: 12px; bottom: 18px; }
  .exchange-canvas-hint span { display: none; }
}
