  @import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
  :root{
    --pill-bg: #e5e7eb;        /* gray-200 */
    --pill-active: #e5004b;    /* magenta */
    --pill-text: #6b7280;      /* gray-500 */
    --pill-text-active: #ffffff;
    --radius: 999px;
    --shadow: 0 1px 2px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.06);
    --transition-fast: 220ms;
    --transition-slow: 340ms;
    --content-max: 62rem;
  }

  .fafa-container{
    max-width: var(--content-max);
    margin-inline: auto;
  }

  /* Center the label + tabs row */
  .tablist-wrap{
    display: flex;
    align-items: center;
    justify-content: center;   /* centers horizontally */
    gap: .75rem;
    flex-wrap: wrap;
    text-align: center;
    margin-bottom: 24px;
    margin-top: 24px;
  }

  .label{
    font-size: 0.95rem;
    letter-spacing: .02em;
    color: #111827;
    margin-bottom: .5rem;
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
  }

  /* TABLIST (pill) */
  .tablist{
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    background: var(--pill-bg);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
    user-select: none;
    touch-action: manipulation;
    isolation: isolate;
  }

  /* The sliding highlight */
  .pill{
    position: absolute;
    inset: 4px auto 4px 4px;
    height: calc(100% - 8px);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #e5004b 0%, var(--pill-active) 100%);
    /* box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 8px 16px rgba(228,0,87,0.25); */
    transition:
      transform var(--transition-slow) cubic-bezier(.22,.61,.36,1),
      width var(--transition-slow) cubic-bezier(.22,.61,.36,1);
    z-index: 0;
    transform: translateX(0);
  }

  /* Tabs */
  .tab{
    position: relative;
    z-index: 1;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--pill-text);
    padding: .6rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: .9rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--transition-fast) ease;
    white-space: nowrap;
    font-family: "Lato", sans-serif;
    font-weight: 900;
    font-style: normal;
    font-size: 16px;
  }
  .tab[aria-selected="true"]{ color: var(--pill-text-active); }
  .tab:focus-visible{
    outline: 3px solid #7c3aed; /* violet-600 */
    outline-offset: 2px;
    border-radius: calc(var(--radius) - 1px);
  }

  /* Panels */
  .panels{ margin-top: 1rem; }
  .panel{
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition:
      opacity var(--transition-slow) ease,
      transform var(--transition-slow) ease;
    background: #fff;
  }
  .panel[aria-hidden="false"]{
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  /* Grid + cards */

    .card {
    text-align: center;          /* center text */
    display: flex;
    flex-direction: column;
    align-items: center;         /* center image + content horizontally */
    justify-content: flex-start;
    }
    .card img {
    margin-inline: auto;         /* ensure image is centered */
    display: block;
    }

  .card-grid{
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
  }
  .card{
    grid-column: span 12;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    background: #fff;
  }
  .card h4{ margin: 0 0 .35rem 0; font-size: 16px; font-family: "Lato", sans-serif; font-weight: 800; font-style: normal; }
  .card p{ margin: 0; color: #4b5563; font-size: 16px; font-family: "Lato", sans-serif; font-weight: 400; font-style: normal; }

  .market-thumb{
    width: 100px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: block;
  }

  /* Responsive */
  @media (min-width: 520px){
    .card{ grid-column: span 4; }
  }
  @media (min-width: 860px){
    .card{ grid-column: span 4; }
  }

  /* Reduced motion */
  @media (prefers-reduced-motion: reduce){
    .pill, .panel{ transition: none !important; }
  }