/* ============================================================
   ESTUDI MESSI–CR7 · Sistema de disseny (esquelet)
   ============================================================ */

:root {
  /* Colors de marca */
  --messi: #0E97B7;          /* blau/turquesa — Messi (sempre a l'esquerra) */
  --messi-soft: #E1F3F7;
  --cristiano: #CE2B37;      /* vermell/granat — Cristiano */
  --cristiano-soft: #FBE6E8;
  --neutral: #8B95A1;        /* gris — sense preferència */
  --neutral-soft: #EEF1F4;

  /* Base */
  --dark: #252552;           /* fons fosc (barra superior, footer, clip àudio) */
  --bg: #FBFAF7;
  --surface: #FFFFFF;
  --ink: #1A1C1F;
  --ink-soft: #50575E;
  --line: #E4E2DC;

  /* Tipografia */
  --font-head: 'Archivo', system-ui, sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;

  /* Mida i ritme */
  --maxw: 720px;
  --maxw-wide: 1080px;
  --space: clamp(2.5rem, 6vw, 5rem);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.18rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--messi); }

/* ===================== BARRA SUPERIOR ===================== */
.topbar {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar__inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.social { display: flex; gap: 0.85rem; align-items: center; }
.social a { display: inline-flex; opacity: 0.75; transition: opacity 0.2s, transform 0.2s; }
.social a:hover { opacity: 1; transform: translateY(-2px); }

/* ===================== CAPÇALERA (HERO) ===================== */
.hero {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 1.25rem 1.75rem;
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; }
.hero__kicker {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--cristiano);
  margin: 0 0 0.75rem;
}
.hero__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}
.hero__subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  line-height: 1.35;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.hero__byline {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.5rem;
}
.byline__author { font-weight: 700; color: var(--ink); }
.byline__sep { opacity: 0.4; }

/* Reproductor d'àudio */
.audio { margin: 1.75rem 0 0.25rem; }
.audio__label { font-family: var(--font-head); font-weight: 600; margin: 0 0 0.6rem; font-size: 1rem; }
.audio__player {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  color: #fff;
  background-color: var(--dark);
  background-image: url('../assets/ser.png');
  background-size: auto 100%;
  background-position: right 16px center;
  background-repeat: no-repeat;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.audio__player:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,0.18); }
.audio__play {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.95);
  color: var(--ink);
  border-radius: 50%;
  font-size: 1.1rem;
  padding-left: 3px;
}
.audio__meta { display: flex; flex-direction: column; }
.audio__title { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; }
.audio__time { font-size: 0.85rem; opacity: 0.85; }

/* Fitxa de l'estudi */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: var(--space) 0 0;
}
.studycard {
  margin-top: var(--space);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}
.studycard__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}
.studycard__list { margin: 0; display: grid; gap: 0.75rem; }
.studycard__list div { display: grid; grid-template-columns: 90px 1fr; gap: 0.75rem; }
.studycard__list dt { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.studycard__list dd { margin: 0; font-size: 0.98rem; }
.studycard__download {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-head);
  font-weight: 700;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  background: var(--messi);
  color: #fff;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.studycard__download:hover { background: #0b7e99; }

/* ===================== COS ===================== */
.body { max-width: var(--maxw); margin: 0 auto; padding: 2.25rem 1.25rem var(--space); }
.section { margin-bottom: var(--space); scroll-margin-top: 70px; }
.section__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.55rem, 3.5vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 1.25rem;
  padding-top: 0.5rem;
  border-top: 3px solid var(--ink);
  display: inline-block;
}
.prose p { margin: 0 0 1.3rem; }
.lede {
  font-size: 1.3rem;
  line-height: 1.5;
  font-weight: 600;
}
.placeholder-text {
  color: var(--ink-soft);
  font-style: italic;
  background: var(--neutral-soft);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}

/* ===================== PLACEHOLDERS DE BLOCS ===================== */
.block-placeholder {
  margin: 2rem 0;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 2rem 1.5rem;
  text-align: center;
}
.block-placeholder__tag {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 0.9rem;
}
.block-placeholder--interactive .block-placeholder__tag { background: var(--cristiano); }
.block-placeholder--chart .block-placeholder__tag { background: var(--messi); }
.block-placeholder--visual .block-placeholder__tag { background: var(--neutral); }
.block-placeholder__name { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; margin: 0 0 0.5rem; color: var(--ink); }
.block-placeholder__desc { margin: 0 auto; max-width: 48ch; font-size: 0.98rem; color: var(--ink-soft); font-style: italic; }

