/* ============================================================
   DragonCrypt Terminal — look densifié type Hyperliquid
   ============================================================ */
:root,
[data-bs-theme="dark"] {
  --hl-bg: #0b0e11;
  --hl-panel: #12161c;
  --hl-panel-2: #181c25;
  --hl-border: #1e2329;
  --hl-border-2: #2b3139;
  --hl-text: #eaecef;
  --hl-muted: #848e9c;
  --hl-accent: #50e3c2;
  --hl-accent-dim: #1a9b7e;
  --hl-buy: #0ecb81;
  --hl-sell: #f6465d;
  --hl-warn: #f0b90b;
  /* Same gold as top “N strikes” pill */
  --hl-strike: #c8a96e;
  --hl-strike-hi: #e0c992;
  --hl-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hl-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/*
 * Shell unique : html/body jamais en scroll document.
 * Header .hl-top hors de .hl-shell-main → largeur nav identique Trade ↔ autres pages.
 * Scroll uniquement dans .hl-shell-main (ou sous-panneaux trade).
 */
html {
  height: 100%;
  margin: 0;
  background: var(--hl-bg);
  overflow: hidden;
}
html, body.hl-body {
  margin: 0;
  background: var(--hl-bg);
  color: var(--hl-text);
  font-family: var(--hl-font);
  font-size: 13px;
}
body.hl-body {
  height: 100%;
  overflow: hidden;
}

.num, .hl-mono {
  font-family: var(--hl-mono);
  font-variant-numeric: tabular-nums;
}

.gain, .hl-buy { color: var(--hl-buy) !important; }
.loss, .hl-sell { color: var(--hl-sell) !important; }

/* ---- Shell ---- */
.hl-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

/* Zone sous le header : seule région qui peut scroller (pages) ou contenir le trade */
.hl-shell-main {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  overflow: hidden; /* /trade : les enfants gèrent le scroll */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
/* Portfolio / Plans / Account : scroll ici, header inchangé */
body.hl-scroll .hl-shell-main {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

/* Footer légal — bas de shell, hors zone de scroll */
.hl-footer {
  flex: 0 0 auto;
  padding: .4rem .85rem .5rem;
  background: var(--hl-panel);
  border-top: 1px solid var(--hl-border);
  z-index: 15;
}
.hl-footer-disclaimer {
  margin: 0;
  font-size: .65rem;
  line-height: 1.45;
  color: var(--hl-muted);
  max-width: none; /* full footer width — avoid mid-phrase orphans */
}
.hl-footer-copy {
  margin: .2rem 0 0;
  font-size: .62rem;
  letter-spacing: .04em;
  color: rgba(132, 142, 156, .75);
}

.hl-top {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 .85rem;
  background: var(--hl-panel);
  border-bottom: 1px solid var(--hl-border);
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
  /* jamais sticky document — toujours dans le flex shell */
  position: relative;
}
.hl-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--hl-text);
  text-decoration: none;
  white-space: nowrap;
}
.hl-brand-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--hl-accent), var(--hl-accent-dim));
}
.hl-brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
/* Trading mode pill — LIVE cyan / SIM muted (header always) */
.hl-top .hl-mode-live,
.hl-top .hl-mode-sim {
  flex-shrink: 0;
  font-family: var(--hl-mono, ui-monospace, monospace);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  padding: .2rem .45rem;
  border-radius: 4px;
  line-height: 1.2;
  user-select: none;
}
.hl-top .hl-mode-live {
  color: #041018 !important;
  background: #22d3ee !important;
  box-shadow: 0 0 12px rgba(34, 211, 238, .45);
}
.hl-top .hl-mode-sim {
  color: #8b919a !important;
  background: #1a1d24 !important;
  border: 1px solid #2a2e38;
}
.hl-nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}
.hl-nav a {
  color: var(--hl-muted);
  text-decoration: none;
  padding: .4rem .65rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
}
.hl-nav a:hover { color: var(--hl-text); background: var(--hl-panel-2); }
.hl-nav a.active { color: var(--hl-text); background: var(--hl-panel-2); }

.hl-top-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}
.hl-reserve {
  font-family: var(--hl-mono);
  font-size: .8rem;
  color: var(--hl-accent);
  white-space: nowrap;
}
.hl-reserve span { color: var(--hl-muted); font-weight: 400; }

/* Nav: designated seller strike count (member identity strip) */
.hl-seller-strikes {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .18rem .55rem .18rem .45rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hl-strike) 35%, transparent);
  background: linear-gradient(135deg, rgba(42, 32, 16, .75), rgba(58, 46, 24, .45));
  color: var(--hl-strike);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
}
.hl-seller-strikes:hover {
  color: var(--hl-strike-hi);
  border-color: color-mix(in srgb, var(--hl-strike) 65%, transparent);
  background: linear-gradient(135deg, rgba(50, 38, 18, .9), rgba(70, 54, 28, .55));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hl-strike) 12%, transparent);
}
.hl-seller-strikes.has-strikes {
  border-color: rgba(200, 169, 110, .5);
}
.hl-seller-strikes-ico {
  font-size: .72rem;
  opacity: .9;
  line-height: 1;
}
.hl-seller-strikes-n {
  font-family: var(--hl-mono);
  font-size: .8rem;
  font-weight: 700;
  min-width: .7em;
  text-align: center;
}
.hl-seller-strikes-l {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .8;
}

.hl-user {
  color: var(--hl-muted);
  font-size: .8rem;
  text-decoration: none;
}
.hl-user:hover { color: var(--hl-text); }

/* ---- Body: main + side (/trade) ---- */
.hl-body-row {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hl-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--hl-border);
}

.hl-ticker {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center; /* was baseline — broke image/medallion vs text */
  gap: .55rem 1.1rem;
  padding: .55rem .85rem;
  background: var(--hl-bg);
  border-bottom: 1px solid var(--hl-border);
}
/* Label book — pas de pastille (évite tout fond Bootstrap / highlight) */
.hl-ticker .hl-ticker-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hl-muted);
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  border: 0;
  box-shadow: none;
}
/* Paire sélectionnée (ex. BONK-USDC) */
.hl-ticker .pair {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--hl-text);
  background: transparent !important;
}
/* Ancien class "mark" = conflit Bootstrap (.mark = fond jaune highlight) */
.hl-ticker .hl-mark,
.hl-ticker .mark {
  font-family: var(--hl-mono);
  font-size: 1.05rem;
  font-weight: 600;
  background: transparent !important;
  background-color: transparent !important;
  color: inherit;
  padding: 0 !important;
}
.hl-ticker .meta {
  font-size: .75rem;
  color: var(--hl-muted);
}
.hl-ticker .meta b {
  font-family: var(--hl-mono);
  font-weight: 600;
  color: var(--hl-text);
  margin-left: .25rem;
}
.hl-ticker .hl-ticker-avg {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.hl-ticker .hl-ticker-avg .hl-spark {
  padding: 0;
  gap: 0;
}
.hl-ticker .hl-ticker-avg .hl-spark svg {
  display: block;
}
/* Realized closed — pin to the right of the Open positions strip */
.hl-ticker .hl-ticker-realized {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .35rem;
  padding-left: .65rem;
  border-left: 1px solid var(--hl-border);
  white-space: nowrap;
}
.hl-ticker .hl-ticker-realized-k {
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--hl-muted);
}
.hl-ticker .hl-ticker-realized b {
  font-size: .95rem;
  margin-left: 0;
}
.hl-ticker .hl-ticker-realized-s {
  font-size: .68rem;
  color: var(--hl-muted);
  font-weight: 400;
}
@media (max-width: 900px) {
  .hl-ticker .hl-ticker-realized {
    margin-left: 0;
    width: 100%;
    border-left: 0;
    padding-left: 0;
    padding-top: .25rem;
    border-top: 1px solid var(--hl-border);
  }
}

.hl-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  padding: .4rem .75rem;
  background: var(--hl-bg);
  border-bottom: 1px solid var(--hl-border);
}
.hl-toolbar .hl-chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 4px;
  border: 1px solid var(--hl-border-2);
  background: var(--hl-panel);
  color: var(--hl-muted);
  font-size: .72rem;
  text-decoration: none;
  cursor: pointer;
}
.hl-toolbar .hl-chip:hover,
.hl-toolbar .hl-chip.on {
  color: var(--hl-text);
  border-color: var(--hl-accent-dim);
  background: var(--hl-panel-2);
}
.hl-toolbar input[type="search"] {
  background: var(--hl-panel);
  border: 1px solid var(--hl-border-2);
  color: var(--hl-text);
  border-radius: 4px;
  padding: .25rem .5rem;
  font-size: .75rem;
  min-width: 10rem;
}
.hl-toolbar input:focus {
  outline: none;
  border-color: var(--hl-accent-dim);
}
/* Légende Rebuy/Exit : far ——progress bar—— near (inline styles also on span for deploy lag) */
.hl-toolbar .hl-color-legend {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .2rem .45rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .03em;
  white-space: nowrap;
}
.hl-toolbar .hl-color-legend-grad {
  display: inline-block !important;
  width: 12rem !important;
  min-width: 6rem;
  height: 8px !important;
  border-radius: 4px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, #e74c3c 0%, #e6b84d 50%, #2ecc71 100%) !important;
  border: 1px solid rgba(255, 255, 255, .12);
}
@media (max-width: 900px) {
  .hl-toolbar .hl-color-legend {
    margin-left: 0;
  }
  .hl-toolbar .hl-color-legend-grad {
    width: 8rem !important;
  }
}

