/* Affiliate page only. Loads after every other stylesheet. The kit does the rest (k-panel, ki-steps, ki-list). */

/* ---- The page opens on the earnings card: no banner, no breadcrumb, the title inside the card ---- */
.cl-content--affiliate .af-top{padding-block:clamp(12px,1.4vw,20px)}
.af-head{grid-area:head;min-width:0;text-align:center}
.af-title{margin:0;color:#fff;font-size:clamp(2.25rem,3.9vw,3.5rem);font-weight:500;line-height:1;letter-spacing:-.03em;text-wrap:balance}
.af-lede{margin:10px 0 0;color:var(--af-mute);font-size:clamp(1rem,1.25vw,1.125rem);line-height:1.35;text-wrap:balance}

/* without JavaScript the phone header has a plain link row under it */
@media (max-width:899px){
  html.no-js .cl-content--affiliate .af-top{padding-top:68px}
}

/* ---- Programme terms: a compact row under the card. The 15% and 10% cells are the homepage dials ---- */
.cl-content--affiliate .af-terms{padding-bottom:clamp(40px,4.4vw,64px)}
.af-card{padding-top:clamp(12px,1.4vw,20px)}
.cl-content--affiliate .af-card .k-numbers{--af-gauge:clamp(84px,7.4vw,104px);border-top:0}
.cl-content--affiliate .af-card .k-number{display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;padding:0 16px;border-bottom:0}
.cl-content--affiliate .af-card .k-number__v{display:grid;place-items:center;min-height:var(--af-gauge);font-size:calc(var(--af-gauge) * .36);font-weight:300;line-height:1;letter-spacing:-.03em}
.af-gauge{position:relative;width:var(--af-gauge);height:var(--af-gauge);flex:none}
.af-gauge svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
.cl-content--affiliate .af-card .af-gauge .k-number__v{position:absolute;inset:0;min-height:0;margin:0;padding-left:.04em;letter-spacing:-.06em;font-feature-settings:"tnum" 1,"lnum" 1}
.af-gauge__tr{fill:none;stroke:var(--rule-2);stroke-width:1;vector-effect:non-scaling-stroke}
.af-gauge__tk{fill:none;stroke:var(--rule-2);stroke-width:6;stroke-dasharray:1 28.217}
.af-gauge__tk--maj{stroke:currentColor;stroke-width:8;stroke-dasharray:1.4 146.25}
.af-gauge__arc{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.af-gauge__dot{transform-box:fill-box;transform-origin:center}
.af-gauge__dot circle:first-child{fill:var(--bg);stroke:currentColor;stroke-width:1}
.af-gauge__dot circle:last-child{fill:currentColor}
.cl-content--affiliate .af-card .k-number__l{margin-top:10px}
.cl-content--affiliate .af-card .k-number__t{margin-top:4px}
@media (max-width:899px){
  .cl-content--affiliate .af-card .k-numbers{--af-gauge:clamp(84px,24vw,104px);row-gap:20px}
  .cl-content--affiliate .af-card .k-number{padding:0 8px}
  .cl-content--affiliate .af-card .k-number:nth-child(n+3) .k-number__v{min-height:0}
}

/* ---- Earnings card ----
   The areas change, the markup does not. Default = the spinning rows, which is also the page without JavaScript (plain inputs
   and no controls). The dial layout further down needs a fine pointer and JavaScript. Width only decides one column or two.
   html.af-js is set in the head by template-affiliate.php, before first paint, so the card has its final shape from the start.
   It comes off again if the page has loaded and the controls never started: the card is then the plain example, with no gap. */
.af-calc{--af-mute:#A6A7AD;--af-ease:cubic-bezier(.2,.7,.2,1);
  display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);grid-template-rows:auto auto 1fr auto auto;
  grid-template-areas:"head head" "fields sum" "fields ." "fields split" "fields apply";
  gap:22px clamp(32px,4.6vw,68px);padding:clamp(24px,2.2vw,32px) 40px}
.af-sum{grid-area:sum;min-width:0}
.af-sum__l{font-size:12px;font-weight:500;line-height:1.35;letter-spacing:.08em;text-transform:uppercase;color:var(--af-mute)}
.af-total{margin-top:14px;font-size:calc(clamp(46px,6.8vw,98px)*var(--fit,1));font-weight:500;line-height:1;letter-spacing:-.02em;white-space:nowrap}
.af-note{margin-top:12px;color:rgba(255,255,255,.62);font-size:13px;line-height:1.45;text-wrap:balance}
.af-split{grid-area:split;margin:0;border-top:1px solid var(--rule)}
.af-split>div{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:13px 0;border-bottom:1px solid var(--rule);font-size:14px}
.af-split dt{color:var(--af-mute)}
.af-split dd{margin:0;white-space:nowrap}
.af-apply{grid-area:apply;display:flex;width:100%}
.af-nojs{grid-column:1/-1;color:var(--af-mute)}

/* Neue Montreal has no tabular figures, so tabular-nums does nothing here. These fixed cells are what stop a number shaking
   while it counts; affiliate.js eases each digit back to its true spacing once everything has stopped. */
.af-num{position:relative;display:inline-flex;align-items:baseline;justify-content:center;white-space:nowrap}
.af-num>i{display:inline-block;font-style:normal;text-align:center}
.af-num>.d{width:.6em}
.af-num>.p{width:.205em}
.af-num>.s{width:.24em}
.af-total .af-num>i{transition:transform .24s var(--af-ease)}
.af-total .af-num>.l{font-size:.5em;letter-spacing:.02em;align-self:center;margin-top:.1em}
.af-total .af-num>.s{width:.14em}
.af-cents{position:absolute;left:100%;bottom:.19em;margin-left:.05em;font-size:.5em;letter-spacing:0;white-space:nowrap;opacity:0;transition:opacity .24s var(--af-ease),transform .24s var(--af-ease)}

/* Field rows and value pills: tap a pill to type, as before */
.af-fields{grid-area:fields;display:grid;align-content:start;gap:22px;min-width:0;margin:0;padding:0;list-style:none}
.af-field{min-width:0}
.af-field__h{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.af-field__l{font-size:17px;line-height:1.3;transition:opacity .2s}
.af-pill{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:116px;height:48px;padding:0 18px;border-radius:var(--r-chip);box-shadow:inset 0 0 0 1px rgba(255,255,255,.32)}
.af-pill::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px #fff;opacity:0;transition:opacity .2s;pointer-events:none}
.af-pill__b{all:unset;box-sizing:border-box;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:inherit;cursor:text;font-size:16px;font-weight:500;-webkit-tap-highlight-color:transparent}
.af-pill__c{font-size:10.5px;font-weight:500;letter-spacing:.08em;color:var(--af-mute)}
.af-pill__i{all:unset;box-sizing:border-box;position:absolute;inset:0;width:100%;padding:0 16px;border-radius:inherit;text-align:center;font-size:16px;font-weight:500;color:#fff;caret-color:#fff;-moz-appearance:textfield;appearance:textfield}
.af-pill__i:focus{box-shadow:inset 0 0 0 1px #fff,0 0 0 4px rgba(255,255,255,.1)}
.af-pill__i::-webkit-outer-spin-button,.af-pill__i::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.af-pill__b[hidden],.af-pill__i[hidden]{display:none}
.af-field.is-on .af-pill::after{opacity:1}
.af-fields.has-on .af-field:not(.is-on) .af-field__l{opacity:.62}
html.af-kbd .af-pill__b:focus{outline:2px solid #fff;outline-offset:2px}
@media (hover:hover) and (pointer:fine){.af-pill:hover::after{opacity:.55}}
html:not(.af-js) .af-field[data-af-key="aov"] .af-pill__i{padding-left:44px;text-align:left}
html:not(.af-js) .af-total{white-space:normal;overflow-wrap:anywhere}  /* nothing fits the type here, so a long typed total wraps */
html:not(.af-js) .af-field[data-af-key="aov"] .af-pill::before{content:"AED";position:absolute;left:16px;font-size:10.5px;font-weight:500;letter-spacing:.08em;color:var(--af-mute)}

/* B: the spinning rows. A ring seen edge-on, like the focus ring of a lens. */
.af-spin{position:relative;display:none;height:108px;border-radius:var(--r-card);overflow:hidden;cursor:grab;touch-action:pan-y pinch-zoom;outline:none;
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;
  background:linear-gradient(90deg,#030304 0,#09090B 11%,#17181B 32%,#232428 50%,#17181B 68%,#09090B 89%,#030304 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.075),inset 0 1px 0 rgba(255,255,255,.1),inset 0 -22px 26px -22px rgba(0,0,0,.9);
  transition:transform .22s var(--af-ease)}
html.af-js .af-spin{display:block}
.af-spin canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.af-spin::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px rgba(255,255,255,.34),0 0 26px rgba(255,255,255,.07);opacity:0;transition:opacity .2s;pointer-events:none}
.af-field.is-on .af-spin{cursor:grabbing;transform:scale(1.008)}
.af-field.is-on .af-spin::after{opacity:1}
html.af-kbd .af-spin:focus{outline:2px solid #fff;outline-offset:3px}
.af-spin__m{position:absolute;left:50%;top:0;width:2px;height:20px;margin-left:-1px;border-radius:0 0 2px 2px;background:linear-gradient(180deg,#fff,#C9CBD1);transform-origin:50% 0;will-change:transform;pointer-events:none}
.af-spin__m::before{content:"";position:absolute;left:50%;top:-1px;width:10px;height:6px;margin-left:-5px;background:#fff;clip-path:polygon(0 0,100% 0,50% 100%)}

/* A: the dial. Its fine ticks and the light on them are drawn on the canvas; the beads are real, focusable sliders. */
.af-dial{grid-area:dial;position:relative;display:none;align-self:center;width:100%;aspect-ratio:1;touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.af-dial canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.af-dial__glow{position:absolute;inset:18%;border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.085),rgba(255,255,255,.03) 62%,rgba(255,255,255,0));opacity:.55;pointer-events:none}
.af-dial.can-grab{cursor:grab}
.af-dial.is-grab{cursor:grabbing}
.af-bead{position:absolute;left:0;top:0;height:var(--bead,38px);min-width:var(--bead,38px);display:grid;place-items:center;border-radius:999px;cursor:grab;touch-action:none;outline:none;
  color:var(--c-ink);font-size:max(9px,calc(var(--bead,38px)*.355));font-weight:500;line-height:1;letter-spacing:-.01em;
  background:radial-gradient(70% 52% at 40% 16%,rgba(255,255,255,.98),rgba(255,255,255,0) 100%),conic-gradient(from 205deg,#F4F5F7,#B4B6BD 16%,#E7E9EC 33%,#8F9198 52%,#D9DBE0 68%,#A2A4AB 84%,#F4F5F7);
  box-shadow:0 0 0 .5px rgba(255,255,255,.75),0 3px 10px rgba(0,0,0,.75),inset 0 -1px 2px rgba(0,0,0,.32);will-change:transform;-webkit-tap-highlight-color:transparent}
.af-bead::before{content:"";position:absolute;inset:-9px;border-radius:inherit}
.af-bead::after{content:"";position:absolute;inset:-6px;border-radius:inherit;border:1px solid rgba(255,255,255,.55);opacity:0;transform:scale(.78);transition:opacity .2s,transform .28s var(--af-ease);pointer-events:none}
.af-bead.is-on{cursor:grabbing}
.af-bead.is-on::after{opacity:1;transform:none}
html.af-kbd .af-bead:focus{outline:2px solid #fff;outline-offset:3px}
/* Hidden only until affiliate.js has started */
.af-calc:not(.is-ready) :is(.af-spin,.af-dial canvas,.af-bead){visibility:hidden}

/* The dial goes with a fine pointer, at any width. The total sits inside it. */
@media (pointer:fine){
  html.af-js .af-calc{grid-template-columns:minmax(0,1.14fr) minmax(0,1fr);grid-template-rows:auto 1fr auto auto auto 1fr;
    grid-template-areas:"head head" "dial ." "dial fields" "dial split" "dial apply" "dial .";row-gap:20px}
  html.af-js .af-spin{display:none}
  html.af-js .af-dial{display:block}
  html.af-js .af-sum{position:relative;z-index:1;grid-area:dial;place-self:center;width:var(--free,300px);display:grid;justify-items:center;text-align:center;pointer-events:none}
  html.af-js .af-sum__l{max-width:18em}
  html.af-js .af-total{margin-top:calc(var(--free,300px)*.03);font-size:calc(var(--free,300px)*.205*var(--fit,1))}
  html.af-js .af-note{margin-top:calc(var(--free,300px)*.03);max-width:21em}
  html.af-js .af-fields{gap:0}
  html.af-js .af-field{border-bottom:1px solid var(--rule)}
  html.af-js .af-field:first-child{border-top:1px solid var(--rule)}
  html.af-js .af-field__h{min-height:clamp(58px,8vh,72px);margin:0}
}
/* Dial and title on the first screen: the dial gives way to the window's height, never below 400 px */
@media (pointer:fine) and (min-width:900px){
  html.af-js .af-dial{justify-self:center;width:min(100%,max(400px,calc(100svh - 104px - 40px - 2 * clamp(24px,2.2vw,32px) - clamp(2.25rem,3.9vw,3.5rem) - 60px)))}
}

/* ---- Tablet and phone: one column ---- */
@media (max-width:899px){
  .af-calc{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"head" "sum" "fields" "split" "apply";gap:16px;padding:20px 16px}
  .af-head{text-align:left}
  .af-title{font-size:clamp(1.625rem,8.7vw,2.25rem)}
  .af-lede{margin-top:8px;font-size:clamp(.875rem,3.9vw,1rem)}
  .af-sum{padding-bottom:2px}
  .af-total{margin-top:10px;font-size:calc(66px*var(--fit,1))}
  .af-fields{gap:12px}
  .af-field__h{margin-bottom:6px}
  .af-field__l{font-size:15px}
  .af-pill{min-width:104px;height:38px}
  .af-pill__b::before{content:"";position:absolute;inset:-3px 0}
  .af-spin{height:80px}
  .af-split{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;border-bottom:1px solid var(--rule)}
  .af-split>div{display:block;padding:10px 0 11px;border-bottom:0;font-size:13px}
  .af-split dd{margin-top:1px;font-size:15px}
}
@media (pointer:fine) and (max-width:899px){
  html.af-js .af-calc{grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-template-areas:"head" "fields" "dial" "split" "apply";gap:0}
  html.af-js .af-head{margin-bottom:16px}
  html.af-js .af-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  html.af-js .af-field,html.af-js .af-field:first-child{border:0}
  html.af-js .af-field__h{flex-direction:column;align-items:stretch;justify-content:space-between;gap:8px;min-height:0;height:100%;margin:0}
  html.af-js .af-field__l{font-size:12px;line-height:1.25;text-wrap:balance}
  html.af-js .af-pill{min-width:0;width:100%;height:44px;padding:0 6px}
  html.af-js .af-pill__b{gap:4px;font-size:15px}
  html.af-js .af-pill__c{font-size:9px;letter-spacing:.06em}
  html.af-js .af-dial{justify-self:center;width:min(calc(100% + 22px),540px);max-width:540px;margin:10px -11px 8px}
  html.af-js .af-sum{padding:0}
  html.af-js .af-sum__l{font-size:10px;line-height:1.25;letter-spacing:.07em;max-width:13em}
  html.af-js .af-note{font-size:11px;line-height:1.28;max-width:14.5em}
  html.af-js .af-apply{margin-top:16px}
}
/* phone on its side: the whole dial stays on screen */
@media (pointer:fine) and (max-width:899px) and (orientation:landscape){
  html.af-js .af-dial{width:min(calc(100vh - 24px),540px)}
}

/* ---- Who can join: at full width (template-affiliate.php), heading centred on phones with the others ---- */
@media (max-width:899px){
  .cl-content--affiliate .k-sec-head__title{text-align:center}
}

/* ---- Closing: one centred line and the button, on the white page ---- */
.af-end{display:grid;justify-items:center;text-align:center}
.af-end__h{margin-bottom:clamp(20px,2.2vw,28px);font-size:clamp(1.75rem,1.15rem + 1.8vw,2.75rem);font-weight:500;line-height:1.08;letter-spacing:-.02em}

/* ---- How it works: four circle nodes on one line ---- */
@media (max-width:1099px){
  .cl-content--affiliate [aria-labelledby="af-process"]{padding-block:52px 50px}
  .cl-content--affiliate [aria-labelledby="af-process"] .k-sec-head{margin-bottom:22px}
  .cl-content--affiliate [aria-labelledby="af-process"] .k-sec-head__title{grid-column:1 / -1;text-align:center}
  .cl-content--affiliate .ki-steps{position:relative;grid-template-columns:repeat(4,minmax(0,1fr));gap:0}
  .cl-content--affiliate .ki-steps::before{content:"";position:absolute;left:12.5%;right:12.5%;top:24px;height:1px;background:var(--rule-2);transform-origin:left center}
  .cl-content--affiliate .ki-steps>li{align-items:center;gap:0;min-width:0;padding:0 4px;text-align:center;background:none;box-shadow:none}
  .cl-content--affiliate .ki-steps>li::before{position:relative;z-index:1;width:48px;height:48px;margin:0 0 12px;background:#fff;box-shadow:0 0 0 1px var(--rule-2)}
  .cl-content--affiliate .ki-steps__t{min-height:2.4em;font-size:.8125rem;font-weight:500;line-height:1.2;letter-spacing:-.005em}
  .cl-content--affiliate .ki-steps__d{margin-top:4px;font-size:.75rem;line-height:1.25}
}

/* ---- 'Explore the catalogue' goes quiet on this page (the swap is at the end of template-affiliate.php) ---- */
.cl-content--affiliate .c3-root.b3-ftr .b3-ftr__cta{display:flex;justify-content:center;padding:22px 0 26px}
.cl-content--affiliate .c3-root.b3-ftr .af-quiet{display:inline-flex;align-items:center;gap:8px;min-height:44px;
  font-size:var(--t-small);font-weight:400;line-height:1.3;color:#a6a7ad;
  text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:5px;transition:color .2s}
.cl-content--affiliate .c3-root.b3-ftr .af-quiet svg{width:14px;height:14px;flex:none}
@media (hover:hover) and (pointer:fine){
  .cl-content--affiliate .c3-root.b3-ftr .af-quiet:hover{color:#fff}
}

/* ---- Motion: cheap, once, and never holds back text or buttons ---- */
@media (prefers-reduced-motion:no-preference){
  /* The terms dials and the phone step line draw once when they arrive (affiliate.js adds af-in). Without html.af-js they are simply drawn. */
  html.af-js .af-gauge__arc{stroke-dasharray:var(--len);stroke-dashoffset:var(--len);transition:stroke-dashoffset .7s cubic-bezier(.2,.7,.2,1) var(--dl,0s)}
  html.af-js .af-in .af-gauge__arc{stroke-dashoffset:0}
  html.af-js .af-gauge__dot{opacity:0;transform:scale(.6);transition:opacity .25s ease var(--dd,.5s),transform .25s ease var(--dd,.5s)}
  html.af-js .af-in .af-gauge__dot{opacity:1;transform:none}
  html.af-js .ki-steps::before{transform:scaleX(0);transition:transform .8s cubic-bezier(.2,.7,.2,1)}
  html.af-js .ki-steps.af-in::before{transform:none}
}
@media (prefers-reduced-motion:reduce){
  .af-spin,.af-spin::after,.af-bead::after,.af-pill::after,.af-field__l,.af-total .af-num>i,.af-cents{transition:none}
}