/* ===================== PEU ===================== */
.footer {
  background: var(--dark);
  color: #fff;
  padding: var(--space) 1.25rem;
}
.footer__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.footer__brand { font-family: var(--font-head); font-size: 1.1rem; margin: 0 0 0.75rem; color: #fff; }
.footer__contact { color: rgba(255,255,255,0.8); font-size: 1rem; margin: 0 auto 1.5rem; max-width: 52ch; }
.footer__contact a { color: #fff; }
.social--footer { justify-content: center; }

/* ===================== JOC DE BANDERES ===================== */
.fg { margin: 2rem 0; }
.fg__hint {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
  text-align: center;
}
.fg__pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  min-height: 88px;
  padding: 1rem;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 1.5rem;
  transition: border-color 0.15s, background 0.15s;
}

/* Boles de bandera */
.fg__ball {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.fg__flag {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  border: 2px solid #fff;
  outline: 1px solid var(--line);
  transition: transform 0.12s;
}
.fg__name {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
  color: var(--ink);
}
.fg__ball:active .fg__flag { transform: scale(1.05); }
.fg__ball--lifted { opacity: 0.35; }
.fg__ball--ghost {
  position: fixed;
  z-index: 999;
  pointer-events: none;
  margin: 0;
  cursor: grabbing;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.3));
}

/* Calaixos */
.fg__drawers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.fg__drawer {
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.75rem;
  min-height: 150px;
  transition: background 0.15s, border-color 0.15s;
}
.fg__drawer--messi { border-color: var(--messi); }
.fg__drawer--cap { border-color: var(--neutral); }
.fg__drawer--cr7 { border-color: var(--cristiano); }
.fg__drop-active { background: var(--neutral-soft); border-color: var(--ink); }

.fg__drawer-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 0.75rem;
  text-align: center;
}
.fg__drawer-name { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; line-height: 1.1; }
.fg__count {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--neutral-soft);
  padding: 1px 8px;
  border-radius: 999px;
}
.fg__count--full { color: #fff; background: var(--ink); }
.fg__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

/* Controls i resultat */
.fg__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem 0 0;
}
.fg__btn {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.fg__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.fg__btn--check { background: var(--ink); color: #fff; }
.fg__btn--reset { background: transparent; color: var(--ink); }
.fg__btn--reset:hover:enabled { background: var(--neutral-soft); }
.fg__btn--reveal { background: transparent; color: var(--ink); border-style: dashed; }
.fg__btn--reveal:hover:enabled { background: var(--neutral-soft); }

.fg__result {
  margin-top: 1.25rem;
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.05rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
}
.fg__result--show { opacity: 1; transform: none; }
.fg__score { font-weight: 900; font-size: 1.4rem; display: block; }

/* Estats de revisió */
.fg__ball--ok .fg__flag { border-color: #fff; outline: none; box-shadow: 0 0 0 5px #15a657; }
.fg__ball--ko .fg__flag { border-color: #fff; outline: none; box-shadow: 0 0 0 5px var(--cristiano); }

/* En pantalles amples, la safata i els calaixos sobresurten dels marges del text */
@media (min-width: 1100px) {
  .fg__pool,
  .fg__drawers {
    width: 150%;
    margin-left: -25%;
    margin-right: -25%;
  }
}

/* ===================== FOTO PRINCIPAL ===================== */
.leadfig { margin: 0 0 2.25rem; }
.leadfig img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  background: var(--neutral-soft);
}
.leadfig figcaption { margin-top: 0.6rem; }
.leadfig__caption {
  display: block;
  font-family: var(--font-head);
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--ink);
}
.leadfig__credit {
  display: block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 3px;
}
.leadfig__credit a { color: var(--ink-soft); text-decoration: underline; }
@media (min-width: 1100px) {
  .leadfig { width: 150%; margin-left: -25%; margin-right: -25%; }
}

/* ===================== CAIXES DE VALORS ===================== */
.values {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  margin: 2rem 0 2.5rem;
}
.values__col {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.values__col--messi { border-color: var(--messi); }
.values__col--cr7 { border-color: var(--cristiano); }
.values__photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  background-size: cover;
  background-position: center top;
  border: 3px solid #fff;
  margin-bottom: 0.9rem;
}
.values__col--messi .values__photo { box-shadow: 0 0 0 3px var(--messi); }
.values__col--cr7 .values__photo { box-shadow: 0 0 0 3px var(--cristiano); }
.values__name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}
.values__cluster {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 1rem;
  min-height: 2.6em;
  display: flex;
  align-items: center;
}
.values__col--messi .values__cluster { color: var(--messi); }
.values__col--cr7 .values__cluster { color: var(--cristiano); }
.values__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
}
.values__list li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
  line-height: 1.3;
}
.values__list li:last-child { border-bottom: 1px solid var(--line); }
.values__align {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: auto 0 0;
}
.values__align strong { color: var(--ink); }
.values__col--messi .values__align strong { color: var(--messi); }
.values__col--cr7 .values__align strong { color: var(--cristiano); }
.values__vs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  padding: 0 0.9rem;
}
.values__credit {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 0 0 0.5rem;
}