/* Table zone */
.hl-table-wrap {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
  background: var(--hl-bg);
}
.hl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .72rem;
}
.hl-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--hl-panel);
  color: var(--hl-muted);
  font-weight: 500;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .4rem .4rem;
  border-bottom: 1px solid var(--hl-border);
  white-space: nowrap;
  text-align: right;
}
.hl-table thead th:first-child,
.hl-table thead th.text-start { text-align: left; }
.hl-table thead th.text-center { text-align: center; }
.hl-table thead th.hl-th-sort a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, .18);
}
.hl-table thead th.hl-th-sort a:hover {
  color: var(--hl-accent);
  border-bottom-color: var(--hl-accent);
}
.hl-table thead th.hl-th-sort.on a {
  color: var(--hl-accent);
  border-bottom-style: solid;
}

.hl-table tbody td {
  padding: .32rem .4rem;
  border-bottom: 1px solid var(--hl-border);
  white-space: nowrap;
  text-align: right;
  color: var(--hl-text);
  vertical-align: middle;
}
.hl-table tbody td:first-child,
.hl-table tbody td.text-start { text-align: left; }
.hl-table tbody td.text-center { text-align: center; }

.hl-table tbody tr {
  cursor: pointer;
  transition: background .08s;
}
.hl-table tbody tr:hover { background: rgba(80, 227, 194, .04); }
.hl-table tbody tr.selected {
  background: rgba(80, 227, 194, .08);
  box-shadow: inset 2px 0 0 var(--hl-accent);
}

.hl-uuid {
  font-family: var(--hl-mono);
  font-size: .7rem;
  color: var(--hl-accent);
  text-decoration: none;
  border: 1px solid rgba(80, 227, 194, .35);
  border-radius: 3px;
  padding: .05rem .35rem;
  background: transparent;
  cursor: pointer;
}
button.hl-uuid { appearance: none; }
.hl-uuid:hover { background: rgba(80, 227, 194, .12); color: var(--hl-accent); }

.hl-clear-sel {
  background: none;
  border: 0;
  color: var(--hl-muted);
  font-size: .9rem;
  cursor: pointer;
  line-height: 1;
  padding: .2rem;
}
.hl-clear-sel:hover { color: var(--hl-text); }
.hl-ticker-pair {
  border-top: 1px solid var(--hl-border);
  background: linear-gradient(180deg, rgba(80, 227, 194, .04), transparent);
  align-items: center !important;
}
.hidden { display: none !important; }

/* Mini chart */
.hl-chart-wrap {
  flex: 0 0 auto;
  background: var(--hl-bg);
  border-bottom: 1px solid var(--hl-border);
  padding: .35rem .6rem .45rem;
  position: relative;
}
.hl-chart-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .25rem;
  font-size: .7rem;
  color: var(--hl-muted);
}
.hl-chart-head #chart-title {
  font-weight: 600;
  color: var(--hl-text);
  letter-spacing: .02em;
}
.hl-chart-legend {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .62rem;
}
.hl-chart-legend .lg {
  display: inline-block;
  width: 10px;
  height: 2px;
  margin-right: .2rem;
  vertical-align: middle;
  border-radius: 1px;
}
.hl-chart-legend .lg.entry { background: #f0b90b; }
.hl-chart-legend .lg.rebuy { background: #50e3c2; }
.hl-chart-legend .lg.exit { background: #0ecb81; }
.hl-chart-legend .lg.mark { background: #eaecef; }
.hl-chart-meta { margin-left: auto; font-size: .68rem; }
#hl-chart {
  display: block;
  width: 100%;
  height: 148px;
}
.hl-chart-empty {
  position: absolute;
  inset: 2rem 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hl-muted);
  font-size: .8rem;
}

.hl-pa {
  display: inline-block;
  min-width: 1.2rem;
  padding: .05rem .3rem;
  border-radius: 3px;
  border: 1px solid var(--hl-border-2);
  font-size: .65rem;
  font-weight: 700;
  color: var(--hl-warn);
}
.hl-bit {
  font-family: var(--hl-mono);
  font-size: .65rem;
  opacity: .4;
}
.hl-bit.on {
  opacity: 1;
  color: var(--hl-accent);
}

/* Side panel */
.hl-side {
  flex: 0 0 340px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--hl-panel);
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 991px) {
  .hl-body-row { flex-direction: column; }
  .hl-side {
    flex: 0 0 auto;
    max-height: 45vh;
    border-top: 1px solid var(--hl-border);
  }
}

.hl-side-head {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--hl-border);
}
.hl-side-head h2 {
  margin: 0;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hl-muted);
}
.hl-side-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: .85rem;
}
.hl-side-empty {
  color: var(--hl-muted);
  font-size: .85rem;
  padding: 2rem .5rem;
  text-align: center;
  line-height: 1.5;
}

.hl-side-pair {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .15rem;
}
.hl-side-id {
  font-family: var(--hl-mono);
  font-size: .75rem;
  color: var(--hl-muted);
  margin-bottom: .35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .45rem;
}
/* Selected cert identity — dominant */
.hl-side-id--current {
  margin-bottom: .35rem;
  color: var(--hl-text);
}
.hl-uuid--current {
  font-size: .78rem;
  font-weight: 700;
  color: var(--hl-accent);
  border-color: rgba(80, 227, 194, .55);
  background: rgba(80, 227, 194, .1);
  padding: .12rem .4rem;
  cursor: default;
}
.hl-pa--current {
  font-family: var(--hl-mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--hl-text);
  letter-spacing: .02em;
}
.hl-side-id--current .hl-lineage-status {
  font-size: .72rem;
  font-weight: 600;
}

.hl-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
  margin-bottom: .9rem;
}
.hl-kpi .k {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hl-muted);
  margin-bottom: .1rem;
}
.hl-kpi .v {
  font-family: var(--hl-mono);
  font-size: .82rem;
  font-weight: 600;
}

.hl-side-mark-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: .85rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--hl-border);
}
.hl-side-mark-row .k {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hl-muted);
  margin-bottom: .15rem;
}
.hl-side-mark-row .big {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.hl-dual {
  margin-bottom: .9rem;
}
.hl-dual-labels {
  display: flex;
  justify-content: space-between;
  font-size: .65rem;
  color: var(--hl-muted);
  margin-bottom: .25rem;
}
/* Barre −100 … 0 … +100 avec curseur */
.hl-signed-track {
  position: relative;
  height: 8px;
  background: linear-gradient(90deg, rgba(246,70,93,.15), #1a1f27 50%, rgba(14,203,129,.15));
  border-radius: 4px;
  border: 1px solid var(--hl-border);
}
.hl-signed-center {
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  background: var(--hl-muted);
  opacity: .7;
  z-index: 1;
}
.hl-signed-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: .85;
  border-radius: 2px;
}
.hl-signed-fill.up { background: var(--hl-buy); }
.hl-signed-fill.down { background: var(--hl-sell); }
.hl-signed-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--hl-text);
  border: 2px solid var(--hl-accent);
  box-shadow: 0 0 0 2px rgba(11, 14, 17, .8);
  z-index: 2;
}

/* Pagination terminal (sans Tailwind) — classes .hl-pg* (pas .hl-page) */
.hl-pages {
  display: flex;
  align-items: center;
  gap: .2rem;
}
.hl-pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 .35rem;
  border-radius: 4px;
  border: 1px solid var(--hl-border-2);
  background: var(--hl-panel-2);
  color: var(--hl-muted);
  font-family: var(--hl-mono);
  font-size: .72rem;
  text-decoration: none;
  cursor: pointer;
}
a.hl-pg:hover {
  color: var(--hl-text);
  border-color: var(--hl-accent-dim);
}
.hl-pg.on {
  background: var(--hl-accent);
  border-color: var(--hl-accent);
  color: #04150e;
  font-weight: 700;
  cursor: default;
}
.hl-pg.off {
  opacity: .35;
  cursor: default;
}

.hl-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: .7rem .9rem;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  text-align: center;
  margin-bottom: .5rem;
}
.hl-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.hl-btn-buy {
  background: var(--hl-buy);
  color: #04150e;
}
.hl-btn-buy:hover:not(:disabled) { filter: brightness(1.08); }
.hl-btn-sell {
  background: transparent;
  border: 1px solid var(--hl-sell);
  color: var(--hl-sell);
}
.hl-btn-sell:hover:not(:disabled) { background: rgba(246, 70, 93, .12); }
.hl-btn-warn {
  background: var(--hl-warn);
  color: #1a1200;
}
.hl-btn-muted {
  background: var(--hl-panel-2);
  color: var(--hl-muted);
  border: 1px solid var(--hl-border-2);
}
.hl-hint {
  font-size: .72rem;
  color: var(--hl-muted);
  margin-bottom: .5rem;
  line-height: 1.4;
}
.hl-msg { font-size: .78rem; margin-bottom: .5rem; min-height: 1.2em; }

