/* ---------- /affiliates/ and /my-account/affiliates/ (templates/affiliates.php, sections/affiliates-*.php) ----------
   Wave 4 page block. Scoped to body.dgn-page[data-page="affiliates"] (KIT 9): .dgn-page is only printed by
   rebuilt templates, so the live affiliate shell (affiliate-site.php under the new chrome, which prints
   data-page="affiliates" without .dgn-page) is never touched. Linked on this route only (next/page-css.php).
   The plugin's own markup (dgaf.css classes: the commission guide, terms, application form, dashboard) is
   restyled here, never rewritten. dgaf.css still loads first; every rule below outranks its (0,2,0)-(1,2,1)
   selectors by specificity, with no !important. */

/* the header carries the affiliate sub-nav (one row under the bar on desktops, wrapped on tablets,
   folded into the menu on phones), so in-page anchors stop below it */
body.dgn-page[data-page="affiliates"] [id]{scroll-margin-top:142px}

/* ---- hero: "Commission per sale" card ---- */
/* the head wraps on narrow phones, so the chip drops under the title instead of being clipped by the card (360px) */
body.dgn-page[data-page="affiliates"] .dgn-af-card .dgn-proofcard__head{flex-wrap:wrap;row-gap:8px}
body.dgn-page[data-page="affiliates"] .dgn-af-hero .dgn-fine{text-wrap:pretty}
body.dgn-page[data-page="affiliates"] .dgn-af-chip{display:inline-block;flex:none;padding:2px 7px;border:1px solid var(--dgn-line2);border-radius:5px;font-family:var(--dgn-fd);font-stretch:112%;font-weight:700;font-size:10px;line-height:1.4;letter-spacing:.16em;text-transform:uppercase;color:#a4a4ae;white-space:nowrap}
body.dgn-page[data-page="affiliates"] .dgn-af-card__big{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:16px 0 4px}
body.dgn-page[data-page="affiliates"] .dgn-af-card__big .dgn-figure--hero{margin:0}
body.dgn-page[data-page="affiliates"] .dgn-af-card__u{font-family:var(--dgn-fd);font-stretch:112%;font-weight:700;font-size:15px;line-height:1;letter-spacing:.18em;text-transform:uppercase;color:#e7e7ea}
body.dgn-page[data-page="affiliates"] .dgn-af-bars{list-style:none;margin:18px 0 0;padding:0;border-top:1px solid var(--dgn-line)}
body.dgn-page[data-page="affiliates"] .dgn-af-bar{display:grid;grid-template-columns:minmax(118px,.9fr) 40px minmax(0,2fr) minmax(104px,auto);align-items:center;column-gap:16px;padding:12px 0;border-bottom:1px solid var(--dgn-line)}
body.dgn-page[data-page="affiliates"] .dgn-af-bar__t{font-family:var(--dgn-fd);font-stretch:108%;font-weight:700;font-size:11.5px;line-height:1.3;letter-spacing:.14em;text-transform:uppercase;color:#e7e7ea;white-space:nowrap}
body.dgn-page[data-page="affiliates"] .dgn-af-bar__r{font-family:var(--dgn-fd);font-stretch:90%;font-weight:800;font-size:15px;line-height:1;color:var(--dgn-gold);font-variant-numeric:tabular-nums}
body.dgn-page[data-page="affiliates"] .dgn-af-bar__g{display:block;width:100%;height:6px;overflow:hidden;border-radius:3px}
body.dgn-page[data-page="affiliates"] .dgn-af-bar__bg{fill:rgba(255,255,255,.07)}
body.dgn-page[data-page="affiliates"] .dgn-af-bar__fg{fill:rgba(251,191,36,.62);transform-box:fill-box;transform-origin:0 50%;animation:dgn-af-grow .9s var(--dgn-ease) both}
/* staggered by length, not by delay, so each bar starts with the page and the longest settles last */
body.dgn-page[data-page="affiliates"] .dgn-af-bar:nth-child(2) .dgn-af-bar__fg{animation-duration:1.05s}
body.dgn-page[data-page="affiliates"] .dgn-af-bar:nth-child(3) .dgn-af-bar__fg{animation-duration:1.2s}
body.dgn-page[data-page="affiliates"] .dgn-af-bar:nth-child(4) .dgn-af-bar__fg{animation-duration:1.35s}
body.dgn-page[data-page="affiliates"] .dgn-af-bar.is-top .dgn-af-bar__fg{fill:var(--dgn-gold)}
@keyframes dgn-af-grow{from{transform:scaleX(0)}}
body.dgn-page[data-page="affiliates"] .dgn-af-bar__v{font-family:var(--dgn-fd);font-stretch:80%;font-weight:800;font-size:21px;line-height:1;color:#fff;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
body.dgn-page[data-page="affiliates"] .dgn-af-bar.is-top .dgn-af-bar__v{color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgn-af-bar__v small{font-family:var(--dgn-fb);font-stretch:100%;font-weight:500;font-size:10.5px;letter-spacing:.06em;color:var(--dgn-dim)}
body.dgn-page[data-page="affiliates"] .dgn-af-card .dgn-proofcard__foot{margin-top:4px;border-top:0}
body.dgn-page[data-page="affiliates"] .dgn-af-card__note{font-size:12.5px;line-height:1.5;color:var(--dgn-dim)}

/* ---- two-column sections (commission, payouts, join): text left, plugin panel or facts right ---- */
body.dgn-page[data-page="affiliates"] .dgn-af-split{grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);align-items:center}
body.dgn-page[data-page="affiliates"] .dgn-af-split .dgn-lead{margin-top:22px}
body.dgn-page[data-page="affiliates"] .dgn-af-ticks{list-style:none;margin:26px 0 0;padding:0;display:grid;gap:10px}
body.dgn-page[data-page="affiliates"] .dgn-af-ticks li{display:flex;align-items:center;gap:10px;font-size:14.5px;line-height:1.45;color:#dcdce2}
body.dgn-page[data-page="affiliates"] .dgn-af-ticks svg{flex:none;color:var(--dgn-prop)}
body.dgn-page[data-page="affiliates"] .dgn-af-pay__note{margin-top:18px}

/* ---- why it converts: the lead and the four columns (the account rows are gone: proof diet, 25 Sep 2026) ---- */
body.dgn-page[data-page="affiliates"] .dgn-af-proof .dgn-proof__head .dgn-lead{text-wrap:balance}
body.dgn-page[data-page="affiliates"] .dgn-af-why{margin-top:56px}
body.dgn-page[data-page="affiliates"] .dgn-af-why .dgn-h3,body.dgn-page[data-page="affiliates"] .dgn-af-how__cols .dgn-h3{font-size:clamp(20px,1.6vw,24px);text-wrap:balance}
body.dgn-page[data-page="affiliates"] .dgn-af-why>li>.dgn-link:last-child{margin-top:auto;padding-top:6px}

/* ---- how referrals work ---- */
body.dgn-page[data-page="affiliates"] .dgn-af-how .dgn-steps{margin-top:6px}
body.dgn-page[data-page="affiliates"] .dgn-af-how__cols{margin-top:48px}

/* ---- payouts: four facts in a 2 x 2 hairline grid ---- */
body.dgn-page[data-page="affiliates"] .dgn-af-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;border-top:1px solid var(--dgn-line2)}
body.dgn-page[data-page="affiliates"] .dgn-af-fact{min-width:0;padding:28px 28px 28px 0;border-bottom:1px solid var(--dgn-line)}
body.dgn-page[data-page="affiliates"] .dgn-af-fact:nth-child(even){padding:28px 0 28px 30px;border-left:1px solid var(--dgn-line)}
body.dgn-page[data-page="affiliates"] .dgn-af-fact dt{font-family:var(--dgn-fd);font-stretch:112%;font-weight:700;font-size:11px;line-height:1.3;letter-spacing:.16em;text-transform:uppercase;color:var(--dgn-dim)}
body.dgn-page[data-page="affiliates"] .dgn-af-fact dd{margin:12px 0 0;padding:0}
body.dgn-page[data-page="affiliates"] .dgn-af-fact dd b{display:block;font-family:var(--dgn-fd);font-stretch:74%;font-weight:850;font-size:clamp(40px,3.5vw,56px);line-height:1;letter-spacing:-.01em;color:#fff;white-space:nowrap;font-variant-numeric:tabular-nums}
body.dgn-page[data-page="affiliates"] .dgn-af-fact:first-child dd b{color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgn-af-fact dd span{display:block;margin-top:10px;font-size:13.5px;line-height:1.5;color:var(--dgn-muted)}

/* ---- terms section: a hairline above (it can follow another plain section) ---- */
body.dgn-page[data-page="affiliates"] .dgn-af-terms{border-top:1px solid var(--dgn-line)}
body.dgn-page[data-page="affiliates"] .dgn-af-terms .dgn-split{align-items:center}
/* the accordion sits level with the middle of the heading block: a jump to #dgaf-terms keeps the heading in view */
@media (min-width:1141px){body.dgn-page[data-page="affiliates"] .dgn-af-terms{padding:72px 0}body.dgn-page[data-page="affiliates"] .dgn-af-plug--terms #dgaf-terms{scroll-margin-top:250px}}

/* ================= the plugin's own markup (dgaf.css), restyled to the kit ================= */

/* the portal root(s): no box of their own; the kit section and wrap lay them out */
body.dgn-page[data-page="affiliates"] .dgaf{max-width:none;margin:0;padding:0;border-radius:0;background:none;color:var(--dgn-text);font-family:var(--dgn-fb);font-size:15px;line-height:1.6}
body.dgn-page[data-page="affiliates"] .dgaf h1,body.dgn-page[data-page="affiliates"] .dgaf h2,body.dgn-page[data-page="affiliates"] .dgaf h3,body.dgn-page[data-page="affiliates"] .dgaf h4{font-family:var(--dgn-fd);font-weight:800;font-stretch:90%;letter-spacing:-.005em;line-height:1.15;color:var(--dgn-text)}
body.dgn-page[data-page="affiliates"] .dgaf a{color:var(--dgn-gold);text-decoration-color:rgba(251,191,36,.4)}
body.dgn-page[data-page="affiliates"] .dgaf a:hover{color:var(--dgn-gold);text-decoration-color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgaf :is(a,button,input,textarea,select,summary,[tabindex]):focus-visible{outline:2px solid var(--dgn-gold);outline-offset:3px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-eyebrow{display:flex;align-items:center;gap:10px;margin:0 0 10px;font-family:var(--dgn-fd);font-stretch:115%;font-weight:700;font-size:11px;line-height:1.3;letter-spacing:.22em;text-transform:uppercase;color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-eyebrow::before{content:"";flex:none;width:22px;height:1.5px;background:var(--dgn-grad)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-small{font-size:13px;line-height:1.55;color:var(--dgn-muted)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-help{font-size:12.5px;line-height:1.55;color:var(--dgn-dim)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-muted{color:var(--dgn-dim)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-empty{padding:14px 0;font-size:14.5px;line-height:1.6;color:var(--dgn-muted)}
/* the portal's credit line: the site footer replaces it (the old shell hid it the same way) */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-footer{display:none}

/* cards: the kit panel (hairline border, 18px radius, the panel gradient) */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-card{position:relative;min-width:0;margin:0 0 22px;padding:26px 28px;border:1px solid var(--dgn-line2);border-radius:18px;background:var(--dgn-panel);box-shadow:0 40px 100px -64px rgba(251,191,36,.22),inset 0 1px 0 rgba(255,255,255,.04)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 18px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-section-heading :is(h2,h3){margin:0;font-size:clamp(22px,2vw,28px)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-section-heading .dgaf-eyebrow{margin-bottom:8px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge{display:inline-flex;align-items:center;flex:none;width:auto;padding:3px 8px;border-radius:5px;font-family:var(--dgn-fd);font-stretch:112%;font-weight:700;font-size:10px;line-height:1.4;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge:not([class*="dgaf-badge-"]){border:1px solid var(--dgn-line2);background:none;color:#a4a4ae}

/* tables: kit hairline tables (header cells in the tag style, tabular figures) */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-table-scroll{border-top:1px solid var(--dgn-line2);scrollbar-color:#55555e transparent}
body.dgn-page[data-page="affiliates"] .dgaf table{font-size:14px;line-height:1.45;color:#d9d9df}
body.dgn-page[data-page="affiliates"] .dgaf :is(th,td){padding:14px 18px 14px 0;border:0;border-bottom:1px solid var(--dgn-line);background:none;color:#d9d9df;vertical-align:middle}
body.dgn-page[data-page="affiliates"] .dgaf :is(th,td):last-child{padding-right:0}
body.dgn-page[data-page="affiliates"] .dgaf thead th{padding-top:12px;padding-bottom:12px;border-bottom-color:var(--dgn-line2);font-family:var(--dgn-fd);font-stretch:112%;font-weight:700;font-size:10.5px;line-height:1.3;letter-spacing:.16em;text-transform:uppercase;color:var(--dgn-dim)}
body.dgn-page[data-page="affiliates"] .dgaf tbody tr:last-child :is(th,td){border-bottom:0}
body.dgn-page[data-page="affiliates"] .dgaf td small{color:var(--dgn-dim);font-size:11.5px}

/* ---- commission guide (#dgaf-commission-guide): the panel beside the rates ---- */
body.dgn-page[data-page="affiliates"] .dgn-af-plug--guide #dgaf-commission-guide{margin:0;padding:24px 28px 22px;background:linear-gradient(180deg,rgba(22,20,16,.94),rgba(11,11,14,.96));border-color:rgba(251,191,36,.2);box-shadow:0 44px 110px -56px rgba(251,191,36,.26),inset 0 1px 0 rgba(255,255,255,.06)}
body.dgn-page[data-page="affiliates"] #dgaf-commission-guide tbody th[scope="row"]{font-family:var(--dgn-fd);font-stretch:108%;font-weight:700;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#fff}
body.dgn-page[data-page="affiliates"] #dgaf-commission-guide td{font-variant-numeric:tabular-nums}
body.dgn-page[data-page="affiliates"] #dgaf-commission-guide td[data-label="Rate"]{font-family:var(--dgn-fd);font-stretch:90%;font-weight:800;font-size:16px;color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] #dgaf-commission-guide [data-dgaf-example-commission]>strong{font-family:var(--dgn-fd);font-stretch:74%;font-weight:850;font-size:32px;line-height:1;letter-spacing:-.01em;color:#fff}
body.dgn-page[data-page="affiliates"] #dgaf-commission-guide tr[data-dgaf-tier="ultimate"] [data-dgaf-example-commission]>strong{color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] #dgaf-commission-guide .dgaf-help{margin-top:10px}
body.dgn-page[data-page="affiliates"] #dgaf-commission-guide .dgaf-table-scroll+.dgaf-help{margin-top:14px}

/* ---- programme terms (#dgaf-terms): the <details> as a kit accordion row ---- */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms{margin:0;padding:0;border:0;border-top:1px solid var(--dgn-line2);border-bottom:1px solid var(--dgn-line2);border-radius:0;background:none;box-shadow:none}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 0;list-style:none;cursor:pointer}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary::marker{content:""}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary .dgaf-eyebrow{margin:0 0 8px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary strong{display:block;font-family:var(--dgn-fd);font-stretch:92%;font-weight:800;font-size:clamp(20px,1.9vw,26px);line-height:1.2;color:var(--dgn-text);transition:color .2s}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary:hover strong{color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary>.dgaf-small{display:inline-flex;align-items:center;gap:12px;flex:none;font-size:13px;font-weight:500;color:var(--dgn-muted);text-align:right}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary>.dgaf-small>span{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid var(--dgn-line3);border-radius:50%;font-size:14px;line-height:1;color:var(--dgn-text);transition:transform .3s,border-color .3s,background .3s}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms[open] summary>.dgaf-small>span,body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms details[open] summary>.dgaf-small>span{transform:rotate(45deg);border-color:var(--dgn-gold);background:rgba(251,191,36,.1)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms-body{padding:4px 0 26px;border-top:0}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms-body>.dgaf-small{font-size:12.5px;color:var(--dgn-dim)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms ol{margin:14px 0 0;padding:0;list-style:none;counter-reset:dgn-af-t;font-size:14.5px;line-height:1.7;color:var(--dgn-muted)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms li{position:relative;margin:0;padding:14px 0 14px 46px;border-top:1px solid var(--dgn-line);counter-increment:dgn-af-t}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms li::before{content:counter(dgn-af-t,decimal-leading-zero);position:absolute;left:0;top:13px;font-family:var(--dgn-fd);font-stretch:72%;font-weight:850;font-size:24px;line-height:1.1;color:transparent;-webkit-text-stroke:1px var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms li strong{color:var(--dgn-text);font-weight:600}

/* ---- forms: the application (#dgaf-application) and the dashboard wallet form, in kit controls ---- */
body.dgn-page[data-page="affiliates"] .dgaf label{margin:0 0 18px;font-size:13px;font-weight:500;line-height:1.45;color:#d8d8de}
body.dgn-page[data-page="affiliates"] .dgaf :is(input[type=text],input[type=url],input[type=number],textarea,select){height:48px;min-height:48px;margin:8px 0 0;padding:0 16px;border:1px solid var(--dgn-line2);border-radius:10px;background:rgba(255,255,255,.03);box-shadow:none;color:var(--dgn-text);font:400 15px/1.4 var(--dgn-fb);transition:border-color .2s,box-shadow .2s,background-color .2s}
body.dgn-page[data-page="affiliates"] .dgaf textarea{height:auto;min-height:120px;padding:12px 16px;line-height:1.6}
body.dgn-page[data-page="affiliates"] .dgaf select{padding-right:44px;-webkit-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23fbbf24' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}
body.dgn-page[data-page="affiliates"] .dgaf select option{background:#0b0b0f;color:var(--dgn-text)}
body.dgn-page[data-page="affiliates"] .dgaf :is(input,textarea)::placeholder{color:#74747e}
body.dgn-page[data-page="affiliates"] .dgaf :is(input[type=text],input[type=url],input[type=number],textarea,select):hover{border-color:var(--dgn-line3)}
body.dgn-page[data-page="affiliates"] .dgaf :is(input[type=text],input[type=url],input[type=number],textarea,select):focus{border-color:var(--dgn-gold);box-shadow:0 0 0 3px rgba(251,191,36,.25);outline:0;background-color:rgba(255,255,255,.04)}
body.dgn-page[data-page="affiliates"] .dgaf input[readonly]{color:#e4e4e8;background-color:rgba(255,255,255,.015)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-link-input{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-check{display:flex;align-items:flex-start;gap:12px;font-size:14px;line-height:1.55;color:#d9d9df}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-check input{flex:none;width:20px;height:20px;margin:2px 0 0;padding:0;border:1px solid var(--dgn-line3);border-radius:5px;background:rgba(255,255,255,.03) center/12px no-repeat;box-shadow:none;cursor:pointer;-webkit-appearance:none;appearance:none}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-check input:checked{border-color:var(--dgn-gold);background-color:rgba(251,191,36,.14);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23fbbf24' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-action-details{margin-top:6px;padding:0;border:0;border-top:1px solid var(--dgn-line);border-bottom:1px solid var(--dgn-line);border-radius:0;background:none}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-action-details>summary{padding:14px 0;font-size:14px;font-weight:600;color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-action-details[open]{padding-bottom:4px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-fields{padding-top:4px}
/* buttons: .dgaf-button is the kit's gold primary; .dgaf-button-secondary the kit's outline button */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:52px;height:auto;padding:14px 26px;border:0;border-radius:12px;background:var(--dgn-grad);box-shadow:0 12px 36px -16px rgba(251,191,36,.6),inset 0 1px 0 rgba(255,255,255,.55);color:var(--dgn-on-gold);font:600 15px/1.2 var(--dgn-fb);letter-spacing:0;text-transform:none;text-decoration:none;white-space:normal;cursor:pointer;transition:transform .25s,box-shadow .25s,border-color .25s,color .25s,background .25s}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-button:is(:hover,:focus-visible){background:var(--dgn-grad);color:var(--dgn-on-gold);transform:translateY(-2px);box-shadow:0 18px 44px -16px rgba(251,191,36,.8),inset 0 1px 0 rgba(255,255,255,.6)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-button.dgaf-button-secondary{min-height:46px;padding:11px 20px;border:1px solid var(--dgn-line3);background:rgba(255,255,255,.02);box-shadow:none;color:var(--dgn-text);font-size:14px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-button.dgaf-button-secondary:is(:hover,:focus-visible){border-color:var(--dgn-gold);background:rgba(255,255,255,.02);color:var(--dgn-gold);transform:none;box-shadow:none}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-text-link{font-size:13.5px;font-weight:600;text-decoration:none;border-bottom:1px solid rgba(251,191,36,.35);padding-bottom:2px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-inline-actions{gap:22px}

/* notices: the plugin's words, in the kit's note frame */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-notice{margin:0 0 22px;padding:14px 18px;border:1px solid rgba(251,191,36,.3);border-left:2px solid var(--dgn-gold);border-radius:10px;background:rgba(251,191,36,.06);color:#f1e3c2;font-size:14px;line-height:1.55}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-notice-success{border-color:rgba(74,222,128,.32);border-left-color:var(--dgn-prop);background:rgba(74,222,128,.07);color:#c9f5d8}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-notice-error{border-color:rgba(248,113,113,.36);border-left-color:var(--dgn-error);background:rgba(248,113,113,.07);color:#ffd4d4}
body.dgn-page[data-page="affiliates"] .dgn-af-notices{padding-top:28px}
body.dgn-page[data-page="affiliates"] .dgn-af-notices .dgaf-notice{margin:0}

/* the join panel (application form, or the plugin's notice/card in its place) */
body.dgn-page[data-page="affiliates"] #dgaf-application{margin:0;padding:28px 30px 26px}
body.dgn-page[data-page="affiliates"] #dgaf-application>p{margin:0 0 20px;font-size:15px;line-height:1.65;color:var(--dgn-muted)}
body.dgn-page[data-page="affiliates"] #dgaf-application form>.dgaf-help{margin:16px 0 20px}
body.dgn-page[data-page="affiliates"] .dgn-af-plug--join>.dgaf-card:last-child,body.dgn-page[data-page="affiliates"] .dgn-af-plug--join>.dgaf-notice:last-child{margin-bottom:0}

/* ================= dashboard (an affiliate's portal) ================= */
body.dgn-page[data-page="affiliates"] .dgn-af-dash__h{margin:0 0 28px}
body.dgn-page[data-page="affiliates"] .dgn-af-dash{position:relative;overflow:hidden;padding-top:56px}
body.dgn-page[data-page="affiliates"] .dgn-af-dash__bg{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}
body.dgn-page[data-page="affiliates"] .dgn-af-dash__bg .dgn-hero__glow{top:-620px;right:-10%}
body.dgn-page[data-page="affiliates"] .dgn-af-dash .dgn-wrap{z-index:1}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-member-header{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin:0 0 34px;padding:0;border:0}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-member-header .dgaf-eyebrow{font-size:12px;letter-spacing:.24em;margin-bottom:18px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-member-header .dgaf-eyebrow::before{width:28px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-member-header h1{margin:0 0 12px;font-weight:850;font-stretch:78%;font-size:clamp(40px,4.6vw,68px);line-height:.96;letter-spacing:-.025em}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-member-header .dgaf-small{font-size:16px;color:var(--dgn-muted)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-member-header>.dgaf-badge{font-size:11px;padding:5px 10px}
/* status badges keep the plugin's meaning (colour + word); the kit shape */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-approved,body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-confirmed{border:1px solid rgba(74,222,128,.4);background:rgba(74,222,128,.1);color:#9ef0bb}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-pending,body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-reserved,body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-sending,body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-sent{border:1px solid rgba(251,191,36,.4);background:rgba(251,191,36,.1);color:#fde68a}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-suspended,body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-rejected{border:1px solid rgba(248,113,113,.42);background:rgba(248,113,113,.1);color:#ffc9c9}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-badge-cancelled{border:1px solid var(--dgn-line2);background:none;color:#b8b8c0}
/* the rate strip: one hairline row of four rates */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip{margin:0;border:0;border-top:1px solid var(--dgn-line2);border-bottom:1px solid var(--dgn-line);border-radius:0;background:none}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip>div{padding:14px 22px;border-right:1px solid var(--dgn-line)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip>div:first-child{padding-left:0}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip>div:last-child{padding-right:0;border-right:0}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip span{font-family:var(--dgn-fd);font-stretch:108%;font-weight:700;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#d8d8de}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip strong{font-family:var(--dgn-fd);font-stretch:80%;font-weight:850;font-size:24px;letter-spacing:0;color:var(--dgn-gold)}
/* the four balances: kit figures in hairline tiles; the payable balance is the gold one */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metrics{gap:0;margin:0 0 26px;border-top:0;border-bottom:1px solid var(--dgn-line)}
/* a status notice between the rate strip and the balances keeps its own space */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip+.dgaf-notice{margin:22px 0}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-notice+.dgaf-metrics{border-top:1px solid var(--dgn-line2)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric{padding:22px 24px 20px;border:0;border-left:1px solid var(--dgn-line);border-radius:0;background:none}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric:first-child{padding-left:0;border-left:0}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric>span{font-family:var(--dgn-fd);font-stretch:112%;font-weight:700;font-size:11px;line-height:1.3;letter-spacing:.16em;text-transform:uppercase;color:var(--dgn-dim)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric>strong{padding:12px 0 8px;font-family:var(--dgn-fd);font-stretch:74%;font-weight:850;font-size:clamp(34px,3.2vw,48px);line-height:1;letter-spacing:-.01em;color:#fff}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric>small{font-size:12.5px;line-height:1.45;color:var(--dgn-muted)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric-featured>strong{color:var(--dgn-gold)}
/* payout progress */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-payout-progress .dgaf-section-heading>strong{font-family:var(--dgn-fd);font-stretch:92%;font-weight:800;font-size:16px;color:var(--dgn-gold)}
body.dgn-page[data-page="affiliates"] .dgaf progress{height:8px;border-radius:4px;background:rgba(255,255,255,.08)}
body.dgn-page[data-page="affiliates"] .dgaf progress::-webkit-progress-bar{background:rgba(255,255,255,.08);border-radius:4px}
body.dgn-page[data-page="affiliates"] .dgaf progress::-webkit-progress-value{background:var(--dgn-grad);border-radius:4px}
body.dgn-page[data-page="affiliates"] .dgaf progress::-moz-progress-bar{background:var(--dgn-grad);border-radius:4px}
/* the two-column row (referral link, wallet) and the mini metrics */
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-two-column{gap:22px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-two-column>.dgaf-card{height:calc(100% - 22px)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-mini-metrics{margin-top:22px;padding-top:18px;border-top:1px solid var(--dgn-line)}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-mini-metrics strong{font-family:var(--dgn-fd);font-stretch:80%;font-weight:850;font-size:30px;line-height:1;color:#fff}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-mini-metrics span{font-size:12.5px;color:var(--dgn-dim);margin-top:6px}
body.dgn-page[data-page="affiliates"] .dgaf .dgaf-mono{font-size:12.5px}
/* the terms at the foot of the dashboard: a panel of their own */
body.dgn-page[data-page="affiliates"] .dgn-af-dash .dgaf .dgaf-terms{margin-top:8px}

/* ---- wide ---- */
/* audit fix, 24 Sep 2026: the gold H1 line is now "Up to 25% commission.", so the H1 is one notch smaller beside the
   card (as on /about-us/, /setup-finder/ and /dowgold-signals/) and that line holds one line on desktops */
@media (min-width:1141px){
  body.dgn-page[data-page="affiliates"] .dgn-af-hero .dgn-h1{font-size:clamp(44px,4.4vw,64px)}
}
@media (min-width:1600px){
  body.dgn-page[data-page="affiliates"] .dgn-af-hero .dgn-h1{font-size:clamp(64px,4.1vw,80px)}
  body.dgn-page[data-page="affiliates"] .dgn-af-split{gap:104px}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar{padding:14px 0}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar__v{font-size:23px}
}

/* ---- tablets ---- */
@media (max-width:1140px){
  body.dgn-page[data-page="affiliates"] [id]{scroll-margin-top:156px}
  body.dgn-page[data-page="affiliates"] .dgn-af-split{grid-template-columns:minmax(0,1fr);gap:40px}
  body.dgn-page[data-page="affiliates"] .dgn-af-split__txt{max-width:720px}
  body.dgn-page[data-page="affiliates"] .dgn-af-facts{max-width:720px}
}
@media (max-width:1050px){
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric:nth-child(3){padding-left:0;border-left:0}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric:nth-child(n+3){border-top:1px solid var(--dgn-line)}
}

/* ---- phones ---- */
@media (max-width:720px){
  body.dgn-page[data-page="affiliates"] [id]{scroll-margin-top:80px}
  /* a button that does not fit beside its neighbour takes its own full-width row (wave 3 rule) */
  body.dgn-page[data-page="affiliates"] .dgn-cta-row .dgn-btn{min-width:max-content}
  body.dgn-page[data-page="affiliates"] .dgn-af-card__big{margin-top:12px}
  body.dgn-page[data-page="affiliates"] .dgn-af-card__u{font-size:13px}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar{grid-template-columns:minmax(0,1fr) 34px minmax(0,1.1fr) auto;column-gap:10px;padding:11px 0}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar__t{font-size:10.5px;letter-spacing:.1em}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar__r{font-size:13.5px}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar__v{font-size:18px}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar__v small{display:none}
  body.dgn-page[data-page="affiliates"] .dgn-af-why{margin-top:40px}
  body.dgn-page[data-page="affiliates"] .dgn-af-why>li{padding:24px 0}
  body.dgn-page[data-page="affiliates"] .dgn-af-how__cols{margin-top:36px}
  body.dgn-page[data-page="affiliates"] .dgn-af-fact,body.dgn-page[data-page="affiliates"] .dgn-af-fact:nth-child(even){padding:22px 0}
  body.dgn-page[data-page="affiliates"] .dgn-af-fact:nth-child(odd){padding-right:16px}
  body.dgn-page[data-page="affiliates"] .dgn-af-fact:nth-child(even){padding-left:16px}
  body.dgn-page[data-page="affiliates"] .dgn-af-fact dd b{font-size:clamp(30px,9vw,44px)}
  body.dgn-page[data-page="affiliates"] .dgn-af-fact dd span{font-size:12.5px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-card:not(.dgaf-terms),body.dgn-page[data-page="affiliates"] .dgn-af-plug--guide #dgaf-commission-guide,body.dgn-page[data-page="affiliates"] #dgaf-application{padding:20px 18px;border-radius:16px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-section-heading{flex-wrap:wrap;gap:10px 16px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-section-heading :is(h2,h3){font-size:21px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary{padding:18px 0;align-items:flex-start}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary>.dgaf-small{flex-direction:column-reverse;align-items:flex-end;gap:6px;max-width:96px;font-size:11.5px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms li{padding-left:40px;font-size:14px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms li::before{font-size:21px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-button{width:100%}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-inline-actions .dgaf-button{width:auto}
  body.dgn-page[data-page="affiliates"] .dgn-af-dash{padding-top:36px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-member-header{flex-direction:column;align-items:flex-start;gap:14px;margin-bottom:24px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip>div{padding:12px 14px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip>div:nth-child(odd){padding-left:0}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip>div:nth-child(even){padding-right:0;border-right:0}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric,body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric:nth-child(n){padding:16px 0;border-left:0;border-top:1px solid var(--dgn-line)}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric:first-child{border-top:0}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-metric>strong{font-size:36px}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-two-column{gap:0}
}
/* dashboard rate strip: at 2 x 2 on small phones "PROFESSIONAL" and its rate no longer fit one row; stack them */
@media (max-width:480px){
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-rate-strip>div{flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px}
}
@media (max-width:420px){
  body.dgn-page[data-page="affiliates"] .dgn-af-bar{grid-template-columns:minmax(0,1fr) 34px auto}
  body.dgn-page[data-page="affiliates"] .dgn-af-bar__g{display:none}
  body.dgn-page[data-page="affiliates"] .dgn-af-facts{grid-template-columns:minmax(0,1fr)}
  body.dgn-page[data-page="affiliates"] .dgn-af-fact,body.dgn-page[data-page="affiliates"] .dgn-af-fact:nth-child(n){padding:20px 0;border-left:0}
}

/* Audit fix, 24 Sep 2026: iOS Safari zooms the page when a field under 16px takes focus (the viewport meta has no
   maximum-scale). On phones and touch screens every text-type field on this page is 16px; desktops keep 15px. */
@media (max-width:720px),(pointer:coarse){
  html body.dgn-page[data-page="affiliates"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]),select,textarea){font-size:16px !important}
}
/* ---- reduced motion: the kit already stops every animation in .dgn-main; the bars start full ---- */
@media (prefers-reduced-motion:reduce){
  body.dgn-page[data-page="affiliates"] .dgn-af-bar__fg{animation:none;transform:none}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-button:is(:hover,:focus-visible){transform:none}
  body.dgn-page[data-page="affiliates"] .dgaf .dgaf-terms summary>.dgaf-small>span{transition:none}
}
