/* Hashmonkeys — Prism theme v2 (crystal facets, readable cards, fixed nav) */
html[data-theme="prism"] {
  --void: #06050c;
  --surface: rgba(14, 11, 24, 0.82);
  --surface-2: rgba(168, 85, 247, 0.08);
  --border: rgba(168, 85, 247, 0.28);
  --text: #f5f2ff;
  --muted: rgba(195, 188, 220, 0.78);
  --coral: #f472b6;
  --mint: #22d3ee;
  --violet: #a855f7;
  --rose: #fb7185;
  --font-sans: "Space Grotesk", "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-display: "Space Grotesk", sans-serif;
  --r: 18px;

  --prism-1: #a855f7;
  --prism-2: #22d3ee;
  --prism-3: #f472b6;
  --prism-4: #34d399;
  --prism-border: linear-gradient(
    var(--prism-angle, 135deg),
    var(--prism-1),
    var(--prism-2),
    var(--prism-3),
    var(--prism-4)
  );
  --prism-glow: 0 0 48px rgba(168, 85, 247, 0.22), 0 0 96px rgba(34, 211, 238, 0.08);
  --prism-panel: rgba(12, 9, 22, 0.92);
  --prism-facet: polygon(0 14px, 14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

html[data-theme="prism"] body {
  background: var(--void);
}

html[data-theme="prism"] .wrap {
  width: min(1280px, 100% - 2rem);
  /* Fixed nav is out of flow — reserve logo height + breathing room */
  padding-top: calc(clamp(52px, min(14vw, 12vmin), 104px) + 2.25rem);
}

/* ── Floating nav — 3-column grid, no overlap ── */
html[data-theme="prism"] .mh-nav {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 1.25rem));
  margin: 0;
  padding: 0.5rem 0.85rem;
  z-index: 200;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 1rem;
  background: rgba(10, 8, 20, 0.78);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 999px;
  box-shadow: var(--prism-glow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(22px) saturate(1.5);
  flex-wrap: nowrap;
  min-height: 0;
}

html[data-theme="prism"] .mh-nav__start {
  display: contents;
}

html[data-theme="prism"] .brand-mark {
  grid-column: 1;
  flex-shrink: 0;
}

html[data-theme="prism"] .nav-links {
  grid-column: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.15rem;
  min-width: 0;
}

html[data-theme="prism"] .mh-nav__end {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

html[data-theme="prism"] .nav-links a {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

html[data-theme="prism"] .nav-links a:hover {
  color: var(--text);
  background: rgba(168, 85, 247, 0.14);
}

html[data-theme="prism"] .nav-links a[aria-current="page"] {
  color: var(--text);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(34, 211, 238, 0.16));
  border-color: rgba(168, 85, 247, 0.38);
}

html[data-theme="prism"] .nav-block-alerts-panel {
  gap: 0.4rem;
  flex-wrap: nowrap;
}

html[data-theme="prism"] .nav-block-alerts__txt {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

html[data-theme="prism"] .nav-block-alerts-sound__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

html[data-theme="prism"] .nav-block-alerts-sound__select {
  font-size: 0.72rem;
  max-width: 7.5rem;
  padding: 0.32rem 1.5rem 0.32rem 0.45rem;
  border-radius: 999px;
  border-color: rgba(34, 211, 238, 0.25);
  background: rgba(0, 0, 0, 0.45);
}

html[data-theme="prism"] .nav-block-alerts-sound__test {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  font-size: 0.58rem;
}

html[data-theme="prism"] .mh-theme-picker {
  gap: 0.3rem;
}

html[data-theme="prism"] .mh-theme-picker__label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

html[data-theme="prism"] .mh-theme-picker__select {
  font-family: var(--font-display);
  font-size: 0.68rem;
  max-width: 6.5rem;
  padding: 0.32rem 1.4rem 0.32rem 0.55rem;
  border-radius: 999px;
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(0, 0, 0, 0.45);
}

html[data-theme="prism"] .brand-mark__logo {
  filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.4));
}

/* ── Hero — split when image present, crystal panel ── */
html[data-theme="prism"] .hero--brand {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 42%);
  gap: 1.35rem 1.75rem;
  align-items: center;
  margin-top: 0.65rem;
  margin-bottom: 1.65rem;
  padding: 1.65rem 1.75rem;
  background:
    linear-gradient(155deg, rgba(168, 85, 247, 0.1) 0%, transparent 38%),
    linear-gradient(320deg, rgba(34, 211, 238, 0.06) 0%, transparent 42%),
    var(--prism-panel);
  border-radius: calc(var(--r) + 6px);
  border: 1px solid rgba(168, 85, 247, 0.24);
  box-shadow: var(--prism-glow);
  position: relative;
  overflow: hidden;
  clip-path: var(--prism-facet);
}

