/* The workspace has its own palette and spacing. */
.pro-app {
  --side: 224px;
  --bg: #1d1b1e;
  --surface: #252326;
  --raised: #302d32;
  --line: #423d44;
  --muted: #b9b4be;
  --ink: #f3f0f4;
  --accent: #bd9af9;
  --selected-bg: #3c304b;
  --button-ink: #21162f;
  color: var(--ink);
  background: var(--bg);
}
.pro-app.pro-light {
  color-scheme: light;
  --bg: #f7f6f4;
  --surface: #fff;
  --raised: #eeebee;
  --line: #d2cdd3;
  --muted: #615b67;
  --ink: #262229;
  --accent: #724dab;
  --selected-bg: #e7ddf5;
  --button-ink: white;
}
.pro-app .sidebar {
  padding: 0 8px;
}
.pro-brand {
  height: 57px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  margin: 0 -8px 9px;
  padding: 0 20px;
}
.pro-brand .brand {
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.7px;
}
.pro-brand .brand img {
  width: 23px;
  height: 23px;
}
.pro-brand small,
.rail-sub h2 {
  font-size: 10px;
  letter-spacing: 0.09em;
  font-weight: 600;
  color: var(--muted);
}
.pro-app .navlink {
  border-radius: 4px;
  font-weight: 400;
  font-size: 14px;
  gap: 11px;
  padding: 8px 11px;
  min-height: 37px;
  margin: 2px 0;
}
.pro-app .navlink.active,
.pro-app .chosen {
  background: var(--selected-bg);
  color: var(--ink);
}
.pro-app .rail-sub {
  padding: 24px 11px 6px;
}
.pro-app .rail-sub h2 {
  text-transform: uppercase;
}
.pro-app .resources {
  padding: 10px 0;
}
.pro-app .topbar {
  height: 57px;
  gap: 8px;
  padding: 0 20px;
  border: 0;
}
.pro-theme,
.pro-app .walletbtn,
.pro-app .iconbtn {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
}
.pro-theme {
  font-size: 19px;
  width: 35px;
  height: 35px;
}
.pro-app .walletbtn,
.pro-app .topbar .primary {
  min-height: 35px;
  font-weight: 500;
  padding: 7px 13px;
  font-size: 13px;
}
.pro-app .primary {
  color: var(--button-ink);
  background: var(--accent);
  border-radius: 4px;
}
.pro-app .secondary,
.pro-app .panel,
.pro-app .empty,
.pro-app .search,
.pro-app .sort,
.pro-app .filter-tabs button,
.pro-app .amount {
  border-radius: 4px;
}
.pro-app .workspace main {
  max-width: 1088px;
  padding: 30px 32px 76px;
}
.pro-app .workspace footer {
  position: fixed;
  bottom: 0;
  left: var(--side);
  right: 0;
  z-index: 2;
  padding: 9px 24px;
  font-size: 11px;
  background: var(--bg);
}
.pro-app .workspace h1,
.pro-app .workspace h2,
.pro-app .workspace h3 {
  font-weight: 500;
  letter-spacing: -0.035em;
}
.pro-app .workspace h1 {
  font-size: 24px;
}
.pro-app .workspace h2 {
  font-size: 19px;
}
.pro-app .workspace .pro-intro h1 {
  font-size: clamp(34px, 3.2vw, 47px);
  font-weight: 400;
  letter-spacing: -0.052em;
}
.pro-intro p,
.pro-shelf p,
.pro-app .title-block p,
.pro-box p,
.pro-faq p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 10px 0;
}
.pro-intro > a,
.pro-shelf header > a {
  font-size: 13px;
  color: var(--ink);
}
.pro-intro > a:hover,
.pro-shelf header > a:hover {
  text-decoration: underline;
}
.pro-switch,
.pro-app .filter-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border-radius: 5px;
  padding: 4px;
  gap: 2px;
}
.pro-switch {
  margin: 19px 0 28px;
}
.pro-switch a,
.plot-controls button,
.pro-app .filter-tabs button {
  font-size: 12px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 3px;
}
.pro-overview,
.pro-builder,
.pro-sim {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.pro-sim {
  grid-template-columns: minmax(230px, 0.78fr) minmax(0, 1.8fr);
  align-items: start;
}
.pro-builder {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.pro-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.pro-box,
.pro-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-width: 0;
}
.pro-box {
  padding: 18px 20px;
  font-size: 14px;
}
.pro-selector {
  padding: 10px 20px;
}
.study-select,
.pro-between,
.pro-amount,
.plot-controls,
.chart-name,
.pro-cardtop,
.pro-cardfoot,
.pro-shelf header,
.pro-leg,
.pro-section-title,
.pro-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.study-select {
  color: var(--muted);
}
.study-select select,
.pro-input {
  background: var(--raised);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 7px;
  min-width: 0;
  max-width: 100%;
  font-size: 13px;
}
.study-select select {
  max-width: 75%;
}
.pro-amount {
  padding: 8px 12px;
  margin-top: 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--raised);
}
.pro-amount span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pro-amount i {
  display: grid;
  place-items: center;
  border: 1px solid #93c4ee;
  border-radius: 50%;
  background: #2679ba;
  color: white;
  width: 22px;
  height: 22px;
  font:
    600 15px "DM Sans",
    sans-serif;
}
.pro-amount input {
  min-width: 0;
  width: 60%;
  text-align: right;
  background: transparent;
  border: 0;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}