.hl-flags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: .75rem 0;
}
.hl-flag {
  font-family: var(--hl-mono);
  font-size: .65rem;
  padding: .1rem .35rem;
  border-radius: 3px;
  background: var(--hl-panel-2);
  border: 1px solid var(--hl-border-2);
  color: var(--hl-muted);
}
.hl-flag.on {
  color: var(--hl-accent);
  border-color: rgba(80, 227, 194, .4);
}

details.hl-more {
  margin-top: .5rem;
  border-top: 1px solid var(--hl-border);
  padding-top: .5rem;
}
details.hl-more summary {
  cursor: pointer;
  color: var(--hl-muted);
  font-size: .78rem;
  font-weight: 600;
}
.hl-more-row {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  font-size: .72rem;
  padding: .28rem 0;
  border-bottom: 1px dashed var(--hl-border);
}
.hl-more-row .k { color: var(--hl-muted); }
.hl-more-row .v { font-family: var(--hl-mono); }
.hl-more-section {
  margin-top: .55rem;
  padding-top: .4rem;
  border-top: 1px solid var(--hl-border);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hl-muted);
}
.hl-lineage-hint {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .4rem;
  margin: .15rem 0 .55rem;
  font-size: .72rem;
  color: var(--hl-muted);
}
.hl-lineage-hint .k { color: var(--hl-muted); }
.hl-lineage-arrow {
  color: var(--hl-muted);
  font-family: var(--hl-mono);
}
.hl-lineage-count {
  color: var(--hl-muted);
  font-size: .68rem;
}
/* Parent / ancestor line — fully muted (current PA wins visual hierarchy) */
.hl-lineage-hint--ancestor {
  opacity: .85;
  margin-bottom: .75rem;
}
.hl-uuid--muted,
button.hl-uuid.hl-uuid--muted {
  color: var(--hl-muted) !important;
  border-color: rgba(132, 142, 156, .35);
  background: transparent;
  font-weight: 400;
  font-size: .68rem;
}
button.hl-uuid.hl-uuid--muted:hover {
  color: var(--hl-text) !important;
  border-color: rgba(132, 142, 156, .55);
  background: rgba(132, 142, 156, .08);
  text-decoration: none;
}
.hl-pa--muted {
  font-family: var(--hl-mono);
  font-size: .68rem;
  font-weight: 400;
  color: var(--hl-muted);
}
.hl-lineage-status--muted {
  font-size: .68rem;
  font-weight: 400;
  color: var(--hl-muted) !important; /* override .gain / .loss */
}
.hl-pa {
  font-family: var(--hl-mono);
}
.hl-lineage-child .k {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-width: 0;
}
button.tx-lineage-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: var(--hl-accent);
  text-decoration: none;
}
button.tx-lineage-link:hover {
  text-decoration: underline;
}

/* Bottom bar */
.hl-bottom {
  flex: 0 0 auto;
  max-height: 28vh;
  display: flex;
  flex-direction: column;
  background: var(--hl-panel);
  border-top: 1px solid var(--hl-border);
  min-height: 0;
}
.hl-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--hl-border);
  padding: 0 .5rem;
  overflow-x: auto;
}
.hl-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--hl-muted);
  padding: .5rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
}
.hl-tabs button:hover { color: var(--hl-text); }
.hl-tabs button.active {
  color: var(--hl-accent);
  border-bottom-color: var(--hl-accent);
}
.hl-tab-panel {
  flex: 1 1 auto;
  overflow: auto;
  padding: .4rem .6rem .6rem;
  min-height: 0;
}
.hl-tab-panel.hidden { display: none; }

.hl-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  padding: .35rem .25rem .55rem;
  font-size: .75rem;
  color: var(--hl-muted);
}
.hl-stat-row b {
  font-family: var(--hl-mono);
  color: var(--hl-text);
  font-weight: 600;
}

.hl-foot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .7rem;
}
.hl-foot-table th {
  color: var(--hl-muted);
  font-weight: 500;
  text-align: right;
  padding: .25rem .35rem;
  border-bottom: 1px solid var(--hl-border);
}
.hl-foot-table th:first-child { text-align: left; }
.hl-foot-table td {
  padding: .28rem .35rem;
  text-align: right;
  border-bottom: 1px solid var(--hl-border);
  font-family: var(--hl-mono);
}
.hl-foot-table td:first-child { text-align: left; font-family: var(--hl-font); }
.hl-foot-table tr { cursor: pointer; }
.hl-foot-table tr:hover { background: rgba(80, 227, 194, .04); }

.hl-pager {
  flex: 0 0 auto;
  padding: .35rem .75rem;
  border-top: 1px solid var(--hl-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--hl-panel);
}
.hl-pager .pagination { margin: 0; }
.hl-pager .page-link {
  background: var(--hl-panel-2);
  border-color: var(--hl-border-2);
  color: var(--hl-muted);
  font-size: .75rem;
  padding: .2rem .5rem;
}
.hl-pager .page-item.active .page-link {
  background: var(--hl-accent-dim);
  border-color: var(--hl-accent);
  color: #04150e;
}
.hl-pager .page-link:hover {
  background: var(--hl-border-2);
  color: var(--hl-text);
}

/* dual progress colors on table cells — keep HSL inline */
.hl-table .dc-target-prog { font-weight: 600; }

/* ---- Portfolio / Plans / Account : contenu dans .hl-shell-main scrollable ---- */
/* Ne plus casser le flex shell (display:block + height:auto provoquait le sursaut nav) */
body.hl-scroll .hl-shell,
.hl-shell.hl-shell-scroll {
  /* garder le flex shell 100% — ne pas passer en document flow */
  display: flex !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}
