:root {
  --ftd-bg: #f7f8f4;
  --ftd-surface: #ffffff;
  --ftd-surface-alt: #0e0e0e;
  --ftd-border: rgba(15, 15, 15, 0.1);
  --ftd-border-strong: rgba(48, 255, 96, 0.18);
  --ftd-text: #111111;
  --ftd-text-soft: rgba(17, 17, 17, 0.72);
  --ftd-green: #8fff66;
  --ftd-green-deep: #30ff60;
  --ftd-green-glow: rgba(143, 255, 102, 0.22);
  --ftd-black: #0b0b0b;
  --ftd-radius-xl: 32px;
  --ftd-radius-lg: 24px;
  --ftd-radius-md: 18px;
  --ftd-shadow-soft: 0 24px 70px rgba(15, 15, 15, 0.08);
  --ftd-shadow-card: 0 22px 48px rgba(10, 10, 10, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body.ftd-page {
  margin: 0;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ftd-text);
  background:
    radial-gradient(circle at 14% 22%, rgba(143, 255, 102, 0.18), transparent 24%),
    linear-gradient(180deg, #fbfcf7 0%, #f4f7ef 100%);
}

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

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

.ftd-shell {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.ftd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ftd-header__inner {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.ftd-brand img {
  width: 142px;
  object-fit: contain;
}

.ftd-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.ftd-header__toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.ftd-header__panel {
  display: flex;
  align-items: center;
}

.ftd-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ftd-header__label {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-right: 8px;
}

.ftd-button {
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.ftd-button:hover {
  transform: translateY(-1px);
}

.ftd-button--ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
}

.ftd-button--ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.ftd-button--primary {
  color: #0c0c0c;
  background: linear-gradient(135deg, var(--ftd-green) 0%, #73f957 100%);
  box-shadow: 0 16px 30px rgba(143, 255, 102, 0.2);
}

.ftd-button--primary:hover {
  box-shadow: 0 18px 34px rgba(143, 255, 102, 0.28);
}

.ftd-main {
  padding-bottom: 72px;
}

.ftd-hero {
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(143,255,102,0.18), transparent 32%),
    linear-gradient(135deg, #090909 0%, #141414 100%);
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
  position: relative;
  overflow: hidden;
}

.ftd-hero::before,
.ftd-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ftd-hero::before {
  background:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 74px 74px;
  opacity: 0.35;
}

.ftd-hero::after {
  background: radial-gradient(circle at 8% 78%, rgba(143,255,102,0.2), transparent 20%);
}

.ftd-hero__inner {
  min-height: 152px;
  display: flex;
  align-items: flex-end;
  padding: 20px 0 24px;
  position: relative;
  z-index: 1;
}

.ftd-hero__inner::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -10px;
  width: min(38vw, 380px);
  height: min(26vw, 220px);
  background-image: var(--ftd-hero-art);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: contain;
  opacity: 0.11;
  pointer-events: none;
  filter: grayscale(1) contrast(1.04);
}

.ftd-hero--compact .ftd-hero__inner {
  min-height: 120px;
  padding: 16px 0 18px;
}

.ftd-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 6.2vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
  max-width: 11ch;
  position: relative;
  z-index: 1;
}

.ftd-page--country .ftd-hero h1,
.ftd-page--country-etf .ftd-hero h1 {
  max-width: 16ch;
}

.ftd-pills-wrap {
  padding: 28px 0 14px;
}

.ftd-pills-wrap .ftd-shell {
  display: flex;
  justify-content: center;
}

.ftd-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 auto;
  width: fit-content;
  max-width: 100%;
}

.ftd-pill {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ftd-text);
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 24px rgba(18, 18, 18, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ftd-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(48, 255, 96, 0.25);
}

.ftd-pill.is-active {
  background: var(--ftd-green);
  border-color: rgba(48, 255, 96, 0.4);
  color: #090909;
}

.ftd-card-section {
  padding: 10px 0 8px;
}

.ftd-card-section--secondary {
  padding-top: 24px;
}

.ftd-section-head {
  margin-bottom: 18px;
  text-align: center;
}

.ftd-section-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ftd-text-soft);
}

