/* reallyo-affiliates — app-specific layer on top of reallyo-site's design system (site.css, the .rl-* tokens). */
body { margin: 0; background: var(--rl-bg); }
/* site.css's `.rl-page p { margin: 0 }` outranks these single-class rules, so restate them here */
.rl-page .rl-hero-sub { margin-top: 1.8rem; }
.rl-page .rl-head-center h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); max-width: 22ch; margin: 1rem auto 0; }
.rl-page .rl-head-center p { margin-top: 1rem; }
.rl-page .rl-final p { margin: 22px auto 0; }

/* nav: always visible (site.css hides .rl-nav-links below 1040px, which suits a mega menu, not three links) */
.aff-nav { gap: 12px; flex-wrap: wrap; }
.aff-nav .rl-logo { width: 118px; }
.aff-nav-links { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.aff-nav-links a { font-size: .92rem; font-weight: 500; text-decoration: none; padding: 8px 12px; border-radius: 100px; }
.aff-nav-links a:hover { background: rgba(0,0,0,.05); }
.aff-nav-account { display: flex; align-items: center; gap: 8px; }
.aff-who { font-size: .85rem; color: var(--rl-muted); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aff-btn-sm { padding: .55em 1.1em !important; font-size: .88rem !important; }
@media (max-width: 640px) { .aff-nav { border-radius: 24px; } .aff-who { display: none; } }

.aff-main { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.aff-main h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.aff-main h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-top: 2.6rem !important; margin-bottom: 1rem !important; }
.aff-sub { margin-top: .8rem !important; font-size: 1.05rem; max-width: 62ch; }
.aff-narrow { max-width: 640px; }

.aff-card { background: var(--rl-card); border: 1px solid var(--rl-line); border-radius: var(--rl-radius); padding: clamp(18px, 3vw, 28px); }
.aff-card + .aff-card { margin-top: 18px; }
.aff-paper { background: var(--rl-paper); border-color: transparent; }

.aff-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rl-line); border: 1px solid var(--rl-line); border-radius: var(--rl-radius); overflow: hidden; margin-top: 1.6rem; }
@media (min-width: 760px) { .aff-stats { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .aff-stats.six { grid-template-columns: repeat(6, 1fr); } }
.aff-stat { background: var(--rl-card); padding: 20px 20px 18px; }
.aff-stat .v { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -.02em; color: var(--rl-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.aff-stat .l { margin-top: 8px; font-size: .84rem; color: var(--rl-muted); }

.aff-link-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.aff-link { font-family: 'Geist Mono', ui-monospace, monospace; font-size: .9rem; background: var(--rl-paper); border: 1px solid var(--rl-line); border-radius: 12px; padding: 10px 14px; flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; color: var(--rl-ink); }
.aff-copy { cursor: pointer; }

.aff-table-wrap { overflow-x: auto; border: 1px solid var(--rl-line); border-radius: var(--rl-radius); background: var(--rl-card); }
.aff-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.aff-table th { text-align: left; font-family: 'Geist Mono', monospace; text-transform: uppercase; letter-spacing: .1em; font-size: .66rem; font-weight: 500; color: var(--rl-faint); padding: 12px 14px; border-bottom: 1px solid var(--rl-line); white-space: nowrap; background: var(--rl-bg); }
.aff-table td { padding: 11px 14px; border-bottom: 1px solid var(--rl-line); vertical-align: top; color: var(--rl-ink); }
.aff-table tr:last-child td { border-bottom: none; }
.aff-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aff-table .muted { color: var(--rl-muted); }
.aff-empty { padding: 22px; color: var(--rl-muted); font-size: .95rem; }

.aff-badge { display: inline-block; font-family: 'Geist Mono', monospace; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 100px; border: 1px solid var(--rl-line-strong); white-space: nowrap; }
.aff-badge.active, .aff-badge.paid, .aff-badge.approved, .aff-badge.create { background: #e8f8ec; border-color: #b7e4c2; color: #13612c; }
.aff-badge.pending, .aff-badge.update { background: #fff6e0; border-color: #f0d79a; color: #7a5300; }
.aff-badge.paused, .aff-badge.void, .aff-badge.failed, .aff-badge.error { background: #fdecec; border-color: #f2bcbc; color: #8a1c1c; }
.aff-badge.free, .aff-badge.skip { background: var(--rl-paper); color: var(--rl-muted); }

.aff-form { display: grid; gap: 16px; }
.aff-form-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .aff-form-grid { grid-template-columns: 1fr 1fr; } }
.aff-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--rl-ink); }
.aff-field .hint { font-size: .8rem; color: var(--rl-muted); margin-top: 5px; }
.aff-input, .aff-field input[type=text], .aff-field input[type=email], .aff-field input[type=password], .aff-field input[type=number], .aff-field input[type=url], .aff-field input[type=date], .aff-field select, .aff-field textarea {
  width: 100%; font: inherit; font-size: .98rem; padding: 11px 13px; border: 1.5px solid var(--rl-line-strong); border-radius: 12px; background: #fff; color: var(--rl-ink); }
.aff-field textarea { min-height: 90px; resize: vertical; }
.aff-input:focus, .aff-field input:focus, .aff-field select:focus, .aff-field textarea:focus { outline: none; border-color: var(--rl-accent); box-shadow: 0 0 0 3px var(--rl-accent-soft); }
.aff-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--rl-muted); }
.aff-check input { margin-top: 3px; }
.aff-prefix { display: flex; align-items: stretch; }
.aff-prefix span { display: flex; align-items: center; padding: 0 12px; background: var(--rl-paper); border: 1.5px solid var(--rl-line-strong); border-right: none; border-radius: 12px 0 0 12px; font-family: 'Geist Mono', monospace; font-size: .82rem; color: var(--rl-muted); white-space: nowrap; }
.aff-prefix input { border-radius: 0 12px 12px 0 !important; min-width: 0; }
.aff-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.aff-inline { display: inline; }
.aff-btn-xs { font: inherit; font-size: .8rem; font-weight: 600; padding: 5px 11px; border-radius: 100px; border: 1.5px solid var(--rl-line-strong); background: #fff; cursor: pointer; color: var(--rl-ink); text-decoration: none; display: inline-block; }
.aff-btn-xs:hover { border-color: var(--rl-ink); }
.aff-btn-xs.primary { background: var(--rl-ink); color: #fff; border-color: var(--rl-ink); }
.aff-btn-xs.danger { color: #8a1c1c; }

.aff-flash { margin-top: 18px; padding: 12px 16px; border-radius: 14px; font-size: .95rem; }
.aff-flash-ok { background: #e8f8ec; color: #13612c; border: 1px solid #b7e4c2; }
.aff-flash-err { background: #fdecec; color: #8a1c1c; border: 1px solid #f2bcbc; }
.aff-flash-info { background: var(--rl-accent-soft); color: var(--rl-accent-deep); border: 1px solid #c8d3ff; }
.aff-error { color: #8a1c1c; font-size: .9rem; }

.aff-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 1.2rem; }
.aff-tabs a { text-decoration: none; font-size: .88rem; font-weight: 500; padding: 8px 14px; border-radius: 100px; border: 1px solid var(--rl-line); }
.aff-tabs a.on { background: var(--rl-ink); color: #fff; border-color: var(--rl-ink); }

.aff-footer { border-top: 1px solid var(--rl-line); padding: 26px 0; font-size: .85rem; color: var(--rl-muted); }
.aff-footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aff-footer a { color: var(--rl-muted); }

/* program page: example dashboard card in the hero */
.aff-demo { background: var(--rl-card); border: 1px solid var(--rl-line); border-radius: var(--rl-radius-lg); padding: 22px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.25); }
.aff-demo .aff-stats { margin-top: 14px; }
.aff-demo-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin-top: 18px; padding: 0 4px; }
.aff-demo-bars i { flex: 1; background: var(--rl-accent); border-radius: 6px 6px 2px 2px; opacity: .85; }
.aff-demo-cap { font-size: .78rem; color: var(--rl-faint); margin-top: 10px; }
.aff-faq { display: grid; gap: 12px; margin-top: 40px; }
.aff-faq details { background: var(--rl-card); border: 1px solid var(--rl-line); border-radius: 18px; padding: 16px 20px; }
.aff-faq summary { cursor: pointer; font-weight: 600; color: var(--rl-ink); }
.aff-faq details p { margin-top: 10px !important; line-height: 1.6; }

/* partner page */
.aff-partner { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .aff-partner { grid-template-columns: 1.1fr .9fr; } }
.aff-partner-photo { width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: cover; border-radius: var(--rl-radius-lg); border: 1px solid var(--rl-line); background: var(--rl-paper-2); justify-self: center; }
.aff-partner-initials { display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-size: 5rem; font-weight: 600; color: var(--rl-accent); background: var(--rl-accent-soft); }
.aff-quote { margin-top: 1.6rem !important; font-size: 1.2rem; line-height: 1.55; color: var(--rl-ink) !important; border-left: 3px solid var(--rl-accent); padding-left: 18px; }
.aff-code { display: inline-flex; flex-direction: column; gap: 6px; margin-top: 1.6rem; padding: 16px 20px; border: 1.5px dashed var(--rl-accent); border-radius: 16px; background: var(--rl-accent-soft); }
.aff-code strong { font-family: 'Geist Mono', monospace; font-size: 1.5rem; letter-spacing: .06em; color: var(--rl-accent-deep); }
.aff-code span { font-size: .9rem; color: var(--rl-muted); }

.aff-mapping { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .aff-mapping { grid-template-columns: repeat(3, 1fr); } }
.aff-small { font-size: .85rem; color: var(--rl-muted); }
.aff-mt { margin-top: 1.2rem; }