.hl-content {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
  flex: 0 0 auto; /* hauteur naturelle, scroll parent .hl-shell-main */
}
.hl-content .hl-section,
.hl-content .hl-panel {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.hl-content .hl-stat-cards {
  display: grid;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 1.75rem;
}
.hl-content .hl-section {
  margin-bottom: 1.75rem;
}
.hl-content .hl-section-title {
  margin-bottom: .65rem;
}
.hl-content .table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hl-content .hl-table {
  width: 100%;
  min-width: 720px;
}
.hl-content-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1.5rem;
  background: transparent;
  border: 0;
  padding: 0;
}
.hl-content-head h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.hl-content-head p {
  margin: .35rem 0 0;
  font-size: .75rem;
  color: var(--hl-muted);
}
.hl-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 768px) {
  .hl-stat-cards { grid-template-columns: 1fr; }
}
.hl-stat-card {
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 8px;
  padding: .85rem 1rem;
  text-align: center;
}
.hl-stat-card .k {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--hl-muted);
  margin-bottom: .35rem;
}
.hl-stat-card .v {
  font-family: var(--hl-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}
.hl-stat-card .v.green { color: var(--hl-buy); }
.hl-stat-card .v.blue { color: #60a5fa; }
.hl-stat-card .v.cyan { color: var(--hl-accent); }
.hl-stat-card .u {
  font-size: .8rem;
  font-weight: 500;
  color: var(--hl-muted);
  margin-left: .2rem;
}

.hl-section {
  margin-bottom: 1.75rem;
}
.hl-section-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--hl-text);
  margin: 0 0 .65rem;
  letter-spacing: .03em;
}
.hl-panel {
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 10px;
  overflow: hidden;
}
.hl-panel .hl-table thead th {
  background: var(--hl-panel-2);
}
.hl-panel .hl-table tbody tr { cursor: default; }
.hl-panel .hl-table tbody tr.clickable { cursor: pointer; }
.hl-btn-sm {
  display: inline-block;
  border: 0;
  border-radius: 4px;
  padding: .28rem .55rem;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.hl-btn-sm.warn {
  background: transparent;
  border: 1px solid var(--hl-warn);
  color: var(--hl-warn);
}
.hl-btn-sm.warn:hover { background: rgba(240, 185, 11, .12); }
.hl-btn-sm.danger {
  background: transparent;
  border: 1px solid var(--hl-sell);
  color: var(--hl-sell);
}
.hl-btn-sm.danger:hover { background: rgba(246, 70, 93, .12); }
.hl-btn-sm.ghost {
  background: var(--hl-panel-2);
  border: 1px solid var(--hl-border-2);
  color: var(--hl-muted);
}
.hl-badge-active {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: .12rem .4rem;
  border-radius: 3px;
  background: rgba(14, 203, 129, .15);
  color: var(--hl-buy);
  border: 1px solid rgba(14, 203, 129, .35);
}
.hl-empty {
  text-align: center;
  color: var(--hl-muted);
  font-size: .8rem;
  padding: 1.5rem 1rem;
}
.hl-empty a { color: var(--hl-accent); text-decoration: none; }
.hl-empty a:hover { text-decoration: underline; }
/* ---- Public docs (white paper / guide) ---- */
.hl-doc-wide {
  max-width: 1100px;
}
.hl-doc-wide .hl-doc-body {
  max-width: none;
}
.hl-doc-body {
  max-width: 52rem;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--hl-muted);
}
/* Tables in docs: no forced min-width, no horizontal scroll */
.hl-doc-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
  margin: 0 0 1rem;
  border: 1px solid var(--hl-border);
  border-radius: 8px;
  background: var(--hl-panel);
}
.hl-doc-table {
  width: 100%;
  min-width: 0 !important;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: .8rem;
  font-family: var(--hl-mono);
}
.hl-doc-table th,
.hl-doc-table td {
  padding: .45rem .5rem;
  border-bottom: 1px solid var(--hl-border);
  text-align: right;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.hl-doc-table th:first-child,
.hl-doc-table td:first-child {
  text-align: left;
}
.hl-doc-table thead th {
  background: var(--hl-panel-2);
  color: var(--hl-muted);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: right;
}
.hl-doc-table thead th:first-child {
  text-align: left;
}
.hl-doc-table tbody tr:last-child th,
.hl-doc-table tbody tr:last-child td {
  border-bottom: 0;
}
.hl-doc-table-total td {
  font-weight: 700;
  color: var(--hl-text);
  background: rgba(80, 227, 194, .05);
}
.hl-doc-table--3 th,
.hl-doc-table--3 td {
  width: 33.33%;
}
.hl-doc .hl-table-wrap {
  overflow-x: visible;
  max-height: none;
}
.hl-doc .hl-content .hl-table,
.hl-doc-wide .hl-table {
  min-width: 0 !important;
}
.hl-doc-body h2 {
  margin: 1.75rem 0 .65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hl-text);
  letter-spacing: .02em;
}
.hl-doc-body h3 {
  margin: 0 0 .4rem;
  font-size: .85rem;
  font-weight: 700;
  color: #c8a96e;
}
.hl-doc-body p { margin: 0 0 .75rem; }
.hl-doc-body a { color: var(--hl-accent); text-decoration: none; }
.hl-doc-body a:hover { text-decoration: underline; }
.hl-doc-body ul, .hl-doc-body ol { margin: 0 0 1rem; padding-left: 1.2rem; }
.hl-doc-body li { margin-bottom: .35rem; }
.hl-doc-body code {
  font-family: var(--hl-mono);
  font-size: .78rem;
  color: #c8a96e;
  background: rgba(200, 169, 110, .08);
  padding: .05rem .3rem;
  border-radius: 3px;
}
.hl-doc-body b { color: var(--hl-text); font-weight: 600; }
.hl-doc-lead { font-size: .9rem; color: var(--hl-text); margin-bottom: 1.25rem !important; }
.hl-doc-callout {
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(200, 169, 110, .28);
  background: linear-gradient(160deg, rgba(42, 32, 16, .4), rgba(12, 14, 18, .95));
}
.hl-doc-callout h2 { margin-top: 0; color: #c8a96e; }
/* Real USDC / commission — not fictional score */
.hl-doc-real-money {
  margin-top: 2rem;
  border-color: rgba(14, 203, 129, .35);
  background: linear-gradient(160deg, rgba(8, 40, 28, .45), rgba(12, 14, 18, .95));
}
.hl-doc-real-money h2 { color: #0ecb81; }
.hl-doc-not-fictional {
  display: inline-block;
  margin-left: .45rem;
  padding: .12rem .45rem;
  border-radius: 4px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  vertical-align: middle;
  color: #04150e;
  background: #0ecb81;
  border: 1px solid rgba(14, 203, 129, .6);
}
.hl-doc-pull {
  padding: .75rem 1rem;
  border-left: 3px solid #c8a96e;
  background: rgba(200, 169, 110, .06);
  color: var(--hl-text);
}
.hl-doc-note {
  padding: 1rem 1.1rem; /* match .hl-doc-callout */
  margin-bottom: 1.25rem;
  border-radius: 10px;
  background: rgba(246, 70, 93, .08);
  border: 1px solid rgba(246, 70, 93, .25);
  color: var(--hl-text);
}
/* Green variant (safe / TP tables) */
.hl-doc-note-ok {
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: 10px;
  background: rgba(14, 203, 129, .08);
  border: 1px solid rgba(14, 203, 129, .28);
  color: var(--hl-text);
}
/* Beat .hl-doc-body h2 { margin: 1.75rem 0 … } — title flush like callout panels */
.hl-doc-note h2,
.hl-doc-body .hl-doc-note h2,
.hl-doc-body h2.hl-doc-note-title {
  margin: 0 0 .45rem !important;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f87171;
  letter-spacing: .02em;
}
.hl-doc-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin: 0 0 1rem;
}
@media (max-width: 720px) {
  .hl-doc-grid2 { grid-template-columns: 1fr; }
}
.hl-doc-card {
  padding: .85rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--hl-border);
  background: var(--hl-panel);
}
.hl-doc-steps { padding-left: 1.15rem; }
.hl-doc-steps li { margin-bottom: .55rem; }
.hl-doc-muted { font-size: .8rem; color: var(--hl-muted); }
.hl-doc-foot {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hl-border);
  font-size: .8rem;
}
.hl-doc-h3 {
  margin: 1.1rem 0 .45rem !important;
  font-size: .9rem !important;
  font-weight: 700 !important;
  color: var(--hl-text) !important;
  letter-spacing: .02em;
}