.ftd-card-grid {
  display: grid;
  gap: 24px;
  justify-content: center;
}

.ftd-card-grid--category {
  grid-template-columns: repeat(4, minmax(0, 248px));
  max-width: 1064px;
  margin: 0 auto;
}

.ftd-card-grid--flag {
  grid-template-columns: repeat(auto-fit, minmax(200px, 220px));
  max-width: 1088px;
  margin: 0 auto;
}

.ftd-card {
  position: relative;
  min-height: 220px;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 45%),
    linear-gradient(180deg, #161616 0%, #0f0f0f 100%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--ftd-shadow-card);
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.ftd-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(143,255,102,0.08), transparent 54%);
  opacity: 0.45;
  transition: opacity 0.24s ease;
}

.ftd-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
  background-image: var(--ftd-card-art);
  background-repeat: no-repeat;
  background-position: right top;
  background-size: contain;
  opacity: 0.08;
  filter: grayscale(1) brightness(1.1);
  pointer-events: none;
}

.ftd-card:hover {
  transform: translateY(-4px);
  border-color: rgba(143,255,102,0.22);
  box-shadow: 0 28px 58px rgba(12, 12, 12, 0.16);
}

.ftd-card:hover::before,
.ftd-card.is-active::before {
  opacity: 1;
}

.ftd-card--category.is-active {
  border-color: rgba(143, 255, 102, 0.3);
}

.ftd-card__icon,
.ftd-card__flag-wrap {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(143,255,102,0.08), rgba(143,255,102,0.02) 72%),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(143,255,102,0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ftd-green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 12px 28px rgba(0, 0, 0, 0.16);
  position: relative;
  z-index: 1;
}

.ftd-card__icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ftd-card__flag-wrap {
  width: 92px;
  height: 62px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.ftd-card__flag {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.ftd-card__eyebrow {
  display: inline-flex;
  margin-top: auto;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ftd-green);
  position: relative;
  z-index: 1;
  text-transform: uppercase;
}

.ftd-card__title {
  font-size: clamp(18px, 1.7vw, 22px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  position: relative;
  z-index: 1;
}

.ftd-card--flag {
  min-height: 172px;
  align-items: center;
  text-align: center;
}

.ftd-card--flag .ftd-card__title {
  font-size: 18px;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.ftd-backlink-wrap {
  padding-top: 18px;
}

.ftd-backlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ftd-text-soft);
}

.ftd-backlink span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--ftd-border);
}

.ftd-content-section {
  padding: 28px 0 8px;
}

.ftd-legacy {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 15, 15, 0.08);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--ftd-shadow-soft);
  overflow: hidden;
}

.ftd-legacy > .container {
  width: 100%;
  padding: 0;
}

.ftd-legacy img[style*="back-button"] {
  display: none;
}

.ftd-legacy .cs-cta,
.ftd-inline-cta,
.ftd-empty-state {
  background: linear-gradient(135deg, #121212 0%, #0e0e0e 100%);
  color: #fff;
  border-radius: 28px;
  padding: 36px;
  border: 1px solid rgba(143, 255, 102, 0.12);
  box-shadow: var(--ftd-shadow-card);
}

.ftd-inline-cta,
.ftd-empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ftd-inline-cta__eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ftd-green);
}

.ftd-inline-cta .ftd-button {
  flex: 0 0 auto;
  min-width: 148px;
}

.ftd-inline-cta .ftd-button span,
.ftd-inline-cta .ftd-button br {
  display: none;
}

.ftd-inline-cta h2,
.ftd-empty-state h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.ftd-empty-state p {
  margin: 14px 0 0;
  max-width: 58ch;
  color: rgba(255,255,255,0.72);
}

.ftd-legacy .cs-cta_title {
  margin: 0;
  color: #fff;
  font-family: inherit;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.ftd-legacy .cs-text_btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ftd-green);
  font-weight: 700;
}

.ftd-legacy .cs-text_btn svg {
  width: 20px;
}

.ftd-legacy [style*="overflow-x:auto"],
.ftd-legacy .ftd-table-scroll {
  width: 100%;
  overflow-x: auto !important;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 18px 36px rgba(11, 11, 11, 0.08);
}