/* ===================== CRÈDITS FOTOGRÀFICS ===================== */
.photo-credits {
  max-width: var(--maxw);
  margin: 2rem auto 2rem;
  padding: 0 1.25rem;
}
.photo-credits__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}
.photo-credits__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.photo-credits__list li {
  font-family: var(--font-head);
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.photo-credits__list li strong {
  font-weight: 600;
  color: var(--ink);
}
.photo-credits__list a { color: var(--ink-soft); }
.photo-credits__list a:hover { color: var(--messi); }

/* ===================== NOTA EDITORIAL ===================== */
.nota-editorial {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
  border-left: 3px solid var(--line);
  padding-left: 1rem;
  margin: 1.5rem 0 0;
}
.nota-editorial strong { color: var(--ink); }

/* ===================== GRÀFICS (compartit) ===================== */
.chart { margin: 2rem 0; }
.bc__note {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
  margin: 1rem 0 0;
}

/* Tooltip */
.chart-tip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.85rem;
  line-height: 1.35;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.12s;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-tip--show { opacity: 1; }
.chart-tip strong { font-size: 0.95rem; margin-bottom: 2px; }
.chart-tip__row { display: flex; align-items: center; gap: 6px; }
.chart-tip__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.chart-tip__dot--messi { background: var(--messi); }
.chart-tip__dot--cr7 { background: var(--cristiano); }
.chart-tip__diff { margin-top: 3px; opacity: 0.85; font-size: 0.8rem; }

/* ----- 1) Barres RPP ----- */
.bc__legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}
.bc__legend-item:first-child { color: var(--messi); }
.bc__legend-item:last-child { color: var(--cristiano); text-align: right; }
.bc__legend-arrow { font-size: 1em; vertical-align: middle; }

.bc__chart { position: relative; }
.bc__photos {
  position: absolute;
  top: 0; bottom: 0;
  left: 140px;   /* inici de la zona de barres (label 132px + gap) */
  right: 60px;   /* fi de la zona de barres (valor 52px + gap) */
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bc__photo {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 30%;
  width: auto;
  opacity: 0.55;
}
.bc__photo--messi { left: 0; }
.bc__photo--cr7 { right: 0; }

.bc__row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 132px 1fr 52px;
  align-items: center;
  gap: 0.5rem;
  height: 30px;
  border-radius: 6px;
  cursor: default;
}
.bc__row:hover, .bc__row:focus-visible { background: var(--neutral-soft); outline: none; }
.bc__label { display: flex; align-items: center; gap: 7px; min-width: 0; }
.bc__flag {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 1px var(--line);
}
.bc__name {
  font-family: var(--font-head);
  font-size: 0.87rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bc__lgnd-short { display: none; }
.bc__track { position: relative; height: 100%; }
.bc__zero {
  position: absolute; top: 2px; bottom: 2px;
  width: 1px;
  background: var(--ink);
  opacity: 0.5;
  transform: translateX(-0.5px);
}
.bc__bar {
  position: absolute;
  top: 50%;
  height: 13px;
  transform: translateY(-50%);
  border-radius: 3px;
}
.bc__bar--messi { background: var(--messi); }
.bc__bar--cr7 { background: var(--cristiano); }
.bc__bar--cap { background: var(--neutral); }
.bc__err {
  position: absolute;
  top: 50%;
  height: 7px;
  transform: translateY(-50%);
  border-left: 1.5px solid rgba(0,0,0,0.55);
  border-right: 1.5px solid rgba(0,0,0,0.55);
}
.bc__err::before {
  content: '';
  position: absolute; top: 50%; left: 0; right: 0;
  height: 1.5px;
  background: rgba(0,0,0,0.55);
  transform: translateY(-50%);
}
.bc__val {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bc__val--messi { color: var(--messi); }
.bc__val--cr7 { color: var(--cristiano); }
.bc__val--cap { color: var(--ink-soft); }

/* ----- 2) Dispersió ----- */
.sc__wrap { display: flex; gap: 0.5rem; }
.sc__yaxis {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--cristiano);
  text-align: center;
  flex: 0 0 auto;
}
.sc__plot {
  position: relative;
  flex: 1 1 auto;
  aspect-ratio: 1 / 1;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: linear-gradient(to top left,
    var(--messi-soft) 0 49.4%,
    var(--line) 49.4% 50.6%,
    var(--cristiano-soft) 50.6% 100%);
  overflow: visible;
}
.sc__grid { position: absolute; background: rgba(0,0,0,0.07); }
.sc__grid--v { top: 0; bottom: 0; width: 1px; }
.sc__grid--h { left: 0; right: 0; height: 1px; }
.sc__tick {
  position: absolute;
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--ink-soft);
}
.sc__tick--x { bottom: -20px; transform: translateX(-50%); }
.sc__tick--y { left: -16px; transform: translateY(-50%); }
.sc__equal {
  position: absolute;
  left: 8px; top: 8px;
  font-family: var(--font-head);
  font-size: 0.68rem;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.7);
  padding: 1px 6px;
  border-radius: 6px;
  transform: rotate(-45deg);
  transform-origin: left top;
}
.sc__zone {
  position: absolute;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.3;
  max-width: 44%;
  pointer-events: none;
}
.sc__zone--cr7 { top: 2.5%; left: 2.5%; color: var(--cristiano); text-align: left; }
.sc__zone--messi { bottom: 2.5%; right: 2.5%; color: var(--messi); text-align: right; }
.sc__pt {
  position: absolute;
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}
.sc__pt:hover, .sc__pt:focus-visible {
  transform: scale(1.35);
  z-index: 5;
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  outline: none;
}
.sc__pt--messi { outline: 2px solid var(--messi); }
.sc__pt--cr7 { outline: 2px solid var(--cristiano); }
.sc__pt--cap { outline: 2px solid var(--neutral); }
.sc__xaxis {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--messi);
  text-align: center;
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}

