/* ForecastsPro landing — the affiliate program's page (/affiliates, ARCHITECTURE §15).
 *
 * Loaded after site.css on /affiliates only (site.css keeps its size budget): the facts
 * under the hero, the three-step grid and the application form
 * (assets/js/affiliate-apply.js). Tokens only, no inline styles (the CSP).
 */

/* The program at a glance, under the hero: four facts on one row, two by two on phones. */
.aff-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--lp-gap);
  max-width: 980px;
  margin: 36px auto 0;
  list-style: none;
  text-align: left;
}
.aff-facts li { display: flex; align-items: flex-start; gap: 12px; }
.aff-facts li > span:last-child { display: grid; gap: 2px; color: var(--text-muted); font-size: var(--lp-small); line-height: 1.45; }
.aff-facts strong { color: var(--text-primary); font-size: var(--text-md); font-weight: 600; }
@media (max-width: 900px) {
  .aff-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 560px; }
}
@media (max-width: 380px) {
  .aff-facts { grid-template-columns: 1fr; }
}

/* How it works, in three steps (the four-step grid of /how-it-works, three wide). */
.steps.steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .steps.steps-3 { grid-template-columns: 1fr; }
}

/* The application: the pitch beside the form, stacked on phones. */
.aff-apply {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 28px clamp(28px, 5vw, 64px);
  padding: clamp(20px, 3.5vw, 40px);
  border: 1px solid var(--border-soft);
  border-radius: var(--lp-card-radius);
  background: var(--lp-card-sheen), var(--bg-base);
}
.aff-apply-copy h2 { font-size: var(--lp-h2); letter-spacing: -0.025em; }
.aff-points { display: grid; gap: 10px; margin-top: 22px; list-style: none; }
.aff-points li { display: flex; align-items: center; gap: 10px; color: var(--text-default); font-size: var(--lp-card-text); }
.aff-points .icon-sm { color: var(--success); }
.aff-form { display: grid; gap: 16px; }
.aff-form .updates-status:empty { display: none; }
.aff-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.aff-field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.aff-label { color: var(--text-primary); font-size: var(--text-base); font-weight: 600; }
legend.aff-label { padding: 0; margin-bottom: 6px; }
.aff-opt { margin-left: 6px; color: var(--text-muted); font-size: var(--text-sm); font-weight: 500; }
.aff-input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font: inherit;
  font-size: 1rem; /* no zoom-on-focus on iOS */
}
/* The examples in the fields: a touch lighter than --text-dim (4.4:1 there), still fainter than
   typed text: 5.1:1 (owner, 6 November 2026). */
.aff-input::placeholder { color: color-mix(in srgb, var(--text-dim) 80%, var(--text-muted)); }
.aff-input:hover { border-color: #4b4d5c; }
.aff-input:focus-visible { border-color: var(--accent); }
.aff-input[aria-invalid="true"] { border-color: var(--danger); }
.aff-textarea { height: auto; min-height: 88px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.aff-mono { font-family: var(--font-mono); font-size: .9375rem; }
.aff-hint { color: var(--text-muted); font-size: var(--lp-small); line-height: 1.5; }
/* Links inside sentences: underlined, not told apart by colour alone (as in site.css). */
.aff-hint a, .aff-check a { text-decoration: underline; text-underline-offset: 3px; }
.aff-net-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg-input); }
.aff-net-opt { position: relative; display: grid; }   /* its label fills the row: both as tall */
.aff-net-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.aff-net-opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--lp-tap);
  padding: 4px 0;       /* top and bottom only: two lines of big browser text stay inside */
  border-radius: 7px;
  color: var(--text-muted);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.25;
  text-align: center;   /* a label that wraps (320 px) stays centred */
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.aff-net-opt:hover span { color: var(--text-primary); background: var(--bg-hover); }
.aff-net-opt input:checked + span { background: var(--accent); color: #fff; }
.aff-net-opt input:focus-visible + span { box-shadow: var(--focus-ring); }
/* "Where is most of your audience?": the field's look, the browser's own arrow drawn again. */
.aff-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b7b9c6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}
.aff-select:invalid { color: color-mix(in srgb, var(--text-dim) 80%, var(--text-muted)); } /* "Choose one", like a placeholder */
.aff-select option { background: var(--bg-card); color: var(--text-primary); }
/* "Add your payout wallet now": folded, the wallet can come later (the stats page). */
.aff-fold { border: 1px solid var(--border-soft); border-radius: 8px; background: var(--bg-base); }
.aff-fold[open] { background: var(--bg-card); }
.aff-fold summary {
  position: relative;
  display: block;       /* "Optional" stays beside the words when they wrap (320 px) */
  min-height: var(--lp-tap);
  padding: 12px 48px 12px 14px;
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
  border-radius: 8px;
}
.aff-fold summary::-webkit-details-marker { display: none; }
.aff-fold summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background:
    linear-gradient(var(--text-muted), var(--text-muted)) center / 10px 2px no-repeat,
    linear-gradient(var(--text-muted), var(--text-muted)) center / 2px 10px no-repeat,
    var(--bg-active);
  transition: transform var(--dur-slow) var(--ease);
}
.aff-fold[open] summary::after { transform: rotate(45deg); }
.aff-fold summary:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.aff-fold-body { display: grid; gap: 16px; padding: 4px 14px 16px; }
.aff-check { display: flex; align-items: flex-start; gap: 10px; min-height: var(--lp-tap); color: var(--text-default); font-size: var(--text-md); line-height: 1.5; cursor: pointer; }
.aff-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.aff-check input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }
/* The honeypot: out of sight, out of the tab order and the accessibility tree. */
.aff-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.aff-done { display: grid; justify-items: start; gap: 10px; padding: 8px 0; }
.aff-done:focus { outline: none; }
.aff-done h3 { font-size: var(--lp-h3); }
.aff-done p { color: var(--text-muted); font-size: var(--lp-card-text); line-height: 1.6; }
@media (max-width: 900px) {
  .aff-apply { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .aff-pair { grid-template-columns: 1fr; }
}
