:root { color-scheme: dark; --bg: #1a1a1a; --surface: #232323; --text: #edf2ff; --muted: #9aa8c2; --accent: #00ff88; --border: rgba(255,255,255,.1); }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font: 16px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
a { color: inherit; }
.site-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.brand { color: var(--accent); font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.03em; }
nav { display: flex; flex-wrap: wrap; gap: 6px; }
nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; text-decoration: none; font-size: .92rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); background: var(--surface); }
main { flex: 1; }
main > .hero, main #dynamic-content, main .content-grid, main .markets-section { margin-top: 1.75rem; }
.hero { padding: 0 0 24px; max-width: 760px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; }
h1 { margin: 12px 0 18px; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: -.04em; color: var(--text); }
.intro { margin: 0 0 8px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }

/* ---- CTA buttons ---- */
.anchor-btn { display: inline-flex; align-items: center; justify-content: center; margin: 12px 0 8px; padding: 13px 28px; border-radius: 10px; background: linear-gradient(135deg, #00ff88, #00c46a); color: #07111a; font-weight: 800; text-decoration: none; box-shadow: 0 8px 24px rgba(0, 255, 136, .18); transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.anchor-btn:hover, .anchor-btn:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 255, 136, .3); filter: brightness(1.06); }
.nav-cta { margin: 0; padding: 9px 16px; font-size: .85rem; border-radius: 8px; white-space: nowrap; flex-shrink: 0; }

/* ---- body content typography ---- */
.dynamic-content { max-width: 70ch; margin: 0 auto 48px; color: var(--text); }
.dynamic-content p { line-height: 1.65; margin: 0 0 1rem; }
.dynamic-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.dynamic-content a:hover { color: #00ff88; }
.dynamic-content h2 { margin: 2rem 0 .75rem; font-size: 1.45rem; line-height: 1.25; color: var(--text); background: var(--surface); border-radius: 10px; padding: 1.35rem 1.35rem 0; }
.dynamic-content h2 + p, .dynamic-content h2 + ul, .dynamic-content h2 + h3, .dynamic-content h2 + ol { padding-top: .25rem; }
.dynamic-content h2 ~ :not(h2):not(h3) { background: var(--surface); border-radius: 10px; margin-left: -1.35rem; margin-right: -1.35rem; padding: .35rem 1.35rem .55rem; }
.dynamic-content h2 ~ p:last-child, .dynamic-content h2 ~ ul:last-child { padding-bottom: 1.35rem; }
.dynamic-content h3 { margin: 1.5rem 0 .5rem; font-size: 1.15rem; line-height: 1.3; color: var(--text); }
.dynamic-content ul, .dynamic-content ol { margin: 0 0 1rem; padding-left: 1.6rem; }
.dynamic-content li { margin-bottom: .5rem; line-height: 1.6; }
.dynamic-content ul li::marker { color: #00ff88; }
.dynamic-content li p { margin: 0 0 .35rem; }
.dynamic-content strong { color: var(--text); }
.dynamic-content h3 + p { background: transparent; padding: 0 1.35rem .55rem; margin-left: -1.35rem; margin-right: -1.35rem; }

/* card sections: wrap h2..h3+content in card look via section pseudo-wrapper */
.dynamic-content > *:first-child { border-top-left-radius: 10px; border-top-right-radius: 10px; }

/* ---- market cards ---- */
.markets-section { padding: 0 0 72px; }
.markets-section h2 { margin: 2rem 0 1rem; font-size: 1.45rem; color: var(--text); }
.market-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}
.market-card { display: flex; flex-direction: column; gap: 0.75rem; background: #232323; border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; transition: border-color .2s ease, transform .2s ease; }
.market-card:hover { border-color: #00ff88; }
.market-card .anchor-btn { margin-top: auto; }
.market-details { display: inline-block; margin-top: 0.5rem; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.market-details:hover { color: #00ff88; }
.market-logo { height: 96px; display: flex; align-items: center; justify-content: center; background: #1a1a1a; border-radius: 8px; overflow: hidden; }
.market-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.market-logo-placeholder { width: 96px; height: 96px; border-radius: 8px; background: #232323; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 800; color: #00ff88; }
.market-name { margin: 0; font-size: 1.15rem; color: var(--text); }
.region-badge { align-self: flex-start; display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.region-badge.region-international { background: rgba(0,255,136,.12); color: #00ff88; border: 1px solid rgba(0,255,136,.35); }
.region-badge.region-canada { background: rgba(77,163,255,.12); color: #4da3ff; border: 1px solid rgba(77,163,255,.35); }
.region-badge.region-europe { background: rgba(180,140,255,.12); color: #b48cff; border: 1px solid rgba(180,140,255,.35); }
.market-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin: 0; }
.market-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { display: inline-block; padding: 0.25rem 0.6rem; border: 1px solid #3a3a3a; border-radius: 999px; font-size: 0.8rem; color: #e0e0e0; }
.market-card .anchor-btn { margin-top: auto; padding: 11px 20px; font-size: 0.95rem; }

/* ---- featured showcase on index ---- */
.featured-section { max-width: 1120px; margin: 0 auto 72px; padding: 0 0 24px; }
.featured-section h2 { margin: 0 0 1rem; font-size: 1.45rem; color: var(--text); }
.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}
.featured-grid .market-card { flex-direction: row; align-items: center; gap: 1rem; padding: 1rem 1.1rem; }
.featured-grid .market-logo { height: 64px; }
.featured-grid .market-logo-placeholder { width: 64px; height: 64px; font-size: 1.6rem; }
.featured-grid .market-card-main { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; min-width: 0; }
.featured-grid .market-card-main .anchor-btn { margin: 0; padding: 8px 16px; font-size: 0.85rem; align-self: flex-start; }
.featured-grid .market-tags, .featured-grid .market-desc { display: none; }
.featured-more { display: inline-block; margin-top: 1.25rem; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.featured-more:hover { color: #00ff88; }

.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; padding-bottom: 72px; }
.content-card, .empty-state { background: linear-gradient(145deg, rgba(35,35,35,.9), rgba(26,26,26,.9)); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
h2 { margin: 0 0 8px; font-size: 1.2rem; }
.content-card p, .empty-state { color: var(--muted); }
.content-card ul { padding-left: 20px; margin-bottom: 0; }
.content-card a { color: var(--accent); }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }

@media (max-width: 1024px) {
    .market-grid, .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .market-grid {
        grid-template-columns: 1fr;
    }
    .market-grid, .featured-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .site-header .nav-cta { order: 3; margin-top: 10px; align-self: flex-start; }
  nav { width: 100%; }
  nav a { padding-left: 0; padding-right: 14px; }
  .hero { padding-top: 0; }
}

/* Visual polish layer — layout and copy remain unchanged. */
:root {
  --bg: #1a1a1a;
  --surface: #232323;
  --surface-2: #2b2b2b;
  --text: #edf2ff;
  --muted: #9aa8c2;
  --accent: #66e3b4;
  --accent-strong: #00c46a;
  --border: rgba(255, 255, 255, .12);
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

html { background: var(--bg); scroll-behavior: smooth; }
body {
  background:
    radial-gradient(900px 460px at 12% -8%, rgba(0, 255, 136, .07), transparent 62%),
    radial-gradient(760px 420px at 100% 8%, rgba(0, 196, 106, .06), transparent 60%),
    var(--bg);
  color: var(--text);
  letter-spacing: .005em;
}

.site-shell { width: min(1160px, calc(100% - 40px)); }
.site-header {
  position: relative;
  padding: 22px 0 18px;
  border-bottom-color: rgba(171, 207, 235, .18);
}
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, .5), transparent);
}
.brand { color: var(--accent); text-shadow: 0 0 22px rgba(102, 227, 180, .18); }
nav { gap: 8px; }
nav a { transition: color .2s ease, background .2s ease, transform .2s ease; }
nav a:hover, nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(0, 255, 136, .10);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 136, .12);
  transform: translateY(-1px);
}

.hero { max-width: 820px; padding: 12px 0 30px; }
.eyebrow { color: var(--accent); }
h1 { text-wrap: balance; text-shadow: 0 10px 34px rgba(0, 0, 0, .22); }
.intro { max-width: 68ch; color: #b7bfd0; }

.anchor-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 30px rgba(47, 211, 151, .18);
}
.anchor-btn:hover, .anchor-btn:focus-visible { box-shadow: 0 14px 34px rgba(47, 211, 151, .28); }

.dynamic-content { max-width: 74ch; margin-bottom: 56px; }
.dynamic-content h2 {
  background: linear-gradient(135deg, rgba(43, 43, 43, .96), rgba(35, 35, 35, .96));
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}
.dynamic-content h2 ~ :not(h2):not(h3) { background: rgba(35, 35, 35, .92); }

.market-card, .content-card, .empty-state {
  background: linear-gradient(145deg, rgba(43, 43, 43, .94), rgba(35, 35, 35, .94));
  border-color: var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .13);
}
.market-card { border-radius: 14px; padding: 1.35rem; }
.market-card:hover {
  border-color: rgba(0, 255, 136, .55);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.market-logo { background: rgba(26, 26, 26, .72); border: 1px solid rgba(255, 255, 255, .10); }
.market-logo-placeholder { background: rgba(0, 255, 136, .08); color: var(--accent); }
.market-desc, .content-card p, .empty-state { color: var(--muted); }
.tag { border-color: rgba(255, 255, 255, .20); background: rgba(255,255,255,.025); }
.content-card, .empty-state { border-radius: 14px; }

a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-footer { border-top-color: rgba(255, 255, 255, .18); }

@media (max-width: 767px) {
  .site-shell { width: min(100% - 28px, 1160px); }
  .site-header { padding-top: 18px; }
  h1 { font-size: clamp(2rem, 11vw, 3rem); }
  .dynamic-content { margin-bottom: 40px; }
}

/* Final visual polish layer. Copy and markup remain untouched. */
body {
  background:
    radial-gradient(780px 360px at 50% -140px, rgba(0, 255, 136, .12), transparent 68%),
    linear-gradient(180deg, #1d1d1d 0%, #1a1a1a 42%, #171717 100%);
}
.site-shell { width: min(1180px, calc(100% - 48px)); }
.site-header {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 16px;
  background: rgba(35,35,35,.78);
  box-shadow: 0 14px 36px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(12px);
}
.site-header::after { display: none; }
.brand { font-size: 1.34rem; letter-spacing: -.045em; }
nav a {
  padding: 8px 12px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: all .2s ease;
}
nav a:hover, nav a[aria-current="page"] {
  border-color: rgba(0,255,136,.26);
  background: rgba(0,255,136,.09);
  transform: translateY(-1px);
}
main > .hero { margin-top: 2rem; }
.hero {
  position: relative;
  max-width: 900px;
  padding: 34px 38px 38px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(43,43,43,.96), rgba(28,28,28,.96));
  box-shadow: 0 24px 60px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.045);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 260px; height: 260px;
  top: -150px; right: -70px;
  border-radius: 50%;
  background: rgba(0,255,136,.12);
  filter: blur(30px);
  pointer-events: none;
}
.hero > * { position: relative; }
.eyebrow { font-size: .7rem; letter-spacing: .2em; }
h1 { max-width: 18ch; font-size: clamp(2.35rem, 5vw, 4.2rem); line-height: 1.02; }
.intro { max-width: 62ch; font-size: clamp(1.05rem, 1.8vw, 1.22rem); }
.anchor-btn { border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 14px 25px; }
.anchor-btn:hover, .anchor-btn:focus-visible { transform: translateY(-3px) scale(1.01); }
.dynamic-content { max-width: 78ch; }
.dynamic-content h2 {
  margin-top: 2.6rem;
  border-radius: 14px;
  padding: 1.25rem 1.45rem .25rem;
  font-size: 1.55rem;
  border-left: 3px solid var(--accent);
}
.dynamic-content h2 ~ :not(h2):not(h3) { padding-left: 1.45rem; padding-right: 1.45rem; }
.market-grid, .featured-grid { gap: 1.15rem; }
.market-card {
  position: relative;
  min-height: 100%;
  border-radius: 16px;
  padding: 1.35rem;
  background: linear-gradient(155deg, rgba(48,48,48,.96), rgba(31,31,31,.96));
  box-shadow: 0 16px 38px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.035);
}
.market-card::before {
  content: "";
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,.5), transparent);
}
.market-card:hover { transform: translateY(-5px); }
.market-logo { height: 112px; border-radius: 12px; }
.market-logo img { transition: transform .25s ease; }
.market-card:hover .market-logo img { transform: scale(1.04); }
.market-name { font-size: 1.2rem; letter-spacing: -.015em; }
.market-tags { gap: .4rem; }
.tag { background: rgba(255,255,255,.045); }
.content-grid { gap: 18px; }
.content-card, .empty-state { padding: 26px; border-radius: 16px; }
.content-card h2 { font-size: 1.3rem; }
.site-footer { margin-top: auto; padding: 28px 4px; }
@media (max-width: 680px) {
  .site-shell { width: min(100% - 24px, 1180px); }
  .site-header { margin-top: 8px; padding: 16px; border-radius: 14px; }
  .hero { padding: 26px 22px 28px; border-radius: 18px; }
  h1 { max-width: none; font-size: clamp(2.2rem, 12vw, 3.2rem); }
  .dynamic-content h2 { padding-left: 1rem; }
  .dynamic-content h2 ~ :not(h2):not(h3) { padding-left: 1rem; padding-right: 1rem; }
}

/* Shared page alignment and markets visual parity. */
main { width: 100%; }
main > .hero,
main > .dynamic-content,
main > .content-grid,
main > .markets-section,
main > .featured-section,
main #dynamic-content {
  width: min(100%, 1120px);
  margin-left: auto;
  margin-right: auto;
}
.hero {
  text-align: center;
}
.hero h1, .hero .intro { margin-left: auto; margin-right: auto; }
.hero .anchor-btn { margin-left: auto; margin-right: auto; }
.markets-section, .featured-section { text-align: center; }
.markets-section h2, .featured-section h2 { text-align: center; }
.market-grid, .featured-grid {
  width: 100%;
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}
.content-grid {
  width: min(100%, 1080px);
  margin-left: auto;
  margin-right: auto;
}
.dynamic-content {
  text-align: left;
}
.market-card { text-align: left; }
.featured-more { display: inline-block; }

@media (max-width: 680px) {
  main > .hero,
  main > .dynamic-content,
  main > .content-grid,
  main > .markets-section,
  main > .featured-section,
  main #dynamic-content { width: 100%; }
}

/* Clear section hierarchy: headings are not boxed together with their copy. */
.dynamic-content h2 {
  margin: 2.75rem 0 .85rem;
  padding: 0 0 .55rem 1rem;
  background: transparent;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0;
  box-shadow: none;
  font-size: clamp(1.3rem, 2.1vw, 1.65rem);
  letter-spacing: -.02em;
}
.dynamic-content h2 + p,
.dynamic-content h2 + ul,
.dynamic-content h2 + ol,
.dynamic-content h2 + h3,
.dynamic-content h2 ~ :not(h2):not(h3) {
  background: transparent;
  border-radius: 0;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}
.dynamic-content h2 ~ :not(h2):not(h3) { padding-top: .1rem; padding-bottom: .35rem; }
.dynamic-content h3 {
  margin-top: 1.8rem;
  color: var(--text);
  font-size: 1.08rem;
}
.dynamic-content h3 + p { padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; }

/* Markets uses the same visual system as the home showcase. */
.markets-section {
  margin-top: 2rem;
  padding: 2rem 0 5rem;
}
.markets-section > h2 {
  display: inline-block;
  margin: 0 auto 1.4rem;
  padding: 0 0 .55rem;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}
.markets-section .market-grid { align-items: stretch; }
.markets-section .market-card { min-height: 100%; }

@media (max-width: 680px) {
  .dynamic-content h2 { margin-top: 2.25rem; padding-left: .8rem; }
}

/* Unified homepage featured cards. */
.featured-section {
  width: min(100%, 1120px);
  margin: 0 auto 4.5rem;
  padding: 2rem 0 0;
}
.featured-section h2 {
  display: inline-block;
  margin: 0 auto 1.35rem;
  padding: 0 0 .55rem;
  border-bottom: 2px solid var(--accent);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}
.featured-grid {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  gap: 1.15rem;
}
.featured-grid .market-card {
  position: relative;
  min-height: 116px;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border-color: rgba(255,255,255,.13);
  background: linear-gradient(145deg, rgba(48,48,48,.97), rgba(31,31,31,.97));
  box-shadow: 0 14px 34px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.04);
}
.featured-grid .market-card::before {
  content: "";
  position: absolute;
  left: 18px; right: 18px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,.55), transparent);
}
.featured-grid .market-logo {
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  border-radius: 12px;
  border-color: rgba(255,255,255,.12);
}
.featured-grid .market-logo-placeholder { width: 68px; height: 68px; border-radius: 12px; }
.featured-grid .market-card-main { gap: .42rem; align-items: flex-start; }
.featured-grid .market-name { line-height: 1.2; }
.featured-grid .market-card-main .anchor-btn {
  margin-top: auto;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: .8rem;
}
.featured-grid .market-card:hover { transform: translateY(-4px); }
.featured-more { margin-top: 1.4rem; }
@media (max-width: 680px) {
  .featured-section { margin-bottom: 3rem; }
  .featured-grid .market-card { min-height: 104px; }
}

/* Persistent navigation on every page. */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 1000;
  isolation: isolate;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(35,35,35,.86);
}
@media (max-width: 680px) {
  .site-header { top: 8px; }
}

