/* Layout polish and the shared dark gem surface. Loaded after modern.css. */
:root {
  --gem-emerald: #3ee0a2;
  --gem-cyan: #7ee7ff;
  --gem-violet: #b9a6ff;
}

.Body--source {
  --source-muted: #c5d2e2;
  --source-muted-strong: #d5e2ef;
  background:
    radial-gradient(circle at 12% 8%, rgba(62, 224, 162, 0.14), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(126, 231, 255, 0.12), transparent 26%),
    radial-gradient(circle at 70% 80%, rgba(185, 166, 255, 0.12), transparent 32%),
    linear-gradient(180deg, #071018 0%, #0b1422 100%);
}

.Body--source::before {
  background-image:
    linear-gradient(rgba(126, 231, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 75%);
}

body:not(.Body--source) {
  color: #e8f1fb;
  background:
    radial-gradient(circle at 0% 0%, rgba(62, 224, 162, 0.12), transparent 30%),
    linear-gradient(180deg, #071018, #0c1626);
}

.Source-ProjectCard,
.Source-DetailPanel,
.Source-HeroPanel,
.MarketPage-Panel,
.MarketPage-ChartPanel,
.CoinBoard-Card,
body:not(.Body--source) .panel,
body:not(.Body--source) .hero {
  background: rgba(16, 28, 44, 0.72);
  border: 1px solid rgba(186, 230, 255, 0.16);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.Source-ProjectCard:hover,
.CoinBoard-Card:hover {
  border-color: rgba(62, 224, 162, 0.55);
  box-shadow: 0 0 0 1px rgba(62, 224, 162, 0.25), 0 16px 40px rgba(0, 0, 0, 0.35);
}

.Source-ProjectDescription,
.Source-ProjectSubtitle,
.Source-DetailCopy {
  overflow-wrap: anywhere;
}

.Source-ProjectCard .Source-ProjectDescription,
.Source-DirectoryCard .Source-ProjectSubtitle {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.Source-ProjectAvatar,
.Source-Brand__image,
.brand__image {
  overflow: hidden;
}

.Source-ProjectAvatar img,
.Source-Brand__image,
.brand__image {
  object-fit: cover;
  max-width: 100%;
}

h1, h2, .Source-ProjectName {
  overflow-wrap: anywhere;
}

.Source-BottomNav {
  max-width: calc(100vw - 12px);
  overflow-x: auto;
}

.Source-Header {
  flex-wrap: wrap;
}

.Source-DataPartners {
  margin: 8px 0 0;
  color: #b7c6d8;
  font-size: 12px;
  line-height: 1.5;
}

.PumpColumns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 100%;
}
.PumpColumns h2 { margin: 0 0 8px; font-size: 1.15rem; }
.PumpList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: none;
  overflow: visible;
}
.PumpRow {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  grid-template-areas: "rank name range" "rank horizon meter" "reason reason reason";
  gap: 2px 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
  color: #e5edf8;
  background: #1b2030;
  border: 1px solid #45354d;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
.PumpRow:hover { border-color: #a5c576; background: #1b2a35; }
.PumpRow__rank { grid-area: rank; color: #91a6c0; font-size: 12px; }
.PumpRow strong { grid-area: name; min-width: 0; font-size: 15px; }
.PumpRow strong small { display: block; color: #97aabe; font-size: 11px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.PumpRow__range { grid-area: range; color: #d5b2ff; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.PumpRow--dump .PumpRow__range { color: #ffabab; }
.PumpRow__horizon { grid-area: horizon; color: #97aabe; font-size: 12px; }
.PumpRow__meter { grid-area: meter; justify-self: end; width: min(96px, 24vw); height: 6px; border-radius: 99px; background: #2a3348; overflow: hidden; }
.PumpRow__meter span { display: block; height: 100%; width: calc(var(--p) * 1%); background: linear-gradient(90deg, #c2f970, #d5b2ff); }
.PumpRow__reason { grid-area: reason; margin: 2px 0 0; color: #c5d2e2; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .PumpColumns { grid-template-columns: minmax(0, 1fr); }
}

.CoinBoard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.CoinBoard-Card {
  min-width: 0;
  color: #e8f1fb;
}

.CoinBoard-Card svg,
#analysis-chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.CoinBoard-Head b.is-up { color: #8ef0c4; }
.CoinBoard-Head b.is-down { color: #ffb4b4; }
.CoinBoard-Head b.is-flat { color: #d5e2ef; }
.CoinBoard-Head b small { display: block; color: #b7c6d8; font-weight: 500; }

.MarketPage-Target,
.CoinBoard-Target,
#analysis-status,
#degen20-status {
  overflow-wrap: anywhere;
}

#prediction-reasoning,
#analysis-scenario,
#analysis-context {
  color: #d5e2ef;
}

#prediction-reasoning li,
#analysis-scenario p {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .Source-Header { padding: 12px 16px; }
  .Source-Intro__stats { grid-template-columns: 1fr; }
  .MarketPage-Toolbar { flex-direction: column; align-items: stretch; }
  .CoinBoard { grid-template-columns: 1fr; }
  .Source-Footer__links, .site-footer__links { flex-wrap: wrap; }
  .Source-FreshLinks { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