/* ---- Strikes / certificates boutique ---- */
.hl-boutique-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 1.15fr);
  gap: 1rem 1.25rem;
  align-items: stretch;
  margin-bottom: 1.15rem;
}
.hl-boutique-top .hl-boutique-hero {
  margin-bottom: 0;
}
.hl-boutique-top .hl-activity-wrap--hero {
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hl-boutique-top .hl-activity-wrap--hero .hl-activity {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  max-height: 18rem;
}
.hl-boutique-top .hl-activity-wrap--hero .hl-activity-list {
  max-height: none;
  flex: 1 1 auto;
}
@media (max-width: 900px) {
  .hl-boutique-top {
    grid-template-columns: 1fr;
  }
  .hl-boutique-top .hl-activity-wrap--hero .hl-activity {
    max-height: 12rem;
  }
}
.hl-boutique-hero h1 {
  font-size: 1.45rem;
  letter-spacing: .04em;
}
.hl-boutique-tagline {
  margin: .25rem 0 .55rem !important;
  font-size: .82rem !important;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #c8a96e !important;
}
.hl-boutique-lead {
  margin: 0 0 .55rem !important;
  font-size: .95rem !important;
  line-height: 1.45 !important;
  color: var(--hl-text) !important;
  max-width: 40rem;
}
.hl-boutique-lead b { color: #c8a96e; font-weight: 700; }
.hl-boutique-body {
  margin: 0 0 .45rem !important;
  font-size: .8rem !important;
  line-height: 1.5 !important;
  color: var(--hl-muted) !important;
  max-width: 42rem;
}
.hl-boutique-body b { color: var(--hl-text); font-weight: 600; }
.hl-boutique-body.muted { opacity: .92; }
.hl-boutique-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: 1.15rem;
}
@media (max-width: 800px) {
  .hl-boutique-pillars { grid-template-columns: 1fr; }
}
.hl-boutique-pillar {
  padding: .75rem .85rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 169, 110, .22);
  background: linear-gradient(160deg, rgba(42, 32, 16, .55), rgba(12, 14, 18, .9));
}
.hl-boutique-pillar .t {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #c8a96e;
  margin-bottom: .35rem;
}
.hl-boutique-pillar .d {
  font-size: .74rem;
  line-height: 1.45;
  color: var(--hl-muted);
}
.hl-cert-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.hl-cert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}
@media (max-width: 1100px) {
  .hl-cert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hl-cert-grid { grid-template-columns: 1fr; }
}
.hl-cert-card {
  display: flex;
  flex-direction: column;
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.hl-cert-card:hover {
  border-color: rgba(80, 227, 194, .45);
  transform: translateY(-1px);
}
.hl-cert-thumb {
  position: relative;
  aspect-ratio: 1;
  background: #0a0c0f;
  overflow: hidden;
}
.hl-cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hl-cert-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 140px;
  color: var(--hl-muted);
  font-weight: 700;
  letter-spacing: .06em;
}
.hl-cert-thumb-empty.big {
  min-height: 280px;
  font-size: 1.5rem;
}
.hl-cert-badge {
  position: absolute;
  top: .4rem;
  right: .4rem;
  font-size: .6rem;
  font-weight: 700;
  padding: .15rem .35rem;
  border-radius: 3px;
  letter-spacing: .04em;
}
.hl-cert-badge.sold {
  background: rgba(246, 70, 93, .2);
  color: var(--hl-sell);
  border: 1px solid rgba(246, 70, 93, .4);
}
.hl-cert-badge.open {
  background: rgba(80, 227, 194, .12);
  color: var(--hl-accent);
  border: 1px solid rgba(80, 227, 194, .35);
}
.hl-cert-body {
  padding: .55rem .65rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.hl-cert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .35rem;
}
.hl-cert-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
}
.hl-cert-meta .hl-crypto-label {
  min-width: 0;
}
.hl-cert-foot {
  display: flex;
  justify-content: space-between;
  font-size: .68rem;
  color: var(--hl-muted);
}
.hl-cert-foot .muted { color: var(--hl-muted); }
.hl-cert-show {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .hl-cert-show { grid-template-columns: 1fr; }
}
.hl-cert-show-art {
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 10px;
  padding: .75rem;
  position: sticky;
  top: .5rem;
}
.hl-cert-show-art img {
  width: 100%;
  border-radius: 8px;
  display: block;
  background: #0a0c0f;
}
.hl-cert-show-links {
  display: flex;
  gap: .4rem;
  margin-top: .65rem;
  flex-wrap: wrap;
}
.hl-cert-related {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.hl-cert-pair {
  color: #c8a96e;
  font-weight: 700;
  letter-spacing: .02em;
}
.hl-cert-show-title {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin: 0;
}
.hl-cert-show-title .hl-crypto-icon {
  width: 32px;
  height: 32px;
}
.hl-cert-show-dash {
  color: var(--hl-muted);
  font-weight: 500;
}
.hl-crypto-title .hl-crypto-icon {
  width: 32px;
  height: 32px;
}
.hl-cert-side-meta {
  margin-top: .75rem;
  border-top: 1px solid var(--hl-border);
  padding-top: .35rem;
}
.hl-cert-forge {
  margin-top: .75rem;
  padding: .55rem .15rem .65rem;
  border-top: 1px solid var(--hl-border);
  border-bottom: 1px solid var(--hl-border);
  margin-bottom: .65rem;
}
.hl-cert-forge-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #c8a96e;
  margin-bottom: .45rem;
}
.hl-cert-forge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .28rem .75rem;
  font-size: .72rem;
}
.hl-cert-forge-grid .k { color: var(--hl-muted); }
.hl-cert-forge-grid .v {
  float: right;
  font-family: var(--hl-mono);
  color: #c8a96e;
}
.hl-cert-forge-grid > div { overflow: hidden; }
.hl-cert-sha {
  margin: .55rem 0 0;
  font-size: .58rem;
  color: var(--hl-muted);
  font-family: var(--hl-mono);
  word-break: break-all;
  line-height: 1.35;
}
/* Buy + seller side-by-side on cert sheet */
.hl-cert-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .75rem;
  margin-bottom: 1rem;
  align-items: stretch;
}
@media (max-width: 640px) {
  .hl-cert-action-row { grid-template-columns: 1fr; }
}
.hl-cert-action-buy {
  min-width: 0;
  display: flex;
}
.hl-cert-buy-form {
  width: 100%;
  margin: 0;
}
.hl-cert-buy-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .15rem;
  width: 100%;
  margin: 0;
  padding: .55rem .75rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(42, 32, 16, .9), rgba(58, 46, 24, .8));
  border: 1px solid rgba(200, 169, 110, .4);
  color: #c8a96e;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .02em;
  text-align: left;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: border-color .12s, background .12s, color .12s;
}
.hl-cert-buy-btn:hover {
  border-color: rgba(200, 169, 110, .7);
  color: #e0c992;
  background: linear-gradient(135deg, rgba(50, 38, 18, .95), rgba(70, 54, 28, .88));
}
.hl-cert-buy-btn-link {
  display: flex;
}
.hl-cert-buy-main {
  font-size: .82rem;
  font-weight: 700;
}
.hl-cert-buy-sub {
  font-size: .62rem;
  font-weight: 500;
  opacity: .7;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.hl-cert-buy-placeholder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .15rem;
  width: 100%;
  margin: 0;
  padding: .55rem .75rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(42, 32, 16, .85), rgba(58, 46, 24, .75));
  border: 1px solid rgba(200, 169, 110, .35);
  color: #c8a96e;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .02em;
  text-align: left;
  box-sizing: border-box;
}
.hl-cert-buy-placeholder.is-sold {
  background: rgba(255, 255, 255, .04);
  border-color: var(--hl-border);
  color: var(--hl-muted);
  font-weight: 600;
}
.hl-cert-buy-placeholder .sub {
  font-size: .62rem;
  font-weight: 500;
  opacity: .65;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hl-cert-action-seller {
  min-width: 0;
  padding: .55rem .75rem;
  border-radius: 8px;
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .15rem;
}
.hl-cert-action-seller .k {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hl-muted);
  font-weight: 600;
}
.hl-cert-action-seller .name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--hl-text);
  line-height: 1.25;
}
.hl-cert-action-seller .name.muted {
  color: var(--hl-muted);
  font-weight: 500;
}
.hl-cert-action-seller .meta {
  font-size: .72rem;
  color: var(--hl-muted);
  line-height: 1.35;
}
.hl-cert-action-seller .meta a {
  color: var(--hl-accent);
  text-decoration: none;
}
.hl-cert-action-seller .meta a:hover {
  text-decoration: underline;
}

/* Portfolio commission KPI accent */
.hl-pf-kpi-comm {
  border-color: rgba(200, 169, 110, .28);
}
.hl-pf-kpi-comm .k {
  color: rgba(200, 169, 110, .85);
}
.hl-comm-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  line-height: 1.2;
}
.hl-comm-cell .num {
  font-size: .72rem;
}

/* Commission status chips: in process | due | paid | estimate */
.hl-comm-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .45rem;
  justify-content: flex-end;
}
.hl-comm-status {
  display: inline-block;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .12rem .4rem;
  border-radius: 4px;
  border: 1px solid var(--hl-border);
  color: var(--hl-muted);
  background: rgba(255, 255, 255, .04);
  line-height: 1.2;
}
.hl-comm-status.is-in_process {
  color: #8ab4f8;
  border-color: rgba(138, 180, 248, .35);
  background: rgba(138, 180, 248, .08);
}
.hl-comm-status.is-due {
  color: #f0b429;
  border-color: rgba(240, 180, 41, .4);
  background: rgba(240, 180, 41, .1);
}
.hl-comm-status.is-paid {
  color: var(--hl-buy);
  border-color: rgba(80, 227, 194, .35);
  background: rgba(80, 227, 194, .08);
}
.hl-comm-status.is-estimate {
  color: var(--hl-muted);
  border-style: dashed;
}
.hl-comm-hint {
  font-size: .65rem;
  font-weight: 500;
  color: var(--hl-muted);
  opacity: .85;
}

/* ---- Portfolio: My sales / My purchases (primary medal portals) ---- */
.hl-medal-portals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 0 0 1rem;
}
@media (max-width: 640px) {
  .hl-medal-portals { grid-template-columns: 1fr; }
}
.hl-medal-portal {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .95rem 1.05rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--hl-border);
  background: var(--hl-panel);
  transition: border-color .15s, box-shadow .15s, transform .12s, background .15s;
  min-height: 4.5rem;
}
.hl-medal-portal:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
}
.hl-medal-portal-ico {
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.05rem;
  line-height: 1;
}
.hl-medal-portal-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .12rem;
}
.hl-medal-portal-kicker {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .85;
}
.hl-medal-portal-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1.15;
}
.hl-medal-portal-desc {
  font-size: .72rem;
  line-height: 1.35;
  color: var(--hl-muted);
}
.hl-medal-portal-go {
  flex: 0 0 auto;
  font-size: 1.25rem;
  font-weight: 600;
  opacity: .55;
  transition: opacity .12s, transform .12s;
}
.hl-medal-portal:hover .hl-medal-portal-go {
  opacity: 1;
  transform: translateX(3px);
}
/* Sales = gold steward */
.hl-medal-portal--sales {
  border-color: color-mix(in srgb, var(--hl-strike) 40%, var(--hl-border));
  background: linear-gradient(135deg, rgba(42, 32, 16, .55), rgba(18, 22, 28, .95) 55%);
}
.hl-medal-portal--sales .hl-medal-portal-ico {
  background: linear-gradient(145deg, rgba(200, 169, 110, .28), rgba(200, 169, 110, .08));
  border: 1px solid rgba(200, 169, 110, .4);
  color: var(--hl-strike-hi);
}
.hl-medal-portal--sales .hl-medal-portal-kicker { color: var(--hl-strike); }
.hl-medal-portal--sales .hl-medal-portal-title { color: var(--hl-strike-hi); }
.hl-medal-portal--sales:hover {
  border-color: color-mix(in srgb, var(--hl-strike) 70%, transparent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35), 0 0 0 1px color-mix(in srgb, var(--hl-strike) 18%, transparent);
}
/* Purchases = accent collector */
.hl-medal-portal--buys {
  border-color: color-mix(in srgb, var(--hl-accent) 35%, var(--hl-border));
  background: linear-gradient(135deg, rgba(12, 40, 36, .5), rgba(18, 22, 28, .95) 55%);
}
.hl-medal-portal--buys .hl-medal-portal-ico {
  background: linear-gradient(145deg, rgba(80, 227, 194, .22), rgba(80, 227, 194, .06));
  border: 1px solid rgba(80, 227, 194, .35);
  color: var(--hl-accent);
}
.hl-medal-portal--buys .hl-medal-portal-kicker { color: var(--hl-accent); }
.hl-medal-portal--buys .hl-medal-portal-title { color: #b8f5e8; }
.hl-medal-portal--buys:hover {
  border-color: color-mix(in srgb, var(--hl-accent) 65%, transparent);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35), 0 0 0 1px color-mix(in srgb, var(--hl-accent) 15%, transparent);
}

