/* affiliates.benmork.com (task 277): the programme's own site in the graphite theme.
   Tokens only; the palette lives in theme.css. Signature: the rate scale drawn as the
   signal-blue level bar of the mark, and the payout receipt in the hero. */
.aff-shell { width: var(--shell); margin-inline: auto; }

/* header: edge to edge, sticky, one action */
.aff-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.aff-header-inner { width: var(--shell); margin-inline: auto; min-height: 72px; display: flex; align-items: center; gap: 24px; }
.aff-brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.aff-brand-tag { font-size: var(--fs-small); color: var(--muted-strong); padding-left: 12px; border-left: 1px solid var(--line-strong); line-height: 1.2; }
.aff-nav { display: none; gap: 28px; }
.aff-nav a { color: var(--ink); text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.aff-nav a:hover { color: var(--accent-text); }

/* hero: claim on the left, receipt on the right */
.aff-hero { padding-block: clamp(48px, 7vw, 112px) clamp(40px, 5vw, 80px); background: radial-gradient(120% 70% at 85% 0%, var(--glow), transparent 60%); }
.aff-hero-grid { display: grid; gap: 40px; align-items: center; }
.aff-hero-copy .display { max-width: 18ch; }
.aff-accent { color: var(--accent-text); white-space: nowrap; }
.aff-lead { margin-top: 24px; max-width: 52ch; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem); line-height: 1.55; color: var(--ink); }
.aff-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.aff-receipt { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: 28px; }
.aff-receipt-h { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--ink-strong); margin-bottom: 16px; }
.aff-receipt dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-block: 12px; border-top: 1px dashed var(--line-strong); }
.aff-receipt dt { color: var(--muted-strong); font-size: var(--fs-small); }
.aff-receipt dd { color: var(--ink); font-size: 1.05rem; white-space: nowrap; }
.aff-receipt .aff-receipt-total { border-top-style: solid; }
.aff-receipt .aff-receipt-total dt, .aff-receipt .aff-receipt-total dd { color: var(--ink-strong); }
.aff-receipt .aff-receipt-you { border-top-style: solid; }
.aff-receipt .aff-receipt-you dt { color: var(--ink); font-weight: 600; }
.aff-receipt .aff-receipt-you dd { color: var(--profit); font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); }
.aff-receipt figcaption { margin-top: 12px; font-size: var(--fs-small); color: var(--muted); line-height: 1.5; }

/* rate scale band: the ink field with the level bar */
.aff-scale-band { background: var(--ink-field); border-block: 1px solid var(--line); padding-block: clamp(48px, 5vw, 80px); }
.aff-scale-h { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--ink-strong); }
.aff-scale { position: relative; margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); }
.aff-scale::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent-soft), var(--accent)); }
.aff-scale li { position: relative; padding-top: 22px; }
.aff-scale li::before { content: ""; position: absolute; left: 0; top: -5px; width: 2px; height: 16px; background: var(--ink-strong); }
.aff-scale li:last-child { text-align: right; }
.aff-scale li:last-child::before { left: auto; right: 0; }
.aff-scale .num { font-size: clamp(1.6rem, 1rem + 2.6vw, 3.4rem); color: var(--ink-strong); }
.aff-scale li:last-child .num { color: var(--accent-text); }
.aff-scale-note { margin-top: 20px; max-width: 64ch; color: var(--muted-strong); }
.aff-facts { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.aff-facts li { display: grid; gap: 6px; padding: 20px 16px 4px 0; }
.aff-facts strong { font-family: var(--font-display); font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.75rem); font-weight: 700; color: var(--ink-strong); line-height: 1.1; }
.aff-facts span { font-size: var(--fs-small); color: var(--muted); line-height: 1.45; }

/* sections */
.aff-section { padding-block: var(--section-pad); }
.aff-tint { background: var(--surface); border-block: 1px solid var(--line); }
.aff-split { display: grid; gap: 32px; }
.aff-muted { margin-top: 16px; color: var(--muted-strong); max-width: 40ch; }

.aff-who li { padding-block: 20px; border-top: 1px solid var(--line-strong); display: grid; gap: 6px; }
.aff-who li:last-child { border-bottom: 1px solid var(--line-strong); }
.aff-who h3, .aff-index h3, .aff-steps h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; color: var(--ink-strong); line-height: 1.25; }
.aff-who p, .aff-index p, .aff-steps p { color: var(--muted-strong); }

.aff-index { margin-top: 36px; display: grid; gap: 0 48px; }
.aff-index li { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; padding-block: 22px; border-top: 1px solid var(--line-strong); }
.aff-index-n { grid-row: span 2; color: var(--muted); font-size: 1.1rem; padding-top: 4px; }

.aff-steps { margin-top: 36px; display: grid; gap: 28px; counter-reset: s; }
.aff-steps li { display: grid; gap: 8px; align-content: start; }
.aff-step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong); color: var(--ink-strong); font-size: 1rem; }

.aff-ledger > div { padding-block: 20px; border-top: 1px solid var(--line-strong); display: grid; gap: 8px; }
.aff-ledger > div:last-child { border-bottom: 1px solid var(--line-strong); }
.aff-ledger dt { font-family: var(--font-display); font-weight: 700; color: var(--ink-strong); }
.aff-ledger dd { color: var(--ink); max-width: 70ch; }

/* application: the one bordered panel besides the receipt */
.aff-apply-band { background: radial-gradient(90% 80% at 0% 100%, var(--glow), transparent 60%); }
.aff-apply { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 36px); }
.aff-form { display: grid; gap: 18px; }
.aff-form label { display: grid; gap: 8px; font-weight: 600; color: var(--ink); }
.aff-form input { min-height: var(--field-h); padding: 0 16px; border-radius: var(--radius-field); border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font: inherit; font-weight: 400; }
.aff-form input::placeholder { color: var(--muted); }
.aff-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.aff-form .button { justify-self: start; }
.aff-error { color: var(--loss); background: var(--loss-soft); border-radius: var(--radius-sm); padding: 12px 16px; }
.aff-sent h3 { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--ink-strong); }
.aff-sent p { margin-top: 8px; color: var(--ink); }
.aff-small { font-size: var(--fs-small); color: var(--muted); }
.aff-small a, .aff-ledger a { color: var(--accent-text); }

/* footer */
.aff-footer { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom)); display: block; }
.aff-footer .aff-shell { display: grid; gap: 20px; }
.aff-footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.aff-footer-links, .aff-footer-legal { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.aff-footer a, .aff-footer .link-btn { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); }
.aff-footer-legal a, .aff-footer-legal .link-btn { color: var(--muted-strong); }
.aff-footer a:hover, .aff-footer .link-btn:hover { color: var(--accent-text); }

a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 559px) {
  .aff-brand-tag { display: none; }
  .aff-actions .button { flex: 1 1 100%; }
  .aff-receipt { padding: 20px; }
  .aff-receipt dl > div { flex-wrap: wrap; }
}
@media (min-width: 760px) {
  .aff-facts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .aff-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aff-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
  .aff-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .aff-who li:nth-last-child(2) { border-bottom: 1px solid var(--line-strong); }
}
@media (min-width: 1000px) {
  .aff-nav { display: flex; }
  .aff-hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 64px; }
  .aff-split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 64px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) { .button:hover { transform: none; } }
