/* ==========================================================================
   Forsidemodul «Spillerbørsen» (template-parts/spillerborsen.php)

   Samme ramme som «Norske i aksjon» (norske-utlandsproffer-frontpage.css):
   marineblå blokk, Geist/Inter, tynne linjer. Karakterene bruker børsens
   egen fargeskala: rød t.o.m. 5,5, blå t.o.m. 7, gull over 7. Tallet står
   alltid i boksen, så fargen er aldri eneste informasjon.
   No JavaScript.
   ========================================================================== */

.sb-fp-section {
  padding: 1.5rem 15px 0;
  background-color: var(--bg-body);
}

.sb-fp {
  --sb-ink: var(--color-white);
  --sb-2: #c9cfe3;
  --sb-3: #8e97b6;
  --sb-rule: rgba(205, 214, 255, 0.13);
  --sb-photo-bg: #0a1452;
  --sb-gold: #e7b000;
  --sb-gold-ink: #1a1400;
  /* Børsens blå (#09399e) er for nær bakgrunnen; samme tone, lysere. */
  --sb-blue: #1f4fc4;
  --sb-red: #bf1111;

  background: var(--blue-950);
  color: var(--sb-ink);
  padding: 30px 28px 6px;
  font-family: "Inter", sans-serif;
}
[data-theme="dark"] .sb-fp {
  background: linear-gradient(180deg, #060d3c 0%, var(--blue-950) 65%);
}

/* ── Header ─────────────────────────────────────────────────────── */
.sb-fp-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px 24px;
}
.sb-fp-titles { display: grid; gap: 6px; min-width: 0; }
.sb-fp-kicker {
  margin: 0;
  font-size: 0.74rem; font-weight: 600; line-height: 1.2;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sb-gold);
}
.sb-fp-title {
  margin: 0;
  font-family: "Geist", "Inter", sans-serif;
  font-size: 2.12rem; font-weight: 500; line-height: 1.1;
  letter-spacing: -0.025em; color: var(--sb-ink);
  text-wrap: balance;
}
.sb-fp-title a { color: inherit; text-decoration: none; }
.sb-fp-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sb-fp-title a:focus-visible { outline: 2px solid var(--yellow-400); outline-offset: 3px; }
.sb-fp-score {
  font-weight: 400; color: var(--sb-2);
  font-variant-numeric: tabular-nums;
  padding: 0 0.1em;
}
.sb-fp-dek {
  margin: 0 0 4px;
  font-size: 0.95rem; line-height: 1.45; color: var(--sb-2);
  text-wrap: pretty;
}
.sb-fp-dek b { font-weight: 600; color: var(--sb-ink); font-variant-numeric: tabular-nums; }

/* ── Karakterboks ───────────────────────────────────────────────── */
.sb-fp-badge {
  display: grid; place-items: center;
  min-width: 40px; height: 36px; padding: 0 6px;
  border-radius: 4px;
  font-family: "Geist", "Inter", sans-serif;
  font-size: 1.05rem; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff; white-space: nowrap;
}
.sb-fp-badge--lg { min-width: 54px; height: 50px; font-size: 1.45rem; }
.sb-fp-badge--high { background: var(--sb-gold); color: var(--sb-gold-ink); }
.sb-fp-badge--mid { background: var(--sb-blue); }
.sb-fp-badge--low { background: var(--sb-red); }
.sb-fp-badge--none { background: rgba(255, 255, 255, 0.12); color: var(--sb-2); }

/* ── Fersk børs: kampens beste til venstre, tre rader til høyre ── */
.sb-fp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 32px;
  margin-top: 22px;
}

.sb-fp-lead {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  column-gap: 16px; align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--sb-rule);
  color: var(--sb-ink); text-decoration: none;
}
.sb-fp-lead:hover .sb-fp-lead-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sb-fp-lead:focus-visible { outline: 2px solid var(--yellow-400); outline-offset: 2px; border-radius: 6px; }
.sb-fp-lead-img {
  width: 76px; height: 76px; aspect-ratio: 1 / 1;
  border-radius: 50%; object-fit: cover; display: block;
  background: var(--sb-photo-bg);
  box-shadow: 0 0 0 2px var(--sb-gold);
}
.sb-fp-lead-tx { display: grid; gap: 4px; min-width: 0; }
.sb-fp-motm {
  font-size: 0.72rem; font-weight: 600; line-height: 1.2;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--sb-gold);
}
.sb-fp-lead-name {
  font-family: "Geist", "Inter", sans-serif;
  font-size: 1.3rem; font-weight: 500; line-height: 1.2;
  letter-spacing: -0.015em; text-wrap: balance;
}
.sb-fp-quote {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 0.95rem; line-height: 1.4; color: var(--sb-2);
  text-wrap: pretty;
}