/* ---- Portfolio rewards truth ---- */
.hl-rewards {
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 10px;
  padding: 1rem 1.1rem 1.1rem;
}
.hl-rewards-lead {
  margin: 0 0 1rem;
  font-size: .8rem;
  line-height: 1.45;
  color: var(--hl-muted);
}
.hl-rewards-lead b { color: var(--hl-text); font-weight: 600; }
.hl-rewards-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: 1rem;
}
@media (max-width: 1000px) {
  .hl-rewards-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .hl-rewards-steps { grid-template-columns: 1fr; }
}
.hl-rewards-step {
  display: flex;
  gap: .55rem;
  padding: .65rem .7rem;
  border-radius: 8px;
  background: var(--hl-panel-2);
  border: 1px solid var(--hl-border);
}
.hl-rewards-step .n {
  flex: 0 0 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  background: rgba(80, 227, 194, .15);
  color: var(--hl-accent);
  border: 1px solid rgba(80, 227, 194, .35);
}
.hl-rewards-step .t {
  font-size: .78rem;
  font-weight: 700;
  color: var(--hl-text);
  margin-bottom: .2rem;
}
.hl-rewards-step .d {
  font-size: .72rem;
  line-height: 1.4;
  color: var(--hl-muted);
}
.hl-rewards-step .d a { color: var(--hl-accent); text-decoration: none; }
.hl-rewards-step .d a:hover { text-decoration: underline; }
.hl-rewards-step .d b { color: var(--hl-text); font-weight: 600; }
.hl-rewards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: .85rem;
}
@media (max-width: 900px) {
  .hl-rewards-grid { grid-template-columns: 1fr; }
}
.hl-rewards-box {
  padding: .75rem .8rem;
  border-radius: 8px;
  border: 1px solid var(--hl-border);
  background: rgba(0, 0, 0, .18);
}
.hl-rewards-box .label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #c8a96e;
  margin-bottom: .4rem;
}
.hl-rewards-box p {
  margin: 0 0 .5rem;
  font-size: .74rem;
  line-height: 1.45;
  color: var(--hl-muted);
}
.hl-rewards-box p.mb-0 { margin-bottom: 0; }
.hl-rewards-box p b { color: var(--hl-text); font-weight: 600; }
.hl-rewards-box .ex {
  margin: 0;
  font-size: .7rem;
  line-height: 1.45;
  color: var(--hl-text);
  padding: .45rem .5rem;
  border-radius: 4px;
  background: rgba(80, 227, 194, .06);
  border: 1px dashed rgba(80, 227, 194, .25);
}
.hl-rewards-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .65rem;
  border-top: 1px solid var(--hl-border);
  font-size: .72rem;
  color: var(--hl-muted);
}
.hl-rewards-foot b { color: var(--hl-text); }

/* ---- Portfolio (bureau) ---- */
/* 8 virtual-score cards → 2×4 (must beat later .hl-admin-kpis { 5 cols }) */
.hl-admin-kpis.hl-pf-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}
@media (max-width: 1100px) {
  .hl-admin-kpis.hl-pf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hl-admin-kpis.hl-pf-kpis { grid-template-columns: 1fr; }
}
.hl-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .65rem;
}
.hl-pf-exposure {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 10px;
  padding: .65rem .85rem;
}
.hl-pf-exp-row {
  display: grid;
  /* icône + ticker : largeur fixe pour que la barre ne chevauche pas le nom */
  grid-template-columns: minmax(6.25rem, 7.25rem) minmax(0, 1fr) 2.2rem 4.5rem 3.2rem 4.5rem;
  gap: .55rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: .28rem .2rem;
  border-radius: 4px;
  font-size: .75rem;
}
.hl-pf-exp-row:hover { background: rgba(80, 227, 194, .04); }
.hl-pf-exp-row .sym {
  font-weight: 600;
  color: var(--hl-text);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.hl-pf-exp-row .sym .hl-crypto-icon {
  flex-shrink: 0;
}
.hl-pf-exp-row .meta { color: var(--hl-muted); text-align: right; }
.hl-pf-exp-row .bar-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
  min-width: 0;
}
.hl-pf-exp-row .bar-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  /* accent adouci — moins « néon » */
  background: rgba(80, 227, 194, .38);
  min-width: 2px;
}
.hl-pf-exp-row:hover .bar-fill {
  background: rgba(80, 227, 194, .5);
}
.hl-pf-pos-cell {
  min-width: 4.5rem;
}
.hl-pf-mini-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(246,70,93,.25), rgba(48,54,61,.8) 50%, rgba(14,203,129,.25));
  margin-bottom: .15rem;
}
.hl-pf-mini-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,.25);
}
.hl-pf-mini-marker {
  position: absolute;
  top: -2px;
  width: 6px;
  height: 10px;
  margin-left: -3px;
  border-radius: 1px;
  background: var(--hl-accent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.hl-pf-pos-n {
  display: block;
  font-size: .62rem;
  color: var(--hl-muted);
  text-align: center;
}

.hl-flash {
  font-size: .8rem;
  margin-bottom: .75rem;
  min-height: 1.2em;
}

/* ---- Account / profile (terminal) ---- */
.hl-content-account {
  max-width: 920px;
}
.hl-account-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: 1.25rem;
  padding: .85rem 1rem;
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 8px;
}
@media (max-width: 800px) {
  .hl-account-summary {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .hl-account-summary {
    grid-template-columns: 1fr;
  }
}
.hl-account-sum-item .k {
  display: block;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hl-muted);
  margin-bottom: .2rem;
}
.hl-account-sum-item .v {
  font-size: .88rem;
  font-weight: 600;
  word-break: break-all;
}
.hl-account-sum-wallet {
  grid-column: 1 / -1;
}
.hl-account-sum-wallet .v {
  font-size: .72rem;
  font-weight: 500;
  color: var(--hl-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}
.hl-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
}
@media (max-width: 720px) {
  .hl-account-grid {
    grid-template-columns: 1fr;
  }
}
.hl-card {
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 8px;
  padding: 1.1rem 1.15rem 1.25rem;
  min-width: 0;
}
.hl-card-head h2 {
  margin: 0 0 .25rem;
  font-size: .95rem;
  font-weight: 700;
}
.hl-card-head p {
  margin: 0 0 .9rem;
  font-size: .75rem;
  color: var(--hl-muted);
  line-height: 1.45;
}
.hl-field {
  margin-bottom: .75rem;
}
.hl-form .hl-label {
  display: block;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hl-muted);
  margin: 0 0 .3rem;
}
.hl-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--hl-panel-2);
  border: 1px solid var(--hl-border-2);
  border-radius: 6px;
  color: var(--hl-text);
  font-family: var(--hl-font);
  font-size: .88rem;
  padding: .55rem .7rem;
}
.hl-input:focus {
  outline: none;
  border-color: var(--hl-accent-dim);
  box-shadow: 0 0 0 1px rgba(80, 227, 194, .25);
}
.hl-field-err {
  color: var(--hl-sell);
  font-size: .75rem;
  margin-top: .3rem;
}
.hl-form-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .35rem;
  padding-top: .35rem;
}
.hl-btn-inline {
  width: auto !important;
  min-width: 9rem;
  margin: 0 !important;
  padding: .55rem 1rem !important;
  font-size: .82rem !important;
}
.hl-danger-zone {
  border: 1px solid var(--hl-border);
  border-radius: 8px;
  background: var(--hl-panel);
  margin-bottom: 2rem;
}
.hl-danger-zone > summary {
  cursor: pointer;
  list-style: none;
  padding: .75rem 1rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--hl-muted);
  user-select: none;
}
.hl-danger-zone > summary::-webkit-details-marker { display: none; }
.hl-danger-zone > summary::before {
  content: "? ";
  color: var(--hl-muted);
}
.hl-danger-zone[open] > summary {
  color: var(--hl-sell);
  border-bottom: 1px solid rgba(246, 70, 93, .25);
}
.hl-danger-zone[open] > summary::before { content: "? "; }
.hl-danger-zone-body {
  padding: 1rem 1.15rem 1.25rem;
  max-width: 28rem;
}
.hl-danger-lead {
  margin: 0 0 .85rem;
  font-size: .75rem;
  color: var(--hl-muted);
  line-height: 1.45;
}
/* ---- Admin dashboard ---- */
.hl-muted { color: var(--hl-muted); }