html[data-theme="prism"] .hero--brand:has([data-mh-hero-wrap][hidden]) {
  grid-template-columns: 1fr;
}

html[data-theme="prism"] .hero--brand::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  background: var(--prism-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

html[data-theme="prism"] .hero--brand::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 45%,
    rgba(34, 211, 238, 0.12) 50%,
    rgba(244, 114, 182, 0.08) 55%,
    transparent 100%
  );
  animation: prism-shimmer-slide 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

html[data-theme="prism"] .hero__copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

html[data-theme="prism"] .hero__visual {
  position: relative;
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  height: clamp(260px, 42vh, 420px);
  border-radius: calc(var(--r) - 2px);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: inset 0 0 40px rgba(168, 85, 247, 0.12);
}

html[data-theme="prism"] .hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  background: linear-gradient(120deg, #fff 0%, var(--prism-2) 38%, var(--prism-1) 68%, var(--prism-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="prism"] .hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--prism-2);
}

html[data-theme="prism"] .hero-lead {
  color: var(--muted);
  max-width: 48ch;
}

html[data-theme="prism"] .hero-quote {
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--prism-2), var(--prism-1), var(--prism-3)) 1;
  color: rgba(210, 200, 235, 0.88);
}

html[data-theme="prism"] .hero__img {
  transform: scale(1.08);
  filter: saturate(1.12) drop-shadow(0 0 40px rgba(34, 211, 238, 0.22));
}

html[data-theme="prism"] .stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: calc(var(--r) - 4px);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

html[data-theme="prism"] .stat-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.14);
  transform: translateY(-2px);
}

html[data-theme="prism"] .stat-card small {
  color: var(--muted);
  font-weight: 600;
}

html[data-theme="prism"] .stat-card strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  background: linear-gradient(90deg, var(--prism-2), var(--prism-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="prism"] .miner-search {
  border-radius: calc(var(--r) - 2px);
  border-color: rgba(168, 85, 247, 0.24);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

html[data-theme="prism"] .miner-search-btn {
  border-radius: 10px;
  background: var(--prism-border);
  color: #06050c;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25);
}

html[data-theme="prism"] .hero-actions .discord-link {
  border-radius: 999px;
  border-color: rgba(88, 101, 242, 0.35);
  background: rgba(88, 101, 242, 0.12);
}

/* ── Scheme toolbar ── */
html[data-theme="prism"] .scheme-toolbar {
  border-radius: calc(var(--r) - 2px);
  border-color: rgba(168, 85, 247, 0.22);
  background: var(--prism-panel);
  backdrop-filter: blur(16px);
  clip-path: var(--prism-facet);
}

html[data-theme="prism"] .scheme-btn.active {
  background: var(--prism-border);
  color: #06050c;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.28);
}

/* ── Crystal facet pool cards (readable, staggered honeycomb feel) ── */
html[data-theme="prism"] .pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.35rem 1.15rem;
  padding: 0.5rem 0 4rem;
}

html[data-theme="prism"] .pool-card {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(168, 85, 247, 0.26);
  border-radius: calc(var(--r) + 2px);
  padding: 1.4rem 1.3rem 1.25rem;
  padding-top: 1.55rem;
  background:
    linear-gradient(168deg, rgba(168, 85, 247, 0.14) 0%, rgba(12, 9, 22, 0.96) 28%, rgba(8, 6, 16, 0.98) 100%);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  clip-path: none;
  aspect-ratio: auto;
  min-height: 0;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s, box-shadow 0.35s;
  filter: none;
}

html[data-theme="prism"] .pool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 4px;
  background: var(--prism-border);
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
  opacity: 0.85;
  z-index: 2;
  pointer-events: none;
}

html[data-theme="prism"] .pool-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--prism-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.35s;
}

html[data-theme="prism"] .pool-card > * {
  position: relative;
  z-index: 3;
}

html[data-theme="prism"] .pool-card:nth-child(3n + 2) {
  transform: translateY(0.85rem);
}

html[data-theme="prism"] .pool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 20px 48px rgba(168, 85, 247, 0.22), 0 0 0 1px rgba(34, 211, 238, 0.12);
}

html[data-theme="prism"] .pool-card:nth-child(3n + 2):hover {
  transform: translateY(calc(0.85rem - 5px));
}

html[data-theme="prism"] .pool-card:hover::after {
  opacity: 0.85;
}

html[data-theme="prism"] .pool-card-head {
  padding-right: 3.25rem;
  margin-bottom: 0.85rem;
}

