
.cse-trade-wrap{ margin: 10px 0 0; }
.cse-trade-box{
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 18px;
  padding: 12px 12px 10px;
  background: rgba(255,255,255,0.9);
  /* Default trade UI typography to Inter to match the site body */
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.cse-trade-box__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.cse-trade-box__title{
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  /* Title uses Franklin stack; everything else stays Inter */
  font-family: "FranklinGothicHeavyItalic", "Franklin Gothic Heavy", "Franklin Gothic", "Arial Black", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.cse-trade-box__meta{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cse-trade-pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 12px;
}

/* Watch pill (in header meta) */
.cse-trade-pill--watch{
  cursor:pointer;
  background: #fff;
  color: #000;
  border-color: #000;
}
.cse-trade-pill--watch.is-watching,
[data-cse-watching="1"] .cse-trade-pill--watch{
  background: #91F88D;
  border-color: #91F88D;
  color: #000;
}
.cse-trade-row{
  display:flex;
  align-items:flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.cse-trade-price{ font-weight: 900; }
.cse-trade-total,
.cse-trade-available{
  font-weight: 900;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.75);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cse-trade-qty span{
  display:block;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing:0.02em;
  font-size: 12px;
  margin-bottom: 6px;
}
.cse-trade-qty input{
  width: 120px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
}
.cse-trade-actions{ display:flex; gap: 8px; }
.cse-trade-btn{
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.85);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing:0.02em;
  cursor:pointer;
}

/* Primary actions */
.cse-trade-btn--buy{
  background: #91F88D;
  border-color: #91F88D;
  color: #fff;
}
.cse-trade-btn--sell{
  background: #d32f2f;
  border-color: #d32f2f;
  color: #fff;
}

.cse-trade-btn--watch{
  background: #000;
  border-color: #000;
  color: #fff;
}
.cse-trade-btn--watch.is-watching,
[data-cse-watching="1"] .cse-trade-btn--watch{
  background: #91F88D;
  border-color: #91F88D;
  color: #000;
}
.cse-trade-btn[disabled]{ opacity: 0.5; cursor: not-allowed; }
.cse-trade-btn:hover, .cse-trade-btn:focus-visible{
  box-shadow:
    0 6px 18px rgba(145, 248, 141, 0.45),
    0 0 0 3px rgba(145, 248, 141, 0.35);
  transform: translateY(-1px);
  outline:none;
}
.cse-trade-msg{ margin-top: 10px; font-weight: 800; min-height: 18px; }
.cse-trade-msg.is-error{ color: #b00020; }
.cse-trade-msg.is-success{ color: #0b6b2a; }
.cse-trade-box__hint{ margin-top: 8px; font-weight: 800; }
.cse-trade-box__watchhint{ margin-top: 10px; font-weight: 800; opacity: 0.95; }

/* Watchlist tiles */
.cse-watchlist-page,
.cse-watchlist{
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.cse-watchlist-page{ max-width: 980px; margin: 0 auto; padding: 18px 16px; }
.cse-watchlist-page__title{
  margin: 0 0 14px 0;
  font-family: pqfranklin, "PQFranklin", "Franklin Gothic Heavy", "Franklin Gothic Heavy Italic", "Arial Black", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
}

.cse-watchlist{ margin-top: 22px; }
.cse-watchlist__title{
  font-size: 18px;
  margin: 0 0 8px;
  font-family: pqfranklin, "PQFranklin", "Franklin Gothic Heavy", "Franklin Gothic Heavy Italic", "Arial Black", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.cse-watchlist__note{ font-weight: 800; margin-bottom: 10px; opacity: 0.9; }

/* Logged-out Watchlist CTA (Level 4) */
.cse-watchlist-guest{ margin-top: 18px; }
.cse-watchlist-guest__card{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:18px;
  padding:18px;
  box-shadow:0 14px 35px rgba(0,0,0,.06);
  max-width: 720px;
}
.cse-watchlist-guest__kicker{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#91F88D;
  color:#000;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing:0.02em;
  font-size:12px;
}
.cse-watchlist-guest__title{
  margin:12px 0 8px;
  font-family: pqfranklin, "PQFranklin", "Franklin Gothic Heavy", "Franklin Gothic Heavy Italic", "Arial Black", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing:0.02em;
  font-size: 28px;
  line-height: 1.05;
}
.cse-watchlist-guest__copy{ font-weight: 800; opacity: 0.92; line-height: 1.35; }
.cse-watchlist-guest__actions{ margin-top: 14px; display:flex; gap: 12px; align-items:center; flex-wrap:wrap; }
.cse-watchlist-guest__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 160px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #91F88D;
  color:#000;
  text-decoration:none;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing:0.02em;
}
.cse-watchlist-guest__btn:hover,
.cse-watchlist-guest__btn:focus-visible{
  color:#000;
  text-decoration:none;
  box-shadow:
    0 10px 28px rgba(145, 248, 141, 0.45),
    0 0 0 3px rgba(145, 248, 141, 0.35);
  transform: translateY(-1px);
  outline:none;
}
.cse-watchlist-guest__link{ font-weight: 900; color:#000; text-decoration:none; opacity: 0.8; }
.cse-watchlist-guest__link:hover{ opacity: 1; text-decoration: underline; }

@media (max-width: 680px){
  .cse-watchlist-guest__title{ font-size: 24px; }
  .cse-watchlist-guest__card{ padding: 16px; }
}
.cse-watch-tiles{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cse-watch-tile{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  padding:14px;
  box-shadow:0 10px 25px rgba(0,0,0,.04);
}
.cse-watch-tile__top{ display:flex; align-items:baseline; justify-content:space-between; gap: 10px; }
.cse-watch-tile__name{
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing:0.02em;
  color:#000;
  text-decoration:none;
  line-height:1.1;
}
.cse-watch-tile__name:hover{ text-decoration: underline; }
.cse-watch-tile__price{ font-weight: 1000; }
.cse-watch-tile__price span{ font-weight: 900; opacity: 0.7; font-size: 12px; text-transform: uppercase; }
.cse-watch-tile__mid{ margin-top: 10px; display:flex; gap: 12px; align-items:center; }
.cse-watch-tile__spark{ flex: 1; color:#000; opacity: 0.9; }
.cse-spark{ width: 100%; height: 24px; display:block; }
.cse-watch-tile__stats{ display:flex; gap: 10px; }
.cse-watch-stat{
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:10px;
  background:rgba(0,0,0,.02);
}
.cse-watch-stat__k{ font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing:0.02em; opacity: 0.7; margin-bottom: 4px; }
.cse-watch-stat__v{ font-size: 13px; font-weight: 900; }

@media (max-width: 680px){
  .cse-watch-tiles{ grid-template-columns: 1fr; }
}

/* Logged-out CTA links should stay black and clean */
.cse-trade-box__hint a,
.cse-trade-box__hint a:link,
.cse-trade-box__hint a:visited{
  color:#000;
  text-decoration:none;
}
.cse-trade-box__hint a:hover,
.cse-trade-box__hint a:active,
.cse-trade-box__hint a:focus,
.cse-trade-box__hint a:focus-visible{
  color:#000;
  text-decoration:none;
}

/* Per-lot sell lock helper */
.cse-trade-lock{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.25;
  color: #000;
  opacity: 0.75;
}

/* Inline placement under the entity header pills */
.cse-trade-inline{ margin-top: 12px; }
.cse-trade-inline .cse-trade-box{ max-width: 520px; }

@media (max-width: 520px){
  .cse-trade-inline .cse-trade-box{ max-width: 100%; }
  .cse-trade-row{ flex-direction: column; align-items: stretch; }
  .cse-trade-actions{ width: 100%; }
  .cse-trade-btn{ width: 100%; justify-content: center; }
  .cse-trade-qty{ width: 100%; justify-content: space-between; }
  .cse-trade-qty input{ width: 110px; }
}


/* ===== CSE Portfolio (Account) ===== */
.cse-portfolio{margin:24px 0; padding:16px; border:1px solid rgba(0,0,0,.10); border-radius:16px; background:#fff;}
.cse-portfolio__title{margin:0 0 8px 0; font-size:18px; line-height:1.2;}
.cse-portfolio__note{margin:0 0 14px 0; font-size:13px; opacity:.75;}
.cse-portfolio__tablewrap{overflow:auto;}
.cse-portfolio__table{width:100%; border-collapse:collapse; min-width:860px;}
.cse-portfolio__table th,.cse-portfolio__table td{padding:10px 12px; border-bottom:1px solid rgba(0,0,0,.08); text-align:left; font-size:14px; vertical-align:top;}
.cse-portfolio__table th{font-weight:700; background:rgba(0,0,0,.02);}
.cse-portfolio__name a{text-decoration:none;}
.cse-portfolio__lots{white-space:nowrap;}

/* Lots details */
.cse-lots summary{cursor:pointer; user-select:none; font-weight:700;}
.cse-lots__inner{margin-top:10px;}
.cse-lots__table{width:100%; border-collapse:collapse; min-width:520px;}
.cse-lots__table th,.cse-lots__table td{padding:8px 10px; border-bottom:1px solid rgba(0,0,0,.08); font-size:13px; text-align:left;}
.cse-lot{display:inline-block; padding:2px 8px; border-radius:999px; font-size:12px; font-weight:700;}
.cse-lot--sellable{background:rgba(145,248,141,.85); color:#000;}
.cse-lot--locked{background:rgba(0,0,0,.08); color:#000;}

/* Mobile: stack the lots table so it never overflows the viewport */
@media (max-width: 640px){
  .cse-lots__table{min-width:0;}
  .cse-lots__table thead{display:none;}
  .cse-lots__table,
  .cse-lots__table tbody,
  .cse-lots__table tr,
  .cse-lots__table td{display:block; width:100%;}
  .cse-lots__table tr{
    margin:10px 0;
    border:1px solid rgba(0,0,0,.10);
    border-radius:12px;
    overflow:hidden;
  }
  .cse-lots__table td{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
  }
  .cse-lots__table td::before{
    content: attr(data-label);
    font-weight:800;
    opacity:.7;
  }
  .cse-lots__table td:last-child{border-bottom:0;}
}


/* ===== CSE Portfolio Tiles (Account) ===== */
.cse-portfolio--tiles{padding:0; border:0; background:transparent;}
.cse-tiles{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:12px 0 0;}
@media (max-width: 1024px){.cse-tiles{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 640px){.cse-tiles{grid-template-columns:1fr;}}

/* Account / Public profile panes are narrower than the main site grid.
   Force one tile per row to avoid overflow/overspill. */
.pq-account .cse-tiles,
.pq-public-profile .cse-tiles,
body.pq-public-profile .cse-tiles{
  grid-template-columns: 1fr !important;
}

.cse-tile{background:#fff; border:1px solid rgba(0,0,0,.10); border-radius:16px; padding:14px; box-shadow:0 10px 25px rgba(0,0,0,.04);}
.cse-tile__top{display:flex; align-items:flex-start; justify-content:space-between; gap:10px;}
.cse-tile__name{font-weight:900; text-transform:uppercase; letter-spacing:.4px; color:#000; text-decoration:none; line-height:1.1;}
.cse-tile__name:hover{ text-decoration:underline; }
.cse-tile__chips{display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end;}
.cse-chip{display:inline-flex; gap:6px; align-items:center; padding:6px 10px; border-radius:999px; background:rgba(0,0,0,.06); color:#000; font-size:12px;}
.cse-chip strong{font-weight:900;}
.cse-tile__row{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px;}
.cse-stat{border:1px solid rgba(0,0,0,.08); border-radius:12px; padding:10px; background:rgba(0,0,0,.02);}
.cse-stat__k{font-size:12px; opacity:.7; margin-bottom:4px;}
.cse-stat__v{font-size:14px; font-weight:800;}
.cse-tile__lots{margin-top:12px;}
.cse-tile__lotslabel{font-size:12px; opacity:.7; margin-bottom:6px; font-weight:700;}
.cse-tile .cse-lots summary{font-weight:800;}


/* === Account Portfolio (Tiles) Text Fix === */
.pq-account .cse-portfolio--tiles,
.pq-account .cse-portfolio--tiles *,
.pq-account .cse-tiles,
.pq-account .cse-tile,
.pq-account .cse-tile *{
  color:#000 !important;
}

.pq-account .cse-tile{ background:#fff !important; }
.pq-account .cse-tile__name,
.pq-account .cse-tile__name:visited{ color:#000 !important; }

.pq-account .cse-chip{ background:rgba(0,0,0,.06) !important; color:#000 !important; }
.pq-account .cse-stat{ background:rgba(0,0,0,.02) !important; }
.pq-account .cse-stat__k{ color:rgba(0,0,0,.65) !important; }
.pq-account .cse-stat__v{ color:#000 !important; }

.pq-account .cse-portfolio__title,
.pq-account .cse-portfolio__note{ color:#fff !important; }
/* title/note sit on dark pane; keep white */


/* === Public profile CSE: ensure contrast + remove grey fills (requested) === */
.pq-public-profile [style*="background:#000"],
.pq-public-profile [style*="background: #000"],
.pq-public-profile [style*="background:black"],
.pq-public-profile [style*="background: black"],
body.pq-public-profile [style*="background:#000"],
body.pq-public-profile [style*="background: #000"],
body.pq-public-profile [style*="background:black"],
body.pq-public-profile [style*="background: black"]{
  color:#fff !important;
}
.pq-public-profile [style*="background:#000"] *,
.pq-public-profile [style*="background: #000"] *,
.pq-public-profile [style*="background:black"] *,
.pq-public-profile [style*="background: black"] *,
body.pq-public-profile [style*="background:#000"] *,
body.pq-public-profile [style*="background: #000"] *,
body.pq-public-profile [style*="background:black"] *,
body.pq-public-profile [style*="background: black"] *{
  color:#fff !important;
}

/* Grey chips/boxes -> white on public profile */
.pq-public-profile .cse-chip,
body.pq-public-profile .cse-chip{
  background:#fff !important;
  border:1px solid rgba(0,0,0,.12) !important;
  color:#000 !important;
}
.pq-public-profile .cse-stat,
body.pq-public-profile .cse-stat{
  background:#fff !important;
}