.pro-amount input::-webkit-inner-spin-button {
  appearance: none;
}
.pro-between small,
.pro-stats,
.pro-cardfoot,
.pro-cardtop small,
.pro-legend,
.pro-note,
.pro-y,
.pro-x {
  color: var(--muted);
  font-size: 12px;
}
.premium-number {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
}
.premium-number small {
  font-size: 12px;
}
.premium-number small:before,
.pro-legend span:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  background: var(--accent);
  border-radius: 1px;
}
.pro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 17px;
}
.pro-stats > div + div {
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.pro-stats strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.pro-stack > .primary {
  margin-top: 4px;
  min-height: 44px;
}
.pro-chart {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 17px 16px;
}
.plot-controls > div {
  display: flex;
  gap: 2px;
}
.plot-controls button {
  padding: 5px 7px;
  font-size: 11px;
  color: var(--muted);
}
.chart-name {
  justify-content: flex-start;
  margin: 12px 0;
}
.chart-name strong {
  font-size: 14px;
}
.token-stack {
  display: flex;
  padding-left: 3px;
}
.token-stack .token {
  width: 24px;
  height: 24px;
  margin-left: -3px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  font-size: 9px;
  background-color: var(--raised);
}
.token-stack .token-symbol:nth-child(2n) {
  color: #c7d9dc;
  background-color: #444e53;
}
.pro-chart [data-plot] {
  flex: 1;
  display: grid;
  align-items: stretch;
  min-height: 160px;
}
.pro-plot {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(130px, 1fr) 19px;
  gap: 5px 7px;
}
.pro-plot svg {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 130px;
  background: repeating-linear-gradient(
    to top,
    var(--line) 0 1px,
    transparent 1px 49.7%
  );
}
.pro-plot polyline {
  fill: none;
  stroke-width: 2.1;
  stroke: var(--accent);
  vector-effect: non-scaling-stroke;
}
.pro-plot polyline.held {
  stroke: #8da9aa;
  stroke-width: 1.3;
  stroke-dasharray: 4 4;
}
.pro-y {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
}
.pro-x {
  display: flex;
  justify-content: space-between;
}
.pro-y,
.pro-x {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.pro-legend {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 11px;
}
.pro-legend span + span:before {
  background: #8da9aa;
}
.pro-box .pro-nochart {
  align-content: center;
  text-align: center;
  min-height: 108px;
  margin: auto;
  font-size: 13px;
}
.pro-note {
  margin: 9px 0 0;
  font-size: 11px;
}
.pro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.pro-shelf,
.pro-faq {
  margin-top: 53px;
}
.pro-shelf header {
  margin-bottom: 15px;
}
.pro-shelf header > a {
  flex-shrink: 0;
}
.pro-shelf p {
  font-size: 13px;
  margin: 5px 0 0;
}
.pro-card a {
  display: block;
  height: 100%;
  padding: 18px;
}
.pro-card:hover {
  border-color: var(--accent);
}
.pro-card h3 {
  font-size: 20px;
  margin: 18px 0 5px;
  overflow-wrap: anywhere;
}
.pro-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  line-height: 1.5;
  min-height: 36px;
}
.pro-bar {
  display: flex;
  gap: 2px;
  height: 4px;
  margin: 14px 0 16px;
  overflow: hidden;
  border-radius: 2px;
}
.pro-cardfoot {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.pro-cardfoot b {
  font-weight: 500;
}
.pro-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 0;
  font-size: 14px;
}
.pro-faq details {
  border-top: 1px solid var(--line);
}
.pro-faq h2 {
  margin-bottom: 12px;
}
.pro-faq details[open] summary span {
  transform: rotate(45deg);
}
.pro-faq p {
  margin: 0 0 15px;
}
.pro-leg {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 13px;
}
.pro-leg > span:not(.token) {
  margin-right: auto;
}
.pro-leg small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.pro-section-title {
  justify-content: flex-start;
  margin: 0 0 16px;
}
.pro-section-title > span {
  padding: 4px 7px;
  background: var(--selected-bg);
  border-radius: 3px;
  font-size: 11px;
}
.pro-builder .creator {
  max-width: none;
}
.pro-builder .pro-input,
.pro-sim .pro-input {
  width: 100%;
  display: block;
  margin-top: 8px;
}
.pro-builder .creator label {
  display: block;
}
.pro-builder .creator label.mix-row {
  display: flex;
}
.pro-builder #draft-weights {
  margin: 10px 0;
}
.pro-builder #create-error:empty {
  display: none;
}
.pro-app .wallet-panel {
  margin-top: 14px;
}
.pro-light .gain {
  color: #286d48;
}
.pro-light .loss {
  color: #a03f4a;
}
@media (max-width: 1000px) {
  .pro-app {
    --side: 192px;
  }
  .pro-app .workspace main {
    padding-inline: 20px;
  }
  .pro-overview {
    grid-template-columns: 1fr 1fr;
  }
  .pro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (max-width: 760px) {
  .pro-app {
    --side: 0px;
  }
  .pro-app .sidebar {
    width: 224px;
  }
  .pro-app .topbar {
    padding: 0 12px;
    gap: 6px;
  }
  .pro-app .workspace main {
    padding: 20px 16px 32px;
  }
  .pro-app .workspace footer {
    position: static;
  }
  .pro-app .bottom-nav .navlink {
    min-width: 0;
    margin: 0;
    gap: 3px;
    padding: 6px 1px;
    font-size: 10px;
  }
  .pro-app .topbar .primary,
  .pro-app .walletbtn {
    font-size: 12px;
    padding: 6px 8px;
  }
  .pro-overview,
  .pro-sim,
  .pro-builder {
    grid-template-columns: minmax(0, 1fr);
  }
  .pro-box {
    padding: 15px;
  }
  .pro-chart {
    min-height: 280px;
  }
  .pro-switch {
    margin-bottom: 22px;
  }
  .pro-shelf,
  .pro-faq {
    margin-top: 35px;
  }
  .pro-app .filter-tabs {
    flex-wrap: wrap;
    border-radius: 4px;
  }
  .pro-intro p {
    max-width: 52ch;
  }
}
@media (max-width: 530px) {
  .pro-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pro-card a {
    padding: 14px;
  }
  .pro-card h3 {
    margin-top: 10px;
  }
  .pro-card p {
    min-height: 0;
  }
}
.draft-history {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.draft-history small {
  display: block;
  color: var(--muted);
  margin: 4px 0 14px;
}
.draft-history .pro-plot {
  min-height: 164px;
}
.pro-builder .creator .mix-row input {
  width: 90px;
  border-radius: 3px;
  padding: 7px;
}
.pro-app .pro-wallet {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 5px;
  padding: 32px 16px;
}
.pro-app .pro-wallet .empty-icon,
.pro-app .pro-wallet .secondary {
  margin: 0;
}
.rail-toggle {
  display: block;
  width: 100%;
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding: 4px;
  color: var(--muted);
  font-size: 16px;
}
@media (min-width: 761px) {
  .pro-app.rail-compact {
    --side: 64px;
  }
  .rail-compact .pro-brand {
    justify-content: center;
    padding: 0;
  }
  .rail-compact .brand {
    font-size: 0;
  }
  .rail-compact .pro-brand small,
  .rail-compact .sidebar .rail-sub,
  .rail-compact .sidebar .navlink span {
    display: none;
  }
  .rail-compact .sidebar .navlink {
    justify-content: center;
    gap: 0;
    font-size: 0;
  }
  .rail-compact .rail-toggle {
    transform: rotate(180deg);
  }
}
@media (max-width: 760px) {
  .rail-toggle {
    display: none;
  }
}