html[data-theme="prism"] .pool-card-head h3 {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
}

html[data-theme="prism"] .pool-algo-label {
  color: var(--muted);
  font-size: 0.72rem;
}

html[data-theme="prism"] .pool-coin-logo--corner {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.2);
}

html[data-theme="prism"] .scheme-pill {
  font-size: 0.58rem;
  border-radius: 999px;
}

html[data-theme="prism"] .pool-card-blocks {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.85rem;
}

html[data-theme="prism"] .bc-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="prism"] .bc-label {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(195, 188, 220, 0.9);
}

html[data-theme="prism"] .bc-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--prism-2), var(--prism-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="prism"] .bc-pend .bc-val {
  font-size: 1.1rem;
  background: linear-gradient(90deg, var(--prism-1), var(--prism-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="prism"] .bc-sub {
  color: rgba(170, 162, 195, 0.75);
  font-size: 0.62rem;
}

html[data-theme="prism"] .pool-stats dt {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(185, 178, 210, 0.85);
}

html[data-theme="prism"] .pool-stats dd {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

html[data-theme="prism"] .pool-stratum {
  font-size: 0.74rem;
  color: var(--muted);
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  padding-top: 0.65rem;
  margin-top: 0.35rem;
}

html[data-theme="prism"] .pool-stratum code {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 6px;
  color: var(--prism-2);
}

html[data-theme="prism"] .mh-foot {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  padding-top: 1.25rem;
}

html[data-theme="prism"] .dash-page-head,
html[data-theme="prism"] .blocks-page-head,
html[data-theme="prism"] .calc-page-head {
  margin-top: 0.65rem;
}

html[data-theme="prism"] .dash-page-head h1,
html[data-theme="prism"] .calc-page-head h1,
html[data-theme="prism"] .blocks-page-head h1 {
  font-family: var(--font-display);
  background: linear-gradient(120deg, #fff, var(--prism-2), var(--prism-1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="prism"] .dash-est-card,
html[data-theme="prism"] .calc-panel,
html[data-theme="prism"] .calc-card,
html[data-theme="prism"] .blocks-table-wrap {
  border-radius: var(--r);
  border: 1px solid rgba(168, 85, 247, 0.24);
  background: var(--prism-panel);
  box-shadow: var(--prism-glow);
  clip-path: var(--prism-facet);
}

html[data-theme="prism"] .block-notice {
  border-radius: var(--r);
  border: 1px solid rgba(168, 85, 247, 0.38);
  background: rgba(10, 8, 18, 0.94);
  box-shadow: var(--prism-glow);
  overflow: hidden;
}

html[data-theme="prism"] .block-notice__title {
  background: var(--prism-border);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

@media (max-width: 1024px) {
  html[data-theme="prism"] .wrap {
    padding-top: calc(clamp(52px, min(14vw, 12vmin), 104px) + 3.75rem);
  }

  html[data-theme="prism"] .mh-nav {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    border-radius: 22px;
    padding: 0.65rem 0.75rem;
  }

  html[data-theme="prism"] .brand-mark {
    grid-column: 1;
    grid-row: 1;
  }

  html[data-theme="prism"] .mh-nav__end {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }

  html[data-theme="prism"] .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    padding-top: 0.25rem;
    border-top: 1px solid rgba(168, 85, 247, 0.15);
  }
}

@media (max-width: 900px) {
  html[data-theme="prism"] .wrap {
    padding-top: calc(clamp(52px, min(14vw, 12vmin), 104px) + 4.25rem);
  }

  html[data-theme="prism"] .hero--brand {
    grid-template-columns: 1fr;
    clip-path: none;
    border-radius: var(--r);
  }

  html[data-theme="prism"] .hero__visual {
    grid-column: 1;
    order: -1;
    height: clamp(220px, 38vh, 340px);
  }

  html[data-theme="prism"] .pool-card:nth-child(3n + 2) {
    transform: none;
  }

  html[data-theme="prism"] .pool-card:nth-child(3n + 2):hover {
    transform: translateY(-5px);
  }

  html[data-theme="prism"] .scheme-toolbar {
    clip-path: none;
  }
}

@media (max-width: 560px) {
  html[data-theme="prism"] .wrap {
    padding-top: calc(clamp(48px, 14vw, 88px) + 4.75rem);
  }

  html[data-theme="prism"] .mh-nav__end {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }

  html[data-theme="prism"] .nav-block-alerts-sound__select {
    max-width: 5.5rem;
  }

  html[data-theme="prism"] .mh-theme-picker__select {
    max-width: 5.5rem;
  }
}
