/* =========================================================================
   dexwatch — /watchlist/ and /compare/ shared styles
   Reuses the global design tokens from styles.css.
   ========================================================================= */

.portal-main { padding-top: 36px; padding-bottom: 96px; }
.portal-head { max-width: 760px; margin-bottom: 26px; }
.portal-title { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; }
.portal-lead { color: var(--ink-3); font-size: 16px; line-height: 1.55; margin-top: 12px; text-wrap: pretty; }

.portal-status-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 22px; }

/* ---- empty state ---- */
.empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 16px; padding: 64px 28px; border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg); background: var(--bg-elev);
}
.empty-ic {
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent-wash); color: color-mix(in oklch, var(--accent) 70%, var(--ink));
  border: 1px solid var(--accent-line);
}
.empty-ic svg { width: 26px; height: 26px; }
.empty h2 { font-size: 21px; }
.empty p { color: var(--ink-3); max-width: 440px; line-height: 1.55; }
.empty .row-g { gap: 10px; margin-top: 4px; }

/* =========================================================================
   Watchlist cards
   ========================================================================= */
.wl-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.wl-card {
  display: grid; align-items: center; gap: 16px;
  grid-template-columns: auto 1fr auto auto;
  padding: 16px 18px;
}
.wl-id { display: flex; align-items: center; gap: 13px; min-width: 0; }
.wl-id .nm { font-weight: 750; font-size: 17px; letter-spacing: -0.01em; }
.wl-id .meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; }
.wl-id .tk { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); }
.wl-metrics { display: flex; gap: 26px; flex-wrap: wrap; }
.wl-metric .l { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.wl-metric .v { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; margin-top: 2px; }
.wl-price { text-align: right; }
.wl-price .p { font-family: var(--font-mono); font-weight: 700; font-size: 16px; }
.wl-actions { display: flex; align-items: center; gap: 8px; }
.wl-remove {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink-3);
  transition: color .15s, border-color .15s, background .15s;
}
.wl-remove:hover { color: var(--down); border-color: color-mix(in oklch, var(--down) 40%, var(--line)); background: color-mix(in oklch, var(--down) 8%, var(--bg-elev)); }
.wl-remove svg { width: 16px; height: 16px; }

.wl-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.wl-bar .count { font-size: 14px; color: var(--ink-3); }
.wl-bar .count b { color: var(--ink); font-weight: 700; }

@media (max-width: 880px) {
  .wl-card { grid-template-columns: auto 1fr auto; }
  .wl-metrics { display: none; }
}
@media (max-width: 560px) {
  .wl-card { grid-template-columns: 1fr; row-gap: 12px; }
  .wl-price { text-align: left; }
  .wl-actions .btn { flex: 1; }
}

/* =========================================================================
   Compare tool
   ========================================================================= */
.cmp-pickbar { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.cmp-pick { position: relative; }
.cmp-pick label { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.cmp-select {
  height: 44px; min-width: 210px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--bg-elev); border: 1px solid var(--line-strong); color: var(--ink);
  font-weight: 600; font-size: 14.5px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7976' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
  -webkit-appearance: none; appearance: none;
}
.cmp-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent); }
.cmp-addcol { display: flex; flex-direction: column; justify-content: flex-end; }

/* comparison grid */
.cmp-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.cmp-table { border-collapse: collapse; table-layout: fixed; width: 100%; }
.cmp-table th, .cmp-table td { text-align: left; padding: 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cmp-table tr:last-child td, .cmp-table tr:last-child th { border-bottom: none; }
.cmp-table th.cmp-rowlabel {
  position: sticky; left: 0; z-index: 2; width: 168px; min-width: 148px;
  background: var(--bg-sunken); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; padding: 20px 22px;
  border-right: 1px solid var(--line);
}
.cmp-rowlabel .hint { display: block; font-weight: 500; color: var(--ink-faint); font-size: 11px; margin-top: 3px; }
.cmp-table td.cmp-col { padding: 20px 24px; }
.cmp-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15.5px; }
.cmp-val.best { color: var(--up); }
.cmp-best-tag { display: inline-block; margin-left: 7px; font-family: var(--font-ui); font-size: 10px; font-weight: 700; color: var(--up); vertical-align: 1px; text-transform: uppercase; letter-spacing: .04em; }

