/* =====================================================================
   AFFILIATES  /affiliates/  and  /affiliates/portal/
   (store kit storefront/affiliates; the same file in every store)

   Everything else on these pages is the account page's own classes
   (acct__*, fform, ffield, fcheck, fstatus), so the look is the store's.
   This adds only what the account page has no class for, in the shared
   design tokens every store defines (tokens.css). Mobile first.
   ===================================================================== */
.aff .acct { display: flex; flex-direction: column; gap: 20px; }
.aff #affintro { display: flex; flex-direction: column; gap: 20px; }
.aff #affintro[hidden] { display: none; }
.aff__steps, .aff__stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.aff__rules { margin: 10px 0 0; padding-left: 18px; color: var(--text-body); display: flex; flex-direction: column; gap: 8px; }
.aff__terms { max-height: 360px; overflow: auto; margin-top: 14px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--bg); font-size: 14px; color: var(--text-body); overflow-wrap: anywhere; }
.aff__terms h3 { margin: 0 0 10px; font-size: 16px; color: var(--text); }
.aff__terms p { margin: 0 0 10px; white-space: pre-line; }
.aff__copy { margin-top: 14px; }
.aff__copyrow { display: flex; gap: 10px; align-items: center; margin-top: 6px; min-width: 0; }
.aff__copyrow code { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--panel); font-size: 14px; }
.aff__copyrow .btn { flex: none; min-height: 44px; }
.aff__warn { border-color: var(--text-error, var(--accent)); }
/* Checkboxes inside .ffield: the store's text-input rules (.ffield input,
   .ffield label) would size them like text fields. */
.aff .ffield label.fcheck { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; margin: 0; font: inherit; font-size: 15px; line-height: 1.45; letter-spacing: 0; text-transform: none; color: var(--text); cursor: pointer; }
.aff .ffield .fcheck input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; padding: 0; border-radius: 4px; accent-color: var(--accent); box-shadow: none; }
.aff__notice p { margin: 8px 0 0; color: var(--text-body); }
.aff .acct__card > .btn, .aff .acct__card > a { margin-top: 14px; }
.aff .acct__card > a { display: inline-block; margin-right: 14px; }
.aff .acct__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.aff .acct__ledger summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
@media (min-width: 761px) {
  .aff__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aff__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .aff__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
