/* ==========================================================
   Elisio — markets.css  (markets.html only)
   Tier overview cards on one shared CPA scale, the three tier
   tables (two side-by-side halves from 680px up, one column on
   phones), and the on-request / restricted notes.
   ========================================================== */

/* ========== THE THREE TIERS AT A GLANCE ========== */
.glance {
  padding-top: 0;                                   /* the page hero already supplies the gap */
  padding-bottom: clamp(56px, 7vw, 96px);
}
.glance__label { display: block; margin-bottom: clamp(20px, 2.6vw, 32px); }

.tier-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(22px, 2.6vw, 32px);
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.tier-card:hover { border-color: var(--lilac); background: var(--glass-2); }
.tier-card:has(.tier-card__link:focus-visible) { border-color: var(--lilac); background: var(--glass-2); }

/* the link sits on the tier name (short accessible name);
   its ::after stretches it over the whole card */
.tier-card__link::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: -1px;
  border-radius: var(--r-card);
}
.tier-card__link:focus-visible { outline: none; }
.tier-card__link:focus-visible::after { outline: 2px solid var(--lilac); outline-offset: 3px; }

.tier-card__link,
.tier__name {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.tier-card__name { padding-right: 56px; }          /* clear of the arrow */
.tier-card__word,
.tier__word {
  font-family: var(--f-text);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.005em;
  color: var(--lilac);
}
.tier-card__num,
.tier__num {
  display: inline-block;
  padding-bottom: 0.04em;
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  font-variant-numeric: lining-nums;
  color: var(--text);
}
.tier-card__num { font-size: 2.75rem; }
/* the rank numerals pick up a little of the orb's light */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .tier-card__num,
  .tier__num {
    background-image: linear-gradient(165deg, #F1EEFF 30%, #C9B8FF 70%, #9A82F6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

.tier-card__desc {
  margin-top: var(--s-3);
  font-size: var(--fs-small);
  color: var(--text-2);
  max-width: 46ch;
}
.tier-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-7);
  margin-top: auto;
  padding-top: var(--s-5);
}
.tier-card__facts div,
.tier__facts div { display: grid; gap: 2px; }
.tier-card__facts dt,
.tier__facts dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-3);
}
.tier-card__facts dd,
.tier__facts dd {
  font-weight: 700;
  font-size: clamp(1.375rem, 1.9vw, 1.75rem);
  line-height: 1.15;
}
.tier-card__facts dd.figure,
.tier__facts dd.figure { color: var(--text); }

/* CPA span on the shared $13–$54 scale */
.tier-card__range {
  position: relative;
  display: block;
  height: 6px;
  margin-top: var(--s-4);
  border-radius: var(--r-pill);
  background: rgba(185, 166, 255, 0.14);
}
.tier-card__range::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--from, 0%);
  right: calc(100% - var(--to, 100%));
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 181, 71, 0.6), var(--amber));
}

.tier-card__go {
  position: absolute;
  top: clamp(18px, 2.4vw, 28px);
  right: clamp(18px, 2.4vw, 28px);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--lilac);
  transition: transform var(--dur) var(--ease), background var(--dur-fast) var(--ease);
}
.tier-card__go svg { width: 15px; height: 15px; }
.tier-card:hover .tier-card__go { transform: translateY(3px); background: var(--lilac-wash); }

.glance__scale {
  margin-top: var(--s-4);
  font-size: var(--fs-xs);
  color: var(--text-3);
}

/* tablet: one card per row, facts beside the description */
@media (min-width: 640px) and (max-width: 899px) {
  .tier-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name  name"
      "desc  facts"
      "range range";
    align-items: end;
    column-gap: var(--s-7);
  }
  .tier-card__name { grid-area: name; }
  .tier-card__desc { grid-area: desc; align-self: start; }
  .tier-card__facts { grid-area: facts; margin-top: 0; padding-top: 0; }
  .tier-card__range { grid-area: range; margin-top: var(--s-5); }
}