/* The sticky header sits flush with the viewport edge while scrolling. */
.site-header {
  top: 0;
  margin-top: 0;
}
@media (max-width: 680px) {
  .site-header { top: 0; }
}

/* Compact mobile navigation: one calm, scrollable row instead of a tall wrapped block. */
@media (max-width: 680px) {
  .site-header {
    align-items: stretch;
    gap: 12px;
    padding: 14px 14px 12px;
  }
  .site-header .brand { align-self: flex-start; }
  .site-header nav {
    display: flex;
    flex-wrap: nowrap;
    width: calc(100% + 4px);
    margin: 0 -2px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,255,136,.5) transparent;
    -webkit-overflow-scrolling: touch;
  }
  .site-header nav::-webkit-scrollbar { height: 3px; }
  .site-header nav::-webkit-scrollbar-track { background: transparent; }
  .site-header nav::-webkit-scrollbar-thumb { background: rgba(0,255,136,.5); border-radius: 99px; }
  .site-header nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 7px 10px;
    font-size: .82rem;
    line-height: 1.2;
  }
  .site-header .nav-cta {
    order: 3;
    align-self: flex-start;
    margin-top: 0;
    padding: 8px 13px;
    font-size: .8rem;
  }
}

@media (max-width: 680px) {
  .site-header .nav-cta { align-self: center; }
}
