/*
 * Stable stylesheet for the edge-rendered coin archive.
 *
 * This file is also imported by the Astro site so that the Worker pages and
 * static pages share the same tokens and page chrome. Keep the URL stable:
 * the API cannot reference Astro's hashed build assets before rendering HTML.
 */
:root {
  --page-bg: #0a0f1c;
  --page-surface: rgba(17, 26, 43, 0.88);
  --page-surface-subtle: rgba(12, 20, 34, 0.76);
  --page-border: #253246;
  --page-border-strong: #344a63;
  --page-text: #edf4f2;
  --page-muted: #91a0b5;
  --page-dim: #718198;
  --page-accent: #64e6c2;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--page-text);
  background: var(--page-bg);
  color-scheme: dark;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(
      circle at 78% 5%,
      rgba(100, 230, 194, 0.11),
      transparent 30rem
    ),
    radial-gradient(
      circle at 8% 35%,
      rgba(56, 189, 248, 0.06),
      transparent 26rem
    ),
    var(--page-bg);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid rgba(56, 71, 94, 0.72);
  background: rgba(10, 15, 28, 0.82);
  backdrop-filter: blur(18px);
}

.site-header nav,
.site-footer,
main {
  max-width: 1152px;
  margin: 0 auto;
  padding: 24px;
}

.site-header nav {
  padding-block: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

main {
  padding-block: 48px;
}

@media (max-width: 640px) {
  .site-header nav {
    padding-block: 0.8rem;
  }
  .site-nav {
    gap: 0.6rem;
  }
  .site-nav > a {
    display: none;
  }
  .language-switcher {
    display: flex;
  }
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.site-logo-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(100, 230, 194, 0.38);
  border-radius: 0.65rem;
  background: linear-gradient(
    145deg,
    rgba(100, 230, 194, 0.2),
    rgba(94, 93, 240, 0.18)
  );
  color: #8af0d4;
  font-size: 0.85rem;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1.35rem;
  color: #aebbcf;
  font-size: 0.84rem;
  font-weight: 650;
}

.site-nav > a:hover {
  color: #fff;
}

.language-switcher {
  display: inline-flex;
  border: 1px solid #253246;
  border-radius: 9999px;
  padding: 0.15rem;
}

.language-switcher button,
.language-switcher .language-choice {
  border: 0;
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
  background: transparent;
  color: #91a0b5;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.language-switcher button[aria-pressed="true"],
.language-switcher .language-choice[aria-current="true"] {
  background: var(--page-accent);
  color: #07110f;
}

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--page-border);
  color: #91a0b5;
  font-size: 0.82rem;
  line-height: 1.9;
}

.site-footer a {
  margin-right: 16px;
}

.breadcrumb {
  margin-bottom: 28px;
  color: #91a0b5;
  font-size: 0.78rem;
}

.breadcrumb a {
  margin-right: 8px;
  color: var(--page-accent);
}

.hero {
  padding: 36px;
  border: 1px solid var(--page-border);
  border-radius: 18px;
  background: var(--page-surface);
}

.eyebrow {
  margin: 0;
  color: var(--page-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 14px 0;
  color: var(--page-text);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.3;
}

.lead {
  max-width: 820px;
  color: #c1cedc;
  font-size: 17px;
  line-height: 1.9;
}

.meta {
  color: var(--page-muted);
  font-size: 12px;
  line-height: 1.9;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 32px;
  margin-top: 30px;
}

.article-section {
  scroll-margin-top: 24px;
  margin-bottom: 20px;
  padding: 26px 30px;
  border: 1px solid var(--page-border);
  border-radius: 14px;
  background: var(--page-surface);
}

.article-section h2 {
  margin: 0 0 18px;
  color: var(--page-text);
  font-size: 23px;
  line-height: 1.5;
}

.article-section h3 {
  color: #dce8e5;
  font-size: 17px;
}

.article-section p,
.article-section li {
  color: #b4c2d1;
  font-size: 15px;
  line-height: 1.95;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.toc {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 22px;
  border: 1px solid var(--page-border);
  border-radius: 14px;
  background: var(--page-surface-subtle);
  font-size: 13px;
}

.toc a {
  display: block;
  margin: 14px 0;
  color: #a9b9cc;
  line-height: 1.6;
}

.facts,
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fact {
  padding: 16px;
  border-radius: 10px;
  background: rgba(10, 18, 31, 0.72);
}

.fact span {
  display: block;
  margin-bottom: 8px;
  color: var(--page-muted);
  font-size: 12px;
}

.fact strong {
  overflow-wrap: anywhere;
  color: var(--page-text);
  font-size: 16px;
}

.notice {
  margin: 20px 0;
  padding: 16px 20px;
  border: 1px solid rgba(240, 185, 11, 0.25);
  border-radius: 10px;
  background: rgba(240, 185, 11, 0.1);
  color: #f6d98b;
  font-size: 14px;
  line-height: 1.8;
}

.market {
  padding: 18px 0;
  border-top: 1px solid var(--page-border);
}

.market:first-of-type {
  border-top: 0;
}

.market-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #dce8e5;
}

.button {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--page-accent);
  color: #07110f;
  font-size: 13px;
  font-weight: 800;
}

.button:hover {
  background: #87f0d2;
  text-decoration: none;
}

.button-primary {
  background: var(--page-accent);
  color: #07110f;
}

.button-secondary {
  border: 1px solid #40516a;
  color: #dce8e5;
  background: transparent;
}

.button-secondary:hover {
  border-color: var(--page-accent);
  background: transparent;
}

.muted {
  color: var(--page-muted);
}

.pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid #35435a;
  border-radius: 9999px;
  padding: 0.3rem 0.65rem;
  color: #b8c5d7;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pill-binance {
  border-color: rgba(240, 185, 11, 0.45);
  color: #f8d24a;
}

.pill-okx {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.market small {
  display: block;
  margin-top: 10px;
  overflow-wrap: anywhere;
  color: var(--page-muted);
  line-height: 1.9;
}

.card {
  display: block;
  padding: 24px;
  border: 1px solid var(--page-border);
  border-radius: 14px;
  background: var(--page-surface);
}

.card:hover {
  border-color: var(--page-accent);
  text-decoration: none;
}

.card h2 {
  margin: 12px 0;
  color: var(--page-text);
  font-size: 20px;
}

.card p {
  color: var(--page-muted);
  font-size: 14px;
  line-height: 1.9;
}

.coin-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.coin-links a {
  padding: 12px;
  border: 1px solid var(--page-border);
  border-radius: 8px;
  background: rgba(10, 18, 31, 0.72);
  color: #b4c2d1;
  overflow-wrap: anywhere;
}

.source-list {
  padding-left: 20px;
}

.source-list a {
  color: var(--page-accent);
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .site-header nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 14px;
  }

  main {
    padding: 20px 16px;
  }

  .hero {
    padding: 24px;
  }

  .content-layout {
    display: flex;
    flex-direction: column;
  }

  .toc {
    position: static;
    order: -1;
  }

  .toc a {
    display: inline-block;
    margin: 6px 12px 6px 0;
  }

  .article-section {
    padding: 22px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .coin-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
