/* Macro Simplified — CoinBureau-inspired media chrome */
:root {
  --bg-shell: #0a0e17;
  --bg-header: #0a0e17;
  --bg-navy: #0f1623;
  --bg-panel: #141c2b;
  --bg-panel-hover: #1a2436;
  --bg-article: #0a0e17;
  --bg-article-card: #0f1623;
  --bg-article-elevated: #151d2c;
  --text-on-dark: #f1f5f9;
  --text-muted-dark: #94a3b8;
  --text-body: #e8eef6;
  --text-muted: #94a3b8;
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.1);
  --gold: #f5c518;
  --gold-hover: #ffd84d;
  --gold-text: #1a1400;
  --teal: #2dd4bf;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-chrome: 72rem;
  --max-prose: 44rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.shell {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-on-dark);
  background: var(--bg-shell);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--gold);
}

/* —— Header —— */
.site-header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-dark);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--max-chrome);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text-on-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.site-logo:hover {
  color: #fff;
}

.site-logo__img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.site-logo__text {
  font-size: 1.05rem;
}

.site-footer__brand-block {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.site-footer__logo-link {
  display: block;
  line-height: 0;
}

.site-footer__logo {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
}

.badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

.badge--draft {
  background: rgba(245, 197, 24, 0.15);
  color: #eab308;
  border: 1px solid rgba(245, 197, 24, 0.35);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.site-nav__item > a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

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

/* Learn dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__summary {
  list-style: none;
  cursor: pointer;
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 500;
  user-select: none;
}

.nav-dropdown__summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown__summary::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.75;
}

.nav-dropdown[open] > .nav-dropdown__summary {
  color: #fff;
}

.nav-dropdown__panel {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  min-width: 38rem;
  max-width: min(90vw, 44rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
}

.nav-dropdown__label {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.nav-dropdown__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown__group li {
  margin: 0.2rem 0;
}

.nav-dropdown__group a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-dropdown__group a:hover {
  color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.45rem;
  background: transparent;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
  border: 1px solid transparent;
  line-height: 1.2;
}

.btn--gold {
  background: var(--gold);
  color: var(--gold-text) !important;
}

.btn--gold:hover {
  background: var(--gold-hover);
  color: var(--gold-text) !important;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-on-dark) !important;
  border-color: rgba(255, 255, 255, 0.22);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold) !important;
}

.site-nav__item--cta .btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.88rem;
}

/* —— Main shells —— */
.main {
  flex: 1;
  width: 100%;
  padding: 0;
  max-width: none;
  margin: 0;
}

.page-home .main {
  background: var(--bg-shell);
}

/* —— Hero —— */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(245, 197, 24, 0.08), transparent 55%),
    linear-gradient(180deg, #0f1623 0%, var(--bg-shell) 100%);
  border-bottom: 1px solid var(--border-dark);
  padding: 3.25rem 1.25rem 3.5rem;
}

.hero__inner {
  max-width: var(--max-chrome);
  margin: 0 auto;
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  font-weight: 800;
}

.hero__lede {
  margin: 0 0 1.5rem;
  max-width: 38rem;
  color: var(--text-muted-dark);
  font-size: 1.08rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* —— Featured + cards —— */
.home-featured,
.card-section,
.home-glossary-strip {
  padding: 2.25rem 1.25rem;
}

.home-featured__inner,
.card-section__inner,
.home-glossary-strip__inner {
  max-width: var(--max-chrome);
  margin: 0 auto;
}

.feature-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: rgba(245, 197, 24, 0.45);
  transform: translateY(-2px);
  color: inherit;
}

.feature-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 220px;
}

.feature-card__body {
  padding: 1.75rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-card__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.feature-card__title {
  margin: 0 0 0.65rem;
  font-size: 1.55rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.feature-card__blurb {
  margin: 0 0 1rem;
  color: var(--text-muted-dark);
  font-size: 0.98rem;
}

.feature-card__cta {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.92rem;
}

.card-section {
  padding-top: 0.5rem;
}

.card-section__head {
  margin-bottom: 1.1rem;
}

.card-section__title {
  margin: 0;
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.media-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.media-card:hover {
  background: var(--bg-panel-hover);
  border-color: rgba(245, 197, 24, 0.35);
  transform: translateY(-2px);
  color: inherit;
}

.media-card__thumb {
  aspect-ratio: 16 / 9;
  background: #0a0e17;
  overflow: hidden;
}

.media-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card__body {
  padding: 0.95rem 1rem 1.15rem;
  flex: 1;
}

.media-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  color: #fff;
  letter-spacing: -0.01em;
}

.media-card__blurb {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted-dark);
  line-height: 1.45;
}

.home-glossary-strip {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.home-glossary-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.5rem;
  background: var(--bg-navy);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
}

.home-glossary-strip h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  color: #fff;
}

.home-glossary-strip p {
  margin: 0;
  color: var(--text-muted-dark);
  font-size: 0.95rem;
}

