/* TogetherFX — partner pages: /roboforex and /rejoindre. */

.partner-page {
  max-width: 48rem;
}

.partner-page__header {
  margin-bottom: var(--space-5);
}

.partner-page h1 {
  font-size: var(--font-size-h1);
}

.partner-section {
  padding-block: var(--space-4);
  border-top: var(--hairline);
}

.partner-section h2 {
  font-size: 1.375rem;
}

.partner-section ul:not(.chips) {
  padding-left: var(--space-4);
}

.partner-section li + li {
  margin-top: var(--space-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.chips li {
  padding: var(--space-1) var(--space-3);
  border: var(--hairline);
  border-radius: 999px;
  font-size: var(--font-size-small);
}

.chips li + li {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-3);
}

.figures {
  width: 100%;
  border-collapse: collapse;
}

.figures--compact {
  max-width: 24rem;
}

.figures caption {
  text-align: left;
  color: var(--text-muted);
  font-size: var(--font-size-small);
  padding-bottom: var(--space-2);
}

.figures th,
.figures td {
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--hairline);
  text-align: left;
  font-weight: 400;
}

.figures thead th {
  color: var(--text-muted);
  font-size: var(--font-size-small);
  font-weight: 600;
}

.figures .num {
  text-align: right;
  white-space: nowrap;
}

.figures tbody td.num {
  font-weight: 600;
}

.note,
.source {
  color: var(--text-muted);
  font-size: var(--font-size-small);
}

.source__label {
  font-weight: 600;
}

.quote {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.quote p:last-child {
  margin-bottom: 0;
}

.links-list {
  margin: 0 0 var(--space-4);
}

.links-list dt {
  color: var(--text-muted);
  font-size: var(--font-size-small);
}

.links-list dd {
  margin: 0 0 var(--space-3);
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block: var(--space-4);
}

/* ---------- /rejoindre ---------- */

.paths {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 1024px) {
  .partner-page:has(.paths) {
    max-width: none;
  }

  .paths {
    grid-template-columns: 1fr 1fr;
  }
}

.path h2 {
  font-size: 1.375rem;
}

.path .note {
  overflow-wrap: anywhere;
}

/* The one sentence on copying: indented, quiet, at the bottom. */
.aside-note {
  margin: var(--space-5) 0 0 var(--space-4);
  max-width: 40rem;
  color: var(--text-muted);
  font-size: var(--font-size-small);
}

/* ---------- Infinity levels (TFX-29) ---------- */

.levels {
  margin: var(--space-4) 0 var(--space-3);
}

.levels__title {
  color: var(--text-muted);
  font-size: var(--font-size-small);
  padding-bottom: var(--space-2);
}

.partner-section .levels__chain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.levels__node {
  position: relative;
  max-width: 30rem;
  padding: var(--space-3) var(--space-4);
  border: var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Each level hangs below the previous one, indented, joined by an accent connector. */
.partner-section .levels__node + .levels__node {
  margin-top: var(--space-4);
  margin-left: var(--space-5);
}

/* Level 2 hangs from level 1, not from Tony. */
.partner-section .levels__node:nth-child(3) {
  margin-left: calc(2 * var(--space-5));
}

.levels__node + .levels__node::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--space-4) - 1px);
  left: calc(-1 * var(--space-4));
  width: var(--space-4);
  height: calc(var(--space-4) + 1.5rem);
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-bottom-left-radius: var(--radius);
}

.levels__node--root {
  border-color: var(--accent);
}

.levels__name {
  display: block;
  font-weight: 600;
}

.levels__detail {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--font-size-small);
}

/* ---------- How affiliation works (TFX-29) ---------- */

.affiliation-box {
  margin-block: var(--space-4);
  border-left: 3px solid var(--accent);
}

.affiliation-box p:last-child {
  margin-bottom: 0;
}