@media (min-width: 900px) {
  .tier-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tier-card__link { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tier-card__num { font-size: clamp(3.5rem, 5.2vw, 4.75rem); }
  .tier-card__desc { margin-top: var(--s-5); }
  .tier-card__facts { gap: var(--s-2) var(--s-6); }
}

/* ========== THE TIERS, COUNTRY BY COUNTRY ========== */
.tier {
  display: grid;
  gap: var(--s-5) clamp(40px, 5vw, 80px);
  padding-block: clamp(36px, 4.5vw, 56px);
  border-top: 1px solid var(--line-2);
}
.tier__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4) var(--s-6);
}
.tier__num { font-size: clamp(3rem, 9vw, 4rem); }
.tier__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-6);
}
.tier__facts dd { font-size: 1.375rem; }

@media (min-width: 1000px) {
  .tier { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .tier__head {
    display: block;
    align-self: start;
    position: sticky;                              /* stays beside its own rows */
    top: calc(var(--header-h) + var(--s-6));
  }
  .tier__name { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tier__num { font-size: clamp(5rem, 7.4vw, 6.5rem); }
  .tier__facts {
    flex-direction: column;
    gap: var(--s-4);
    margin-top: var(--s-6);
    padding-top: var(--s-5);
    border-top: 1px solid var(--line);
  }
  .tier__facts dd { font-size: 1.625rem; }
}

/* two halves side by side; on phones they read as one list */
.tier__tables {
  display: grid;
  align-items: start;
  gap: 0 clamp(28px, 3.6vw, 56px);
}
@media (min-width: 680px) {
  .tier__tables { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.geo-table { width: 100%; }
.geo-table thead th {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: left;
  color: var(--text-3);
}
.geo-table tbody th,
.geo-table tbody td {
  height: 52px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.geo-table .c-country {
  text-align: left;
  font-weight: 600;
  color: var(--text);
}
.geo-table .flag {
  display: inline-block;
  width: 1.9em;
  font-size: 1.125rem;
  line-height: 1;
  vertical-align: -0.1em;
}
/* no colour flag glyphs (Windows): the fallback letters only repeat
   the ISO column, so drop them (class set by the probe in <head>) */
.no-flag-emoji .geo-table .flag { display: none; }
.geo-table .c-iso {
  width: 4.25rem;
  padding-inline: 12px;
}
.geo-table td.c-iso {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-3);
}
.geo-table .c-cpa {
  width: 4rem;
  text-align: right;
}
.geo-table td.c-cpa {
  font-weight: 700;
  font-size: 1.1875rem;
}

@media (max-width: 679px) {
  /* the second half continues the first: keep its header row for
     assistive tech, but collapse it visually */
  .geo-table + .geo-table thead th {
    height: 1px;
    padding: 0;
    border: 0;
    font-size: 1px;
    line-height: 1px;
    color: transparent;
    overflow: hidden;
    white-space: nowrap;
  }
  .geo-table tbody th,
  .geo-table tbody td { height: 50px; }
}

/* ========== BEYOND THE TABLES ========== */
.geo-notes {
  display: grid;
  gap: var(--s-5) clamp(40px, 5vw, 80px);
  padding-top: clamp(36px, 4.5vw, 56px);
  border-top: 1px solid var(--line-2);
}
.geo-notes__list {
  display: grid;
  gap: var(--s-6) var(--s-7);
}
.geo-note {
  display: grid;
  align-content: start;
  gap: 10px;
}
.geo-note dt {
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--text);
}
.geo-note dd {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--text-2);
}
.geo-note__fig {
  flex-shrink: 0;
  font-weight: 700;
  font-size: clamp(2.25rem, 3.4vw, 2.75rem);
  line-height: 1;
  color: var(--text);
}
.geo-note__text { max-width: 44ch; }
.geo-note .link { padding-block: 11px; }            /* 44px hit area, line box unchanged */

@media (min-width: 760px) {
  .geo-notes__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .geo-notes { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .geo-notes__label { padding-top: 2px; }
}

/* ========== SMALL PHONES ========== */
/* at the 40px clamp floor both headings strand a word on a middle line */
@media (max-width: 374px) {
  .page-hero .t-h1,
  .cta-band .t-h1 { font-size: 2.125rem; }
}