/* —— Primer pages (Option A: dark shell + soft article card) —— */
.page-primer .main {
  background: var(--bg-shell);
  color: var(--text-body);
}

.primer-band {
  background: transparent;
  border-bottom: none;
  color: var(--text-on-dark);
  padding: 2.25rem 1.25rem 1.25rem;
}

.primer-band__inner {
  max-width: var(--max-prose);
  margin: 0 auto;
}

.primer-band__crumb {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--text-muted-dark);
}

.primer-band__crumb a {
  color: var(--text-muted-dark);
  text-decoration: none;
}

.primer-band__crumb a:hover {
  color: var(--gold);
}

.primer-band__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #fff;
}

.primer-band__desc {
  margin: 0;
  color: var(--text-muted-dark);
  font-size: 1.02rem;
  max-width: 40rem;
}

.primer-body {
  max-width: var(--max-prose);
  margin: 0 auto 0.5rem;
  padding: 1.75rem 1.5rem 2rem;
  color: var(--text-body);
  background: var(--bg-article-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  box-shadow: none;
}

/* Hide markdown duplicate H1 (title lives in band) */
.article-body > h1:first-child {
  display: none;
}

.article-body a {
  color: var(--teal);
}

.article-body a:hover {
  color: var(--gold);
}

.article-body h2 {
  color: #fff;
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

.article-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0.5rem;
}

.article-body h3 {
  color: #e2e8f0;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body table {
  margin: 0 0 1rem;
  color: var(--text-body);
}

.article-body ul,
.article-body ol {
  padding-left: 1.35rem;
}

.article-body li {
  margin: 0.3rem 0;
}

.article-body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--bg-article-elevated);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-body);
}

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

.article-body hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 1.75rem 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.article-body th,
.article-body td {
  border: 1px solid var(--border-light);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.article-body th {
  background: var(--bg-article-elevated);
  color: #fff;
}

.article-body em {
  color: var(--text-muted);
  font-size: 0.95em;
}

.article-body img {
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-dark);
  background: var(--bg-article-elevated);
  margin: 0.25rem 0 0.35rem;
}

/* 404 / generic prose on dark shell */
.page-utility .main,
body:not(.page-home):not(.page-primer) .main {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

.prose h1 {
  color: #fff;
}

.prose a {
  color: var(--gold);
}

/* —— Telegram CTA —— */
.telegram-cta {
  margin: 2rem 1.25rem 2.5rem;
}

.page-primer .telegram-cta {
  max-width: var(--max-prose);
  margin-left: auto;
  margin-right: auto;
  margin-top: 1.25rem;
}

.page-home .telegram-cta {
  max-width: var(--max-chrome);
  margin-left: auto;
  margin-right: auto;
}

.telegram-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #121a28 0%, #1a1520 100%);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.telegram-cta__title {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
  color: #fff;
  border: none;
  padding: 0;
}

.telegram-cta__text {
  margin: 0;
  color: var(--text-muted-dark);
  font-size: 0.95rem;
  max-width: 36rem;
}

.telegram-cta__action {
  margin: 0;
}

/* —— Footer —— */
.site-footer {
  background: #070a10;
  color: var(--text-muted-dark);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-dark);
  padding: 2rem 1.25rem 2.5rem;
  margin-top: auto;
}

.site-footer__inner {
  max-width: var(--max-chrome);
  margin: 0 auto;
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.site-footer__brand {
  margin: 0 0 0.2rem;
  color: #e2e8f0;
  font-size: 1rem;
}

.site-footer__tagline {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-weight: 600;
}

.site-footer__domain {
  margin: 0;
  font-size: 0.85rem;
}

.site-footer__nav {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.site-footer a {
  color: #cbd5e1;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold);
}

.site-footer__disclaimer {
  border-top: 1px solid var(--border-dark);
  padding-top: 1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #64748b;
}

.site-footer__disclaimer p {
  margin: 0;
  max-width: 52rem;
}

.site-footer__disclaimer strong {
  color: #94a3b8;
}

/* —— Responsive —— */
@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card {
    grid-template-columns: 1fr;
  }

  .nav-dropdown__panel {
    min-width: 20rem;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-dark);
    padding: 0.75rem 1.25rem 1.25rem;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-header {
    position: sticky;
  }

  .site-header__inner {
    position: relative;
    flex-wrap: wrap;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .nav-dropdown__panel {
    position: static;
    min-width: 0;
    max-width: none;
    box-shadow: none;
    margin-top: 0.55rem;
    grid-template-columns: 1fr;
  }

  .site-nav__item--cta {
    margin-top: 0.35rem;
  }

  .site-nav__item--cta .btn {
    display: block;
    text-align: center;
  }

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

  .hero {
    padding: 2.25rem 1.15rem 2.5rem;
  }

  .site-logo__text {
    font-size: 0.98rem;
  }
}