/* header row with the DEX identity */
.cmp-head td, .cmp-head th { background: var(--bg-elev); border-bottom: 2px solid var(--line-strong); padding-top: 26px; padding-bottom: 24px; }
.cmp-headcard { display: flex; flex-direction: column; gap: 10px; }
.cmp-headcard .top { display: flex; align-items: center; gap: 11px; }
.cmp-headcard .nm { font-weight: 750; font-size: 17px; letter-spacing: -0.01em; }
.cmp-headcard .tk { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.cmp-remove { margin-left: auto; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--ink-faint); background: var(--bg-elev); }
.cmp-remove:hover { color: var(--down); border-color: color-mix(in oklch, var(--down) 40%, var(--line)); }
.cmp-remove svg { width: 15px; height: 15px; }
.cmp-head .cmp-rowlabel { background: var(--bg-elev); border-bottom: 2px solid var(--line-strong); }

.cmp-score-row td { padding-top: 6px; padding-bottom: 6px; }
.cmp-scoreline { display: flex; align-items: center; gap: 9px; }
.cmp-scoreline .n { font-family: var(--font-mono); font-weight: 700; font-size: 15px; }

.cmp-cta-row td { padding: 24px; }
.cmp-disclosure { display: block; font-size: 11px; color: var(--ink-faint); margin-top: 8px; line-height: 1.4; }

.cmp-emptycol { display: grid; place-items: center; min-height: 120px; color: var(--ink-faint); font-size: 13px; text-align: center; }

/* keep pills on one line; let multi-chip rows wrap between chips */
.cmp-col .badge, .cmp-col .chip { white-space: nowrap; }
.cmp-col .chip, .cmp-col .chip-chain { margin: 0 5px 6px 0; }
.cmp-col .badge { max-width: 100%; }

/* a soft tint on the whole "winner" cell */
.cmp-col.best-cell { background: color-mix(in oklch, var(--up) 7%, transparent); }

/* ---- shareable matchup bar ---- */
.cmp-sharebar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 20px;
  flex-wrap: wrap; margin: 0 0 22px; padding: 14px 18px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md);
}
.cmp-vs { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.cmp-vs-pill {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px;
  letter-spacing: -0.01em; color: var(--ink); padding: 5px 12px 5px 7px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--bg);
  transition: border-color .14s, color .14s;
}
a.cmp-vs-pill:hover { border-color: var(--accent-line); color: var(--accent); }
.cmp-vs-pill .mono-badge { width: 22px; height: 22px; font-size: 10px; border-radius: 6px; }
.cmp-vs-x { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.cmp-share-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmp-share-hint { font-size: 12px; }
.cmp-share-actions .btn svg { margin-right: 6px; }
@media (max-width: 600px) { .cmp-share-hint { display: none; } .cmp-sharebar { gap: 12px; } }

/* copy toast */
.cmp-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  z-index: 120; padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg, 0 12px 34px rgba(0,0,0,.22));
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.cmp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- popular comparisons (static internal links) ---- */
.cmp-popular { margin-top: 52px; }
.cmp-popular h2 { font-size: clamp(19px, 2.2vw, 23px); letter-spacing: -0.02em; }
.cmp-popular .muted { font-size: 14px; margin-top: 4px; }
.cmp-popular-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; margin-top: 16px; }
.cmp-pop-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--r-md); font-weight: 650; font-size: 14px; color: var(--ink);
  transition: border-color .14s, box-shadow .14s, transform .12s;
}
.cmp-pop-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.cmp-pop-link .arr { color: var(--ink-faint); flex: none; }
.cmp-pop-link:hover .arr { color: var(--accent); }