/* ---- Career badges (group_id) ---- */
.hl-career-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .15rem .5rem .15rem .4rem;
  border-radius: 999px;
  border: 1px solid var(--hl-border);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
  cursor: default;
}
.hl-career-pips {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.hl-career-pip {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hl-border-2);
}
.hl-career-pip.on {
  background: currentColor;
}
.hl-career-initiate {
  color: #8b9bb4;
  border-color: #2a3344;
  background: rgba(139, 155, 180, .08);
}
.hl-career-operator {
  color: #50e3c2;
  border-color: rgba(80, 227, 194, .35);
  background: rgba(80, 227, 194, .08);
}
.hl-career-manager {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, .4);
  background: rgba(167, 139, 250, .1);
}
.hl-career-expert {
  color: #c8a96e;
  border-color: rgba(200, 169, 110, .4);
  background: rgba(200, 169, 110, .1);
}
.hl-career-admin {
  color: #f6465d;
  border-color: rgba(246, 70, 93, .35);
  background: rgba(246, 70, 93, .08);
}
.hl-career-member {
  color: var(--hl-muted);
}

.hl-content-admin { max-width: 1280px; }
/* Ops addresses: truncate usage, full text on title hover */
.hl-ops-usage {
  max-width: 14rem;
  overflow: hidden;
  vertical-align: middle;
}
.hl-ops-usage-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
  cursor: default;
}
.hl-ops-actions {
  white-space: nowrap;
  width: 1%;
  vertical-align: middle;
}
.hl-admin-treasuries { margin-bottom: 1rem; }
.hl-admin-treasuries .hl-admin-3col { margin-bottom: 0; }
.hl-admin-treasury {
  padding: .5rem 0;
}
.hl-admin-treasury .k {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hl-muted);
  margin-bottom: .35rem;
}
.hl-admin-treasury .v {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}
.hl-admin-treasury .v small {
  font-size: .7rem;
  font-weight: 500;
  color: var(--hl-muted);
}
.hl-admin-treasury .s {
  margin-top: .3rem;
  font-size: .72rem;
  color: var(--hl-muted);
  line-height: 1.4;
}
.hl-admin-scale {
  margin-bottom: 1.25rem;
}
.hl-admin-scale-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .55rem .75rem;
  margin: .65rem 0 .75rem;
}
.hl-admin-scale-part {
  padding: .5rem .75rem;
  border: 1px solid var(--hl-border);
  border-radius: 8px;
  background: var(--hl-panel, transparent);
  min-width: 8rem;
  flex: 1 1 8rem;
}
.hl-admin-scale-part .k {
  font-size: .62rem;
  text-transform: uppercase;
  color: var(--hl-muted);
}
.hl-admin-scale-part .v {
  font-size: 1.25rem;
  font-weight: 700;
  margin: .15rem 0;
  line-height: 1.15;
}
.hl-admin-scale-part .v small {
  font-size: .7rem;
  font-weight: 600;
  color: var(--hl-muted);
  margin-left: .15rem;
}
.hl-admin-scale-part .s {
  font-size: .68rem;
  color: var(--hl-muted);
  line-height: 1.3;
}
.hl-admin-scale-ratio {
  border-color: color-mix(in srgb, var(--hl-buy, #0ecb81) 35%, var(--hl-border));
  flex: 1.15 1 9rem;
}
.hl-admin-scale-ratio .v {
  font-size: 1.65rem;
}
.hl-admin-scale-op {
  display: flex;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hl-muted);
  flex: 0 0 auto;
  padding: 0 .1rem;
}
.hl-admin-treasury-fund {
  border-left: 2px solid var(--hl-buy, #3dba7e);
  padding-left: .85rem;
}
.hl-admin-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (max-width: 1100px) {
  .hl-admin-kpis { grid-template-columns: 1fr 1fr; }
}
.hl-admin-kpi {
  background: var(--hl-panel);
  border: 1px solid var(--hl-border);
  border-radius: 8px;
  padding: .85rem 1rem;
}
.hl-admin-kpi .k {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--hl-muted);
  margin-bottom: .35rem;
}
.hl-admin-kpi .v {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
}
.hl-admin-kpi .v small {
  font-size: .7rem;
  font-weight: 500;
  color: var(--hl-muted);
}
.hl-admin-kpi .s {
  margin-top: .3rem;
  font-size: .72rem;
  color: var(--hl-muted);
}
.hl-admin-realtime { margin-bottom: 1rem; }
.hl-admin-rt-head {
  font-size: .72rem;
  color: var(--hl-muted);
  margin-bottom: .75rem;
}
.hl-admin-rt-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}
@media (max-width: 900px) {
  .hl-admin-rt-grid { grid-template-columns: 1fr 1fr; }
}
.hl-admin-rt-grid .k {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--hl-muted);
}
.hl-admin-rt-grid .big {
  font-size: 1.15rem;
  font-weight: 700;
  margin: .2rem 0;
}
.hl-admin-rt-grid .s { font-size: .7rem; color: var(--hl-muted); }
.hl-admin-note {
  margin: .85rem 0 0;
  font-size: .72rem;
  color: var(--hl-muted);
  line-height: 1.45;
}
.hl-admin-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (max-width: 900px) {
  .hl-admin-3col { grid-template-columns: 1fr; }
}
.hl-admin-4col {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
@media (max-width: 900px) {
  .hl-admin-4col { grid-template-columns: 1fr 1fr; }
}
.hl-admin-card-title {
  margin: 0 0 .75rem;
  font-size: .85rem;
  font-weight: 700;
}
.hl-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hl-admin-list li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--hl-border);
  font-size: .78rem;
}
.hl-admin-list li:last-child { border-bottom: 0; }
.hl-admin-list li span {
  display: block;
  color: var(--hl-muted);
  font-size: .68rem;
  margin-bottom: .15rem;
}
.hl-admin-list li b { font-size: .88rem; }
.hl-admin-list li small {
  display: block;
  margin-top: .15rem;
  font-size: .68rem;
  color: var(--hl-muted);
}
.hl-admin-mini .k {
  font-size: .62rem;
  text-transform: uppercase;
  color: var(--hl-muted);
  margin-bottom: .35rem;
}
.hl-admin-mini .v {
  font-size: 1.05rem;
  font-weight: 700;
}
.hl-admin-mini .s {
  margin-top: .25rem;
  font-size: .7rem;
  color: var(--hl-muted);
}
.hl-admin-ur {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 1.25rem;
}
.hl-admin-ur .k {
  font-size: .62rem;
  text-transform: uppercase;
  color: var(--hl-muted);
}
.hl-admin-ur-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .55rem 0.75rem;
}
.hl-admin-ur-part {
  padding: .5rem .75rem;
  border: 1px solid var(--hl-border);
  border-radius: 8px;
  background: var(--hl-panel, transparent);
  min-width: 7.5rem;
  flex: 1 1 7.5rem;
}
.hl-admin-ur-part .v {
  font-size: 1.35rem;
  font-weight: 700;
  margin: .15rem 0;
  line-height: 1.15;
}
.hl-admin-ur-part .v.big {
  font-size: 1.75rem;
}
.hl-admin-ur-part .s {
  font-size: .68rem;
  color: var(--hl-muted);
  line-height: 1.3;
}
.hl-admin-ur-part-open {
  border-color: color-mix(in srgb, var(--hl-sell, #f6465d) 35%, var(--hl-border));
}
.hl-admin-ur-part-total {
  border-color: color-mix(in srgb, var(--hl-buy, #0ecb81) 35%, var(--hl-border));
  flex: 1.15 1 8.5rem;
}
.hl-admin-ur-op {
  display: flex;
  align-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hl-muted);
  line-height: 1;
  flex: 0 0 auto;
  padding: 0 .1rem;
}
.hl-admin-ur-help {
  margin: 0;
  width: 100%;
  max-width: none;
}
.hl-admin-section {
  margin: .5rem 0 .75rem;
  font-size: 1rem;
  font-weight: 700;
}
.hl-admin-charts-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 900px) {
  .hl-admin-charts-2 { grid-template-columns: 1fr; }
}
.hl-chart-box {
  position: relative;
  height: 240px;
  margin: .25rem 0 .5rem;
}
.hl-admin-pa-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .72rem;
  color: var(--hl-muted);
  margin-top: .35rem;
}

.hl-admin-checks { margin-bottom: 1rem; }
.hl-admin-check-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .5rem;
}
@media (max-width: 1000px) {
  .hl-admin-check-grid { grid-template-columns: 1fr 1fr; }
}
.hl-admin-check {
  background: var(--hl-panel-2);
  border: 1px solid var(--hl-border-2);
  border-radius: 6px;
  padding: .55rem .65rem;
}
.hl-admin-check.ok { border-color: rgba(14, 203, 129, .35); }
.hl-admin-check.bad { border-color: rgba(246, 70, 93, .45); }
.hl-admin-check .k {
  display: block;
  font-size: .62rem;
  color: var(--hl-muted);
  margin-bottom: .2rem;
  line-height: 1.3;
}
.hl-admin-check b { font-size: .85rem; }
.hl-admin-check .s {
  display: block;
  margin-top: .15rem;
  font-size: .65rem;
  color: var(--hl-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hl-admin-check.ok .s { color: var(--hl-buy); }
.hl-admin-check.bad .s { color: var(--hl-sell); }

/* ---- Admin performance by crypto ---- */
.hl-perf-table tr.hl-perf-total td {
  background: rgba(255, 255, 255, .05);
  border-top: 1px solid var(--hl-border);
  font-weight: 700;
}
.hl-perf-table tr.hl-perf-avg td {
  color: var(--hl-muted);
  font-style: italic;
  font-weight: 500;
}
.hl-perf-table tr.hl-perf-avg td:first-child {
  font-style: normal;
  font-weight: 700;
  color: var(--hl-text);
}

/* ---- Crypto icons (public/images/crypto) ---- */
.hl-crypto-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  vertical-align: middle;
  min-width: 0;
}
.hl-crypto-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
}
.hl-crypto-icon--fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ico, 16px);
  height: var(--ico, 16px);
  font-size: calc(var(--ico, 16px) * 0.55);
  font-weight: 700;
  color: var(--hl-muted);
  line-height: 1;
  text-transform: uppercase;
  user-select: none;
}
.hl-crypto-sym {
  font-weight: 600;
  letter-spacing: .02em;
}
.hl-side-pair .hl-crypto-label,
.hl-ticker .hl-crypto-label {
  gap: .45rem;
}
.hl-ticker .hl-crypto-icon {
  width: 18px;
  height: 18px;
}
/* Identity cluster: dragon · Cert · Value (right side of pair ticker) */
.hl-ticker-id {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-left: auto; /* push to the right when space allows */
  flex-wrap: wrap;
}
.hl-tier-slot {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  align-self: center;
}
.hl-tier-icon {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  margin: 0;
  vertical-align: middle;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, .4));
}
.hl-ticker-pair {
  align-items: center !important;
}
.hl-ticker-pair .pair.hl-crypto-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: .4rem;
  line-height: 1;
}
.hl-ticker-pair .hl-mark {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.hl-ticker-id .meta {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}
/* Cert UUID — same gold as top STRIKES pill */
.hl-ticker-id #tp-uuid,
.hl-ticker-cert {
  color: var(--hl-strike) !important;
}

/* ---- Live activity wire (homepage / trade) ---- */
.hl-activity-wrap {
  margin: 0 0 1.1rem;
}
.hl-activity {
  border: 1px solid var(--hl-border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(80, 227, 194, .04), var(--hl-panel));
  overflow: hidden;
}
.hl-activity-head {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--hl-border);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--hl-muted);
}
.hl-activity-title {
  color: var(--hl-text);
  letter-spacing: .06em;
}
.hl-activity-hint {
  margin-left: auto;
  font-weight: 500;
  opacity: .75;
  text-transform: none;
  letter-spacing: .02em;
}
.hl-activity-tz {
  font-family: var(--hl-mono);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .03em;
  opacity: .85;
  color: var(--hl-muted);
  cursor: help;
  white-space: nowrap;
}
.hl-activity-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hl-buy);
  box-shadow: 0 0 0 0 rgba(14, 203, 129, .55);
  animation: hl-activity-pulse 1.8s ease-out infinite;
}
@keyframes hl-activity-pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 203, 129, .45); }
  70% { box-shadow: 0 0 0 8px rgba(14, 203, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}
.hl-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 14rem;
  overflow-y: auto;
}
.hl-activity--compact .hl-activity-list {
  max-height: 11rem;
}
.hl-activity-item {
  display: grid;
  grid-template-columns: 1.1rem 1fr auto;
  gap: .45rem .55rem;
  align-items: start;
  padding: .45rem .75rem;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  font-size: .8rem;
  line-height: 1.35;
}
.hl-activity-item:last-child { border-bottom: 0; }
.hl-activity-item:hover {
  background: rgba(255, 255, 255, .03);
}
.hl-activity-ico {
  color: var(--hl-accent);
  font-size: .75rem;
  line-height: 1.4;
  opacity: .9;
}
.hl-activity-kind-engage .hl-activity-ico,
.hl-activity-kind-sold .hl-activity-ico { color: var(--hl-strike, #c8a96e); }
.hl-activity-kind-option_premium .hl-activity-ico { color: #a78bfa; }
.hl-activity-kind-signup .hl-activity-ico { color: var(--hl-buy); }
.hl-activity-kind-strike .hl-activity-ico { color: #f0b90b; }
.hl-activity-kind-signal_buy .hl-activity-ico { color: var(--hl-buy); }
.hl-activity-kind-signal_sell .hl-activity-ico { color: var(--hl-sell); }
.hl-activity-kind-signal_veto .hl-activity-ico { color: #f59e0b; }
.hl-activity-kind-alloc_block .hl-activity-ico { color: #f6465d; }
.hl-activity-kind-alloc_block .hl-activity-text { color: #fca5a5; }
.hl-activity-body {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.hl-activity-text {
  color: var(--hl-text);
}
.hl-activity-detail {
  font-size: .7rem;
  color: var(--hl-muted);
  font-family: var(--hl-mono);
}
.hl-activity-at {
  font-size: .68rem;
  color: var(--hl-muted);
  font-family: var(--hl-mono);
  white-space: nowrap;
}
.hl-activity-empty {
  padding: .85rem .75rem;
  color: var(--hl-muted);
  font-size: .8rem;
  list-style: none;
}
/* Trade side: live wire when no cert selected */
.hl-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hl-side-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow: auto;
}
.hl-side-live {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hl-border);
  overflow: hidden;
}
.hl-side-live.hidden {
  display: none !important;
}
.hl-side-live .hl-activity {
  border: 0;
  border-radius: 0;
  background: transparent;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hl-side-live .hl-activity-list {
  max-height: none;
  flex: 1 1 auto;
}
.hl-side-empty--slim {
  padding: .75rem .85rem .5rem;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--hl-muted);
  text-align: left;
}
.hl-content-head .hl-crypto-label h1,
.hl-crypto-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}
/* ---- Admin cryptos ---- */
.hl-crypto-table-wrap {
  width: 100%;
}
.hl-crypto-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}
.hl-crypto-table thead th,
.hl-crypto-table tbody td {
  padding: .5rem .55rem;
  white-space: nowrap;
}
.hl-crypto-table thead th:last-child,
.hl-crypto-table tbody td:last-child {
  padding-right: .85rem;
}
.hl-crypto-table .hl-vol-cell {
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hl-crypto-table .hl-vol-short {
  cursor: help;
  font-variant-numeric: tabular-nums;
}
.hl-crypto-table .hl-crypto-cell {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
}
.hl-crypto-table td:first-child .hl-crypto-cell {
  min-width: 7.5rem;
}
.hl-alloc-track {
  width: 48px;
  height: 6px;
  border-radius: 3px;
  background: var(--hl-border-2);
  overflow: hidden;
  flex-shrink: 0;
}
.hl-alloc-fill {
  height: 100%;
  border-radius: 3px;
  min-width: 2px;
}
.hl-crypto-name {
  font-weight: 700;
  color: var(--hl-text);
  text-decoration: none;
}
.hl-crypto-name:hover { color: var(--hl-accent); }
.hl-crypto-alloc {
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}
.hl-price-link {
  color: var(--hl-accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed rgba(80, 227, 194, .35);
}
.hl-price-link:hover {
  color: #fff;
  border-bottom-color: var(--hl-accent);
}
.hl-spark-cell {
  min-width: 6.5rem;
  vertical-align: middle;
}
.hl-spark {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
  padding: .1rem .2rem;
  border-radius: 4px;
}
.hl-spark:hover {
  background: rgba(80, 227, 194, .08);
}
.hl-spark svg {
  display: block;
  flex-shrink: 0;
  overflow: visible;
}
.hl-spark-chg {
  font-size: .65rem;
  font-weight: 600;
  min-width: 2.6rem;
  text-align: right;
}
.hl-spark-empty {
  color: var(--hl-muted);
  font-size: .75rem;
}
.hl-star-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 600px) {
  .hl-star-card { grid-template-columns: 1fr; }
}
.hl-star-logo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--hl-border-2);
}
.hl-star-body h2 {
  margin: 0 0 .75rem;
  font-size: 1.05rem;
}
.hl-star-facts {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: .88rem;
  line-height: 1.7;
  color: var(--hl-muted);
}
.hl-star-facts b { color: var(--hl-text); }
.hl-star-radios {
  display: flex;
  gap: 1.25rem;
  margin-bottom: .85rem;
  font-size: .9rem;
}
.hl-star-radios label {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}
.hl-star-box {
  background: var(--hl-panel-2);
  border: 1px solid var(--hl-border-2);
  border-radius: 6px;
  padding: .65rem .8rem;
  font-size: .78rem;
  color: var(--hl-muted);
  margin-bottom: .85rem;
  line-height: 1.5;
}