/* ---- Gràfic de característiques (Figura 5) ---- */
.caract__panel-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
  margin: 0 0 0.5rem;
}
.bc__chart + .caract__panel-title,
.bc__chart--caract + .caract__panel-title,
.bc__chart--caract3 + .caract__panel-title {
  margin-top: 1.5rem;
}

.bc__chart--caract .bc__photos {
  left: 190px;
  right: 68px;
}
.bc__chart--caract .bc__photo { height: 55%; }
.bc__chart--caract .bc__row,
.bc__chart--caract3 .bc__row {
  grid-template-columns: 180px 1fr 58px;
  height: 30px;
}
.bc__chart--caract .bc__track,
.bc__chart--caract3 .bc__track { height: 28px; }
.bc__chart--caract .bc__name,
.bc__chart--caract3 .bc__name {
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Blocs de causes ---- */
.causes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 2rem 0 2.5rem;
}
.causes__card {
  border-radius: 10px;
  background: var(--surface);
  padding: 1rem 1.1rem;
}
.causes__card--messi { border: 2px solid var(--messi); }
.causes__card--cr7 { border: 2px solid var(--cristiano); }
.causes__trait {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.causes__player {
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
}
.causes__player--messi { color: var(--messi); }
.causes__player--cr7 { color: var(--cristiano); }
.causes__explain {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 640px) {
  body { font-size: 1.08rem; }
  .studycard__list div { grid-template-columns: 1fr; gap: 0.15rem; }
  .studycard__list dd { margin-bottom: 0.4rem; }
  .bc__row { grid-template-columns: 104px 1fr 46px; }
  .bc__photos { display: none; }
  .bc__name { font-size: 0.79rem; }
  .bc__lgnd-full { display: none; }
  .bc__lgnd-short { display: inline; }
  .values { grid-template-columns: 1fr; gap: 0.5rem; }
  .values__vs { padding: 0.35rem 0; }
  .values__cluster { min-height: 0; }
  .bc__flag { width: 18px; height: 18px; }
  .sc__pt { width: 20px; height: 20px; margin: -10px 0 0 -10px; }
  .fg__ball { width: 60px; }
  .fg__flag { width: 44px; height: 44px; }
  .fg__name { font-size: 0.66rem; }
  .fg__drawers { gap: 0.4rem; }
  .fg__drawer { padding: 0.5rem 0.35rem; }
  .bc__chart--caract .bc__row,
  .bc__chart--caract3 .bc__row {
    grid-template-columns: 108px 1fr 46px;
    height: auto;
    min-height: 30px;
    padding: 3px 0;
  }
  .bc__chart--caract .bc__name,
  .bc__chart--caract3 .bc__name {
    font-size: 0.75rem;
    white-space: normal;
    line-height: 1.2;
  }
  .bc__chart--caract .bc__track,
  .bc__chart--caract3 .bc__track { height: 24px; }
  .causes { grid-template-columns: 1fr; }
}