/* ── Rader ──────────────────────────────────────────────────────── */
/* Globale `ol li`-regler setter seriff og listemarger. */
.sb-fp-list {
  list-style: none;
  display: grid; grid-template-columns: minmax(0, 1fr);
  margin: 0; padding: 0;
}
.sb-fp-list--table {
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px;
  margin-top: 22px;
}
.sb-fp-item {
  margin: 0; padding: 0; min-width: 0;
  border-top: 1px solid var(--sb-rule);
  font-family: inherit; font-size: 1rem; line-height: 1.3;
}
.sb-fp-item::before, .sb-fp-item::marker { content: none; }

.sb-fp-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  column-gap: 14px; align-items: center;
  padding: 12px 0;
  color: var(--sb-ink); text-decoration: none;
}
.sb-fp-list--table .sb-fp-row {
  grid-template-columns: auto 44px minmax(0, 1fr) auto;
  padding: 18px 0;
}
.sb-fp-row:hover .sb-fp-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sb-fp-row:focus-visible { outline: 2px solid var(--yellow-400); outline-offset: 2px; border-radius: 6px; }

.sb-fp-rank {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic; font-size: 1.3rem; line-height: 1;
  color: var(--sb-3); min-width: 0.8em;
}
.sb-fp-img {
  width: 44px; height: 44px; aspect-ratio: 1 / 1;
  border-radius: 50%; object-fit: cover; display: block;
  background: var(--sb-photo-bg);
}
.sb-fp-tx { display: grid; gap: 3px; min-width: 0; }
.sb-fp-name {
  font-family: "Geist", "Inter", sans-serif;
  font-size: 1.02rem; font-weight: 500; line-height: 1.2;
  letter-spacing: -0.012em; text-wrap: balance;
}
.sb-fp-desc {
  font-size: 0.8rem; font-weight: 400; line-height: 1.4;
  color: var(--sb-3);
}
.sb-fp-low { font-weight: 600; color: #ff8a8a; }
.sb-fp-star { color: var(--sb-gold); }

/* Formruter: én per kamp, eldste til venstre. */
.sb-fp-form { display: flex; gap: 3px; margin-top: 3px; }
.sb-fp-form i {
  display: block; width: 12px; height: 12px; border-radius: 2px;
}
.sb-fp-form i.sb-fp-badge--high { background: var(--sb-gold); }
.sb-fp-form i.sb-fp-badge--mid { background: var(--sb-blue); }
.sb-fp-form i.sb-fp-badge--low { background: var(--sb-red); }

/* ── Lenkerader ─────────────────────────────────────────────────── */
.sb-fp-foot {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px;
}
.sb-fp-more {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  min-height: 54px;
  border-top: 1px solid var(--sb-rule);
  color: var(--sb-ink); text-decoration: none;
}
/* Én lenke alene tar hele bredden, så linjen over den ikke stopper midt i. */
.sb-fp-more:only-child { grid-column: 1 / -1; }
.sb-fp-more:focus-visible { outline: 2px solid var(--yellow-400); outline-offset: -2px; }
.sb-fp-more:hover .sb-fp-go { text-decoration: underline; }
.sb-fp-more-t { font-size: 0.92rem; line-height: 1.35; color: var(--sb-2); }
.sb-fp-more-t b { font-weight: 600; color: var(--sb-ink); font-variant-numeric: tabular-nums; }
.sb-fp-go {
  font-size: 0.86rem; font-weight: 600; line-height: 1.2;
  color: var(--yellow-400); white-space: nowrap;
}

/* ── Nettbrett: alt stablet, lenkeradene fortsatt side om side ─── */
@media (max-width: 899px) {
  .sb-fp-head { grid-template-columns: minmax(0, 1fr); }
  .sb-fp-body { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .sb-fp-list--table { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
  .sb-fp-list--table .sb-fp-row { padding: 13px 0; }
}

/* ── Mobil: helt ut i kanten, én kolonne ───────────────────────── */
@media (max-width: 599px) {
  .sb-fp-section { padding: 1rem 0 0; }
  .sb-fp { padding: 26px 20px 6px; }
  .sb-fp-title { font-size: 1.62rem; }
  .sb-fp-dek { margin: 0; }
  .sb-fp-lead { grid-template-columns: 60px minmax(0, 1fr) auto; column-gap: 14px; }
  .sb-fp-lead-img { width: 60px; height: 60px; }
  .sb-fp-lead-name { font-size: 1.15rem; }
  .sb-fp-badge--lg { min-width: 48px; height: 44px; font-size: 1.3rem; }
  .sb-fp-foot { grid-template-columns: minmax(0, 1fr); }
}