.ftd-legacy table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #ffffff;
}

.ftd-legacy td,
.ftd-legacy th {
  font-family: "Poppins", system-ui, sans-serif !important;
  padding: 14px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  font-size: 13px;
  line-height: 1.45;
  color: #191919;
  text-align: left;
  white-space: nowrap;
}

.ftd-legacy th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(135deg, #7f40ff 0%, #5e2dff 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-color: rgba(95, 45, 255, 0.7);
}

.ftd-legacy tbody tr:nth-child(even) td {
  background: rgba(15, 15, 15, 0.025);
}

.ftd-legacy tbody tr:hover td {
  background: rgba(143, 255, 102, 0.08);
}

.ftd-legacy table + table {
  margin-top: 24px;
}

.ftd-legacy p {
  color: var(--ftd-text-soft);
}

.ftd-legacy > * + * {
  margin-top: 18px;
}

.ftd-footer {
  background: #0b0b0b;
  color: rgba(255, 255, 255, 0.88);
  margin-top: 56px;
  padding: 30px 0 34px;
}

.ftd-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ftd-footer__brand img {
  width: 128px;
  margin-bottom: 12px;
}

.ftd-footer__brand p,
.ftd-footer__meta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.65;
}

.ftd-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  justify-content: center;
}

.ftd-footer__links a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ftd-footer__meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
}

.ftd-footer__copy {
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 600;
}

.ftd-scrolltop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: var(--ftd-green);
  color: #0d0d0d;
  box-shadow: 0 18px 30px rgba(143, 255, 102, 0.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ftd-scrolltop svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@media (max-width: 991px) {
  .ftd-shell {
    width: min(100% - 32px, 1200px);
  }

  .ftd-header__inner {
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 14px 0 16px;
  }

  .ftd-brand {
    align-self: center;
  }

  .ftd-brand img {
    width: 118px;
  }

  .ftd-header__actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
  }

  .ftd-header__label {
    grid-column: 1 / -1;
    text-align: center;
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.18em;
  }

  .ftd-header__actions .ftd-button {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    font-size: 13px;
  }

  .ftd-hero__inner {
    min-height: 112px;
    padding: 14px 0 16px;
  }

  .ftd-hero h1 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .ftd-hero__inner::after {
    width: 180px;
    height: 120px;
    opacity: 0.09;
  }

  .ftd-card-grid--category,
  .ftd-card-grid--flag {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .ftd-card {
    min-height: 200px;
    padding: 20px;
  }

  .ftd-inline-cta,
  .ftd-empty-state {
    flex-direction: column;
    align-items: flex-start;
  }

  .ftd-legacy {
    padding: 20px;
    border-radius: 22px;
  }

  .ftd-legacy table {
    min-width: 860px;
  }

  .ftd-footer__inner {
    grid-template-columns: 1fr;
  }

  .ftd-footer__links,
  .ftd-footer__meta {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .ftd-shell {
    width: min(100% - 24px, 1200px);
  }

  .ftd-header__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 78px;
    padding: 12px 0;
  }

  .ftd-brand {
    align-self: auto;
    flex: 0 0 auto;
  }

  .ftd-brand img {
    width: 104px;
  }

  .ftd-header__toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .ftd-header__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 14px;
    border-radius: 22px;
    background: rgba(14, 14, 14, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  }

  .ftd-header.is-menu-open .ftd-header__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .ftd-header.is-menu-open .ftd-header__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .ftd-header.is-menu-open .ftd-header__toggle span:nth-child(2) {
    opacity: 0;
  }

  .ftd-header.is-menu-open .ftd-header__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .ftd-header__actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .ftd-pills {
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .ftd-pills::-webkit-scrollbar {
    display: none;
  }

  .ftd-pill {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
    scroll-snap-align: start;
  }

  .ftd-card-grid--category,
  .ftd-card-grid--flag {
    grid-template-columns: 1fr;
  }

  .ftd-header__label {
    display: none;
  }

  .ftd-header__actions .ftd-button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 16px;
    font-size: 13px;
    border-radius: 999px;
  }

  .ftd-button--primary {
    box-shadow: 0 10px 22px rgba(143, 255, 102, 0.16);
  }
}
