/* /plus-ultra/affiliates/: the affiliate programme page. Loaded after landing.css, household-file.css and film.css,
   so it reads their tokens (navy, ink, paper, line) and reuses the nav, the film player, the compare chart and the
   note references. Square corners throughout. Gold marks what's good for the partner and the family, red marks
   a charge or a warning, navy is neutral. */
:root{--aff-gold:#E9B526;--aff-gold-deep:#B98A0E;--aff-gold-tint:#f4e8b7;--aff-red:#E12B38;--aff-platinum:#E6E7EA;--aff-gutter:40px}

.aff-page{background:var(--paper)}
.aff-skip{position:absolute;top:6px;left:12px;z-index:60;display:inline-flex;align-items:center;min-height:44px;padding:10px 16px;background:var(--navy);color:#fff;transform:translateY(-180%)}
.aff-skip:focus{transform:translateY(0)}
.aff-main:focus{outline:none}
.aff-nav-link{text-decoration:underline;text-underline-offset:.25em}

.aff-nowrap{white-space:nowrap}
.aff-section-title{text-wrap:balance;margin:0 0 28px;font-size:clamp(30px,3.1vw,42px);color:var(--ink)}
.aff-inline-link{text-decoration:underline;text-underline-offset:.2em;font-weight:600}
.aff-inline-link:hover{color:var(--red-deep)}

/* The one action: flat gold, navy words. The film's Watch button follows it, without film.css's gradient. */
.aff-join{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:56px;padding:15px 26px;background:var(--aff-gold);border:1px solid var(--aff-gold-deep);border-radius:0;color:var(--navy);font:600 17px/1.25 var(--sans);text-decoration:none;transition:background .15s}
.aff-join:hover{background:#F5C842}
.aff-join:focus-visible{outline:3px solid var(--navy);outline-offset:4px}
.aff-page .pu-film__play,.aff-page .pu-teaser__play,.aff-page .pu-form__submit{background:var(--aff-gold);border-color:var(--aff-gold-deep);box-shadow:none;color:var(--navy)}
.aff-page .pu-film__play:hover,.aff-page .pu-teaser__play:hover,.aff-page .pu-form__submit:hover{background:#F5C842;filter:none}

/* Hero: the words on the left, the film on the right. */
.aff-hero{background:var(--paper);border-bottom:1px solid var(--line)}
.aff-hero__inner{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:56px;align-items:start;padding-top:64px;padding-bottom:64px}
.aff-hero__title{margin:0 0 24px;font-size:clamp(42px,4.6vw,62px);line-height:1.08;color:var(--navy);text-wrap:balance}
.aff-hero__lede{max-width:480px;margin:0 0 32px;font-size:20px;line-height:1.55;color:var(--ink2)}
.aff-hero__small{margin:14px 0 0;font-size:15px;line-height:1.5;color:var(--muted)}
.aff-hero__film{margin:0}
.aff-hero__film .pu-film__frame{margin:0}
.aff-film__title{margin:0 0 14px;font-size:26px;line-height:1.25;color:var(--navy)}
.aff-film__body{margin:14px 0 0;font-size:16px;line-height:1.55;color:var(--ink2)}
/* The film form (decision 293): the silent teaser, then name, email and the optional tick. The player replaces both. */
.aff-film__gate{display:grid;gap:22px}
.aff-film__gate[hidden],.aff-film__player[hidden]{display:none}
.aff-film__player{margin:0}
.aff-film__scope{margin:-12px 0 0;font-size:13px;line-height:1.45;color:var(--muted)}
.aff-film-form{gap:14px}
.aff-film-form .pu-form__submit{width:auto;justify-self:start;margin-top:4px}
.aff-film-form__note{margin:0;font-size:14px;line-height:1.5;color:var(--muted)}
.aff-film__status{margin:14px 0 0;font-size:15px;line-height:1.5;color:var(--ink2)}
.aff-film__status:empty{display:none}

/* How Plus Ultra works: the hierarchy of expat needs leads, then the smaller money flow, then the no-promise line.
   The pyramid is one trapezoid cut into seven bands. Each band clips itself to its slice: with band height --h, gap --g
   and an apex --apex wide (a share of the base), a band's side sits (1 - apex)/2 of the base in at the top of the
   stack, in proportion to its height, so all seven sides run on one slope. The numbers are unitless so calc can
   divide by them. */
.aff-how{background:#fff;padding:72px 0 76px;border-bottom:1px solid var(--line)}
.aff-pyramid{--h:76;--g:4;--apex:.3;--role-w:250px;--H:calc(7 * var(--h) + 6 * var(--g));--run:calc((1 - var(--apex)) * 50%);margin:0 0 56px}
.aff-pyramid__title{margin:0 0 28px;font-size:26px;line-height:1.25;color:var(--ink)}
.aff-pyramid__body{display:grid;grid-template-columns:minmax(0,820px) var(--role-w);gap:0 28px}
.aff-pyramid__tiers{grid-area:1/1;display:flex;flex-direction:column-reverse;gap:calc(var(--g) * 1px);margin:0;padding:0;list-style:none}
.aff-tier{
  --xb:calc(var(--run) * (var(--i) - 1) * (var(--h) + var(--g)) / var(--H));
  --xt:calc(var(--run) * ((var(--i) - 1) * (var(--h) + var(--g)) + var(--h)) / var(--H));
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  height:calc(var(--h) * 1px);box-sizing:border-box;padding:0 calc(var(--xt) + 12px);
  background:var(--fill);color:var(--text);text-align:center;
  clip-path:polygon(var(--xb) 100%,calc(100% - var(--xb)) 100%,calc(100% - var(--xt)) 0,var(--xt) 0)
}
.aff-tier__name,.aff-tier__note,.aff-tier__role{position:relative;z-index:1}
.aff-tier__name{font-size:19px;font-weight:700;line-height:1.2}
.aff-tier__note{font-size:15px;font-weight:500;line-height:1.3;text-wrap:balance}
/* Wide screens show the roles as brackets, so each band keeps its role for screen readers only. */
.aff-tier__role{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.aff-tier--immigration{--fill:#E12B38;--text:#fff}
.aff-tier--taxes{--fill:#8E1F3A;--text:#fff}
.aff-tier--income{--fill:#1A2240;--text:#fff}
.aff-tier--language{--fill:#46506E;--text:#fff}
.aff-tier--community{--fill:#E4E6EA;--text:#1A2240}
.aff-tier--giving{--fill:#E9B425;--text:#1A2240}
/* Culture is white with a navy hairline on all four sides: a navy band with a white band 1px inside it. --edge is
   the horizontal step that keeps the hairline 1px wide across the slope. */
.aff-tier--culture{--fill:var(--navy);--text:var(--navy);--edge:1.3px}
.aff-tier--culture:before{
  content:'';position:absolute;inset:1px 0;background:#fff;
  --xb1:calc(var(--run) * ((var(--i) - 1) * (var(--h) + var(--g)) + 1) / var(--H));
  --xt1:calc(var(--run) * ((var(--i) - 1) * (var(--h) + var(--g)) + var(--h) - 1) / var(--H));
  clip-path:polygon(calc(var(--xb1) + var(--edge)) 100%,calc(100% - var(--xb1) - var(--edge)) 100%,calc(100% - var(--xt1) - var(--edge)) 0,calc(var(--xt1) + var(--edge)) 0)
}
/* The brackets lie over the pyramid on its rows, top row first, and each stands 14px beside the right-hand corner of
   its lowest tier, so they step in with the slope. Labels run on into the column beside the pyramid. */
.aff-pyramid__roles{grid-area:1/1;position:relative;z-index:1;display:grid;grid-template-rows:repeat(7,calc(var(--h) * 1px));row-gap:calc(var(--g) * 1px);margin:0;padding:0;list-style:none}
.aff-role{display:flex;align-items:center;gap:12px;padding-left:calc(100% - var(--run) * (var(--from) - 1) * (var(--h) + var(--g)) / var(--H) + 14px)}
.aff-role:before{content:'';flex:none;align-self:stretch;width:12px;margin-block:8px;border:1px solid var(--navy);border-left:0}
.aff-role__label{flex:none;width:max-content;max-width:calc(var(--role-w) - 30px);font-size:15px;font-weight:600;line-height:1.3;color:var(--navy)}
.aff-role--included{grid-row:6/8}
.aff-role--benefits{grid-row:3/6}
.aff-role--yours{grid-row:2/3}
.aff-role--began{grid-row:1/2}
.aff-pyramid__caption{max-width:820px;margin-top:28px}
.aff-pyramid__line{margin:0 0 14px;font-size:19px;line-height:1.55;color:var(--ink)}
.aff-pyramid__note{margin:0 0 4px;font-size:14px;line-height:1.5;color:var(--muted)}
/* A one-off build from the base up once the pyramid scrolls in (script below). Without the script, or with reduced
   motion, the pyramid simply shows. */
.aff-pyramid--pending .aff-tier,.aff-pyramid--pending .aff-role{opacity:0}
.aff-pyramid--build .aff-tier{animation:aff-tier-in .24s cubic-bezier(.2,.7,.3,1) both;animation-delay:calc((var(--i) - 1) * 60ms)}
.aff-pyramid--build .aff-role{animation:aff-role-in .3s ease-out .3s both}
@keyframes aff-tier-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@keyframes aff-role-in{from{opacity:0}to{opacity:1}}
.aff-money{max-width:900px;margin:0;padding-top:36px;border-top:1px solid var(--line)}
.aff-money__title{margin:0 0 20px;font-size:20px;line-height:1.3;color:var(--ink)}
/* The money flow: three parties on one line with the return path under them. Column centres feed the return bracket:
   1fr + 1.3fr + 1fr + 1.6fr + 1fr = 5.9fr, so the outer centres sit 0.5/5.9 = 8.47% in. */
.aff-flow{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr) minmax(0,1.6fr) minmax(0,1fr);align-items:center;margin:0}
.aff-node{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;min-height:52px;padding:10px 8px;border:2px solid var(--navy);background:#fff;color:var(--navy);font-size:15px;font-weight:600;line-height:1.25;text-align:center}
.aff-node--pu{background:var(--navy);color:#fff}
.aff-edge{position:relative;align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:0 14px;text-align:center;font-size:14px;line-height:1.4;color:var(--ink2)}
.aff-edge__label{display:block;padding-bottom:10px;border-bottom:2px solid var(--navy);position:relative}
.aff-edge__label:after{content:'';position:absolute;right:-2px;bottom:-7px;border-left:11px solid var(--navy);border-top:6px solid transparent;border-bottom:6px solid transparent}
.aff-edge__back{display:block;position:relative;margin-top:8px;padding-top:8px;border-top:2px dashed var(--muted);font-size:14px;color:var(--muted)}
.aff-edge__back:before{content:'';position:absolute;left:-2px;top:-7px;border-right:11px solid var(--muted);border-top:6px solid transparent;border-bottom:6px solid transparent}
.aff-return{grid-column:1/-1;position:relative;height:40px}
.aff-return__line{position:absolute;left:8.47%;right:8.47%;top:0;bottom:0;border:2px dashed var(--navy);border-top:0}
.aff-return__line:before{content:'';position:absolute;left:-8px;top:-2px;border-bottom:11px solid var(--navy);border-left:6px solid transparent;border-right:6px solid transparent}
.aff-return__label{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:10px;margin:10px 0 0;font-size:15px;color:var(--ink2);text-align:center}
.aff-return__swatch{flex:none;width:26px;border-top:2px dashed var(--navy)}
.aff-how__close{max-width:900px;margin:28px 0 0;font-size:17px;line-height:1.6;color:var(--ink)}

/* The rules: the disclosure and its paragraph beside the landing's symbol chart with three columns. */
.aff-rules{padding:72px 0 64px;background:#fff;border-block:1px solid var(--line)}
.aff-rules__grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:56px;align-items:start}
.aff-rules__disclosure{max-width:820px;margin:0 0 18px;padding-left:20px;border-left:4px solid var(--aff-gold);font-size:22px;font-weight:600;line-height:1.45;color:var(--navy)}
.aff-rules__body{max-width:760px;margin:0;font-size:18px;line-height:1.6;color:var(--ink2)}
.aff-rules__aside{max-width:760px;margin:28px 0 0;font-size:16px;line-height:1.55;color:var(--ink2)}
.aff-compare-table thead td{width:50%}

/* Trust: a dated strip on one rule. */
.aff-trust{padding:64px 0;background:var(--paper)}
.aff-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 40px;margin:0;padding:0;list-style:none;border-top:2px solid var(--navy)}
.aff-strip__item{position:relative;padding-top:24px}
.aff-strip__item:before{content:'';position:absolute;left:0;top:-7px;width:12px;height:12px;background:var(--navy)}
.aff-strip__when{display:block;margin-bottom:6px;font-size:15px;font-weight:700;color:var(--red-deep);font-variant-numeric:tabular-nums}
.aff-strip__what{display:block;font-size:18px;line-height:1.45;color:var(--ink)}

/* What you earn, set as a receipt. */
.aff-terms{padding:72px 0;background:var(--quiet)}
.aff-receipt{display:grid;grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);gap:0 48px;align-items:start;padding:32px 36px 24px;background:#fff;border:1px solid var(--line);font-variant-numeric:tabular-nums}
.aff-receipt__sum{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 16px;margin:0;padding-top:6px;font-size:40px;font-weight:600;line-height:1.1;color:var(--ink)}
.aff-receipt__op{color:var(--muted);font-weight:400}
.aff-receipt__total{padding:2px 12px;background:var(--aff-gold-tint);color:var(--navy);font-weight:700}
.aff-receipt__lines,.aff-receipt__terms{grid-column:2}
.aff-receipt__lines{margin:0;padding:0;list-style:none;border-top:2px solid var(--navy)}
.aff-receipt__line{padding:12px 0;border-bottom:1px dashed #b9bcc3;font-size:16px;line-height:1.5;color:var(--ink2)}
.aff-receipt__line--reward{color:var(--ink);font-weight:600}
.aff-receipt__line--zero{border-bottom:0}
.aff-receipt__terms{margin:14px 0 0;padding-top:14px;border-top:1px solid var(--line);font-size:15px}

/* Join: one button on navy. */
.aff-join-band{padding:56px 0;background:var(--navy);color:#fff}
.aff-join-band__inner{display:flex;align-items:center;justify-content:space-between;gap:24px 48px;flex-wrap:wrap}
.aff-join-band__copy{max-width:620px}
.aff-join-band .aff-section-title{margin-bottom:12px;color:#fff}
.aff-join-band__who{margin:0;font-size:17px;line-height:1.55;color:#d0d7e2}
.aff-join-band :focus-visible{outline-color:var(--aff-gold)}
.aff-join-band .aff-inline-link:hover{color:#fff}

.aff-notes{padding:36px 0 28px;background:var(--paper)}
.aff-notes__title{margin:0 0 10px;font:600 15px/1.4 var(--sans);letter-spacing:0;color:var(--ink)}
.aff-notes__list{margin:0;padding-left:20px;font-size:14px;line-height:1.55;color:var(--muted)}
.aff-notes__item{margin-bottom:6px}
.aff-notes__item:focus{outline:2px solid var(--navy);outline-offset:3px}
.aff-footer{border-top:1px solid var(--line)}
.aff-footer .sf-legal{border-top:0}
.aff-footer .sf-legal a{text-decoration:underline}

@media(max-width:1000px){
  .aff-receipt{grid-template-columns:1fr;max-width:640px}
  .aff-receipt__lines,.aff-receipt__terms{grid-column:1}
  .aff-receipt__sum{margin-bottom:18px;padding:0 0 18px;border-bottom:2px solid var(--navy)}
  .aff-receipt__lines{border-top:0}
  .aff-hero__inner{grid-template-columns:1fr;gap:36px;padding-top:44px;padding-bottom:48px}
  .aff-hero__copy{max-width:640px}
  .aff-rules__grid{grid-template-columns:1fr;gap:36px}
  .aff-pyramid{--h:90;--apex:.32;--role-w:190px}
  .aff-tier--culture{--edge:1.05px}
}
/* Phones: the brackets give way to a tag in each band, and the bands grow taller to hold it. */
@media(max-width:720px){
  .aff-pyramid{--h:86;--apex:.48;margin-bottom:44px}
  .aff-pyramid__body{grid-template-columns:minmax(0,1fr)}
  .aff-pyramid__roles{display:none}
  .aff-tier{padding:0 calc(var(--xt) + 4px)}
  .aff-tier--culture{--edge:1px}
  .aff-tier__name{font-size:16px}
  .aff-tier__note{font-size:13px;line-height:1.25}
  .aff-tier__role{position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal;margin-top:4px;padding:1px 6px;background:var(--chip);font-size:13px;font-weight:600;line-height:1.3}
  .aff-tier--immigration,.aff-tier--taxes,.aff-tier--language{--chip:rgba(26,34,64,.34)}
  .aff-tier--community,.aff-tier--culture{--chip:rgba(26,34,64,.09)}
  .aff-tier--giving{--chip:rgba(255,255,255,.55)}
  .aff-tier--income{--chip:rgba(255,255,255,.14)}
  .aff-pyramid__line{font-size:17px}
}
/* The narrowest phones wrap the apex's tag onto a second line. */
@media(max-width:380px){.aff-pyramid{--h:96}}
/* Phones: the flow stands up, and the return path runs up its right-hand side. */
@media(max-width:760px){
  .aff-flow{display:block;padding-right:34px}
  .aff-node{min-height:56px;justify-content:flex-start;padding:12px 16px;text-align:left}
  .aff-edge{display:block;margin-left:22px;padding:14px 0 18px 22px;border-left:2px solid var(--navy);text-align:left}
  .aff-edge:after{content:'';position:absolute;left:-8px;bottom:-1px;border-top:11px solid var(--navy);border-left:6px solid transparent;border-right:6px solid transparent}
  .aff-edge__label{padding:0;border:0}
  .aff-edge__label:after{content:none}
  .aff-edge__back{margin-top:8px;padding:0 0 0 12px;border-top:0;border-left:2px dashed var(--muted)}
  .aff-edge__back:before{content:none}
  .aff-return{position:absolute;top:28px;bottom:62px;right:0;width:34px;height:auto}
  .aff-return__line{left:0;right:8px;border:2px dashed var(--navy);border-left:0}
  .aff-return__line:before{left:-2px;top:-7px;border:0;border-right:11px solid var(--navy);border-top:6px solid transparent;border-bottom:6px solid transparent}
  .aff-return__label{justify-content:flex-start;margin-top:14px;text-align:left}
  .aff-compare .compare-legend{display:flex;flex-wrap:wrap;gap:8px 20px}
  .aff-strip{grid-template-columns:1fr;gap:0;margin-left:5px;border-top:0;border-left:2px solid var(--navy)}
  .aff-strip__item{padding:0 0 22px 24px}
  .aff-strip__item:before{left:-7px;top:4px}
  .aff-compare-table tr{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  :root{--aff-gutter:16px}
  .wrap{padding-inline:16px}
  .nav .wrap{padding:14px 16px}
  .aff-hero__inner{padding-top:32px;padding-bottom:36px;gap:28px}
  .aff-hero__title{font-size:40px}
  .aff-hero__lede{font-size:18px;margin-bottom:24px}
  .aff-hero .aff-join{width:100%;justify-content:space-between}
  .aff-film-form .pu-form__submit{width:100%;justify-self:stretch}
  .aff-film-form .pu-form__pair{grid-template-columns:1fr;gap:14px}
  .aff-film__title{font-size:23px}
  .aff-section-title{font-size:30px;margin-bottom:22px}
  .aff-how,.aff-rules,.aff-terms{padding:48px 0}
  .aff-trust{padding:48px 0 30px}
  .aff-rules__disclosure{font-size:19px;padding-left:16px}
  .aff-rules__body{font-size:17px}
  .aff-receipt{padding:20px 16px 16px}
  .aff-receipt__sum{font-size:28px;gap:4px 12px}
  .aff-join-band{padding:44px 0}
  .aff-join-band .aff-join{width:100%;justify-content:space-between}
}
@media(prefers-reduced-motion:reduce){.aff-join{transition:none}.aff-pyramid--build .aff-tier,.aff-pyramid--build .aff-role{animation:none}}
@media print{.aff-pyramid--pending .aff-tier,.aff-pyramid--pending .aff-role{opacity:1}}
@media(forced-colors:active){
  .aff-join,.aff-page .pu-film__play{background:ButtonFace;color:ButtonText;border-color:ButtonText}
  .aff-node,.aff-node--pu{background:Canvas;color:CanvasText;border-color:CanvasText}
  .aff-strip__item:before{background:CanvasText}
}
