/* =========================================================
   Sanguine Capital — v3 page layer (loaded LAST on every page)
   Turns each page's own hero into the cinematic hero (dark or
   light theme, both with the "Market Pulse" wallpaper) and the
   rest of the page into one rounded light "sheet" that slides
   over it — without touching the page's layout or copy.
   ========================================================= */
.pk,.fpx-page,.ip-page,.rp-page,.rk-page{background:transparent!important;overflow-x:clip!important}

/* ---------- display type ---------- */
h1,h2,.h2{font-family:var(--display)!important;font-weight:600!important;letter-spacing:-.032em!important;word-spacing:.06em}
h1{line-height:.98!important}
h2{line-height:1.03!important}
.pk h1,.pk h2{font-family:var(--display)!important}

/* ---------- cinematic hero (every page) ---------- */
:is(.hero,.pk-hero,.fpx-hero,.ip-hero,.rp-hero,.rk-hero){position:relative;isolation:isolate;overflow:hidden;color:var(--fg)}
html[data-theme=dark] :is(.hero,.pk-hero,.fpx-hero,.ip-hero,.rp-hero,.rk-hero),html .v3-hero.v3-dark-hero{background:radial-gradient(1000px 640px at 82% -12%,rgba(46,107,214,.42),transparent 62%),radial-gradient(820px 620px at -6% 112%,rgba(61,245,165,.16),transparent 62%),#05070C!important}
html[data-theme=light] :is(.hero,.pk-hero,.fpx-hero,.ip-hero,.rp-hero,.rk-hero):not(.v3-dark-hero){background:radial-gradient(1000px 640px at 82% -12%,rgba(46,107,214,.14),transparent 62%),radial-gradient(820px 620px at -6% 112%,rgba(0,184,96,.1),transparent 62%),#F7F8FA!important}
canvas.v3-wall{-webkit-mask-image:linear-gradient(180deg,#000 70%,transparent);mask-image:linear-gradient(180deg,#000 70%,transparent)}
.v3-hgrid{position:absolute;inset:0;z-index:-1;pointer-events:none;--gl:rgba(255,255,255,.05);background-image:linear-gradient(var(--gl) 1px,transparent 1px),linear-gradient(90deg,var(--gl) 1px,transparent 1px);background-size:76px 76px;background-position:-1px -1px;-webkit-mask:radial-gradient(ellipse 72% 68% at 62% 30%,#000 0%,transparent 74%);mask:radial-gradient(ellipse 72% 68% at 62% 30%,#000 0%,transparent 74%)}
html[data-theme=light] .v3-hero:not(.v3-dark-hero) .v3-hgrid{--gl:rgba(11,26,47,.05)}
.v3-hgrid::after{content:"";position:absolute;inset:0;background:var(--grain);opacity:.05;mix-blend-mode:overlay}
html.v3-sheets .v3-hero{position:sticky;top:var(--hero-top,0px);z-index:0}
.v3-hero::before,.v3-hero::after{display:none!important}
.v3-hero .blob,.v3-hero .pk-blob,.v3-hero .hv-blob,.v3-hero .aurora,.v3-hero canvas.net{display:none!important}
.v3-lightsurf{--fg:#0B1220;--fg-2:#4A5363;--fg-3:#7B8494;--surf:#FFFFFF;--surf-2:#F3F4F7;--surf-3:#E9EBF0;--stroke:rgba(11,18,32,.09);--stroke-2:rgba(11,18,32,.18);--inv:#0B1220;--inv-fg:#FFFFFF;--acc:#00874F;--acc-2:#0048A8;--grad:linear-gradient(100deg,#0048A8 0%,#0088B8 48%,#00A35A 100%);color:#0E1626}

/* dark theme: hero text contrast + glass furniture (classes set by motion.js) */
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) h1,:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) h1.v3-ondark-2{color:#F2F5FA!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .sub{color:rgba(242,245,250,.68)}
:is(html[data-theme=dark],.v3-dark-hero) .v3-ondark,html[data-theme=dark] .v3-ondark{color:#F2F5FA!important}
:is(html[data-theme=dark],.v3-dark-hero) .v3-ondark-2,html[data-theme=dark] .v3-ondark-2{color:rgba(242,245,250,.68)!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .crumb{color:rgba(242,245,250,.42)!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .crumb a{color:rgba(242,245,250,.66)!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .crumb a:hover{color:#fff!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .crumb span::before{color:rgba(255,255,255,.22)!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .chips span:not(.v3-lightsurf *),:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .pk-chip:not(.v3-lightsurf *){background:rgba(255,255,255,.05)!important;border-color:rgba(255,255,255,.13)!important;color:rgba(242,245,250,.86)!important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .chips span:not(.v3-lightsurf *)::before{background:#3DF5A5!important;box-shadow:0 0 8px #3DF5A5}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .stat{background:rgba(255,255,255,.04)!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:18px!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .stat b{color:#F2F5FA!important;font-family:var(--display)!important;letter-spacing:-.03em}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .stat span{color:rgba(242,245,250,.6)!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) :is(.glass,.dash,.vis>div,.tag-chip){box-shadow:0 40px 90px -36px rgba(0,0,0,.85)}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .pk-btn:not(.pk-bg):not(.pk-g):not(.v3-lightsurf *){background:#F2F5FA!important;color:#05070C!important;border-color:#F2F5FA!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .pk-bg:not(.v3-lightsurf *){background:rgba(255,255,255,.05)!important;color:#F2F5FA!important;border:1px solid rgba(255,255,255,.2)!important}
:is(html[data-theme=dark] .v3-hero,.v3-hero.v3-dark-hero) .pk-ey{color:#3DF5A5!important}
.v3-hero .pk-btn{border-radius:999px!important}
/* light theme: soft depth for the hero cards */
html[data-theme=light] .v3-hero:not(.v3-dark-hero) :is(.glass,.dash,.vis>div,.tag-chip){box-shadow:0 30px 70px -36px rgba(11,26,47,.35)}
html[data-theme=light] .v3-hero:not(.v3-dark-hero) .stat{background:rgba(255,255,255,.7)!important;border:1px solid rgba(11,18,32,.08)!important;border-radius:18px!important}
html[data-theme=light] .v3-hero:not(.v3-dark-hero) .stat b{font-family:var(--display)!important;letter-spacing:-.03em}

/* accent words in hero titles: italic serif in the theme gradient (motion.js adds .v3-accent / .v3-glowtext) */
.v3-accent{font-family:var(--serif)!important;font-style:italic!important;font-weight:400!important;letter-spacing:-.012em!important;background:var(--grad)!important;background-size:200% 100%!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important;-webkit-text-fill-color:transparent!important;padding-right:.07em;animation:shine 8s ease-in-out infinite alternate}
.v3-accent .v3-accent{background:none!important;padding:0;animation:none}
.v3-glowtext{background-image:var(--grad)!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important;-webkit-text-fill-color:transparent!important}

/* ---------- the content sheet ---------- */
.v3-sheet{position:relative;z-index:1}
:where(.v3-sheet){background-color:#FFFFFF}
.v3-float{position:relative;z-index:2}
.v3-sheet-first{border-radius:var(--sheet-r,40px) var(--sheet-r,40px) 0 0;margin-top:-40px;box-shadow:0 -50px 90px -40px rgba(0,0,0,.7)}
html[data-theme=light] .v3-sheet-first{box-shadow:0 -24px 60px -28px rgba(11,26,47,.28)}
.v3-sheet-last{border-radius:0 0 40px 40px}
.v3-sheet-first.v3-sheet-last{border-radius:var(--sheet-r,40px)}
html[data-theme=light] .v3-sheet-last{box-shadow:0 30px 60px -40px rgba(11,26,47,.25)}
html.v3-sheets main{position:relative}

/* ---------- page widgets inside the sheet ---------- */
.v3-sheet .card{background-color:#FFFFFF}
.v3-sheet .pill-link{background:#FFFFFF}
.crumb{font:500 12.5px var(--font)!important;gap:10px!important;margin-bottom:24px!important}
.crumb span::before{content:"/"!important}
.pk-hero{padding-bottom:max(120px,8vw)!important}

/* investment-advisory: staggered bars may not push the phone layout wider */
.ia-bars{overflow-x:clip}

/* ===== page banners (motion.js §4: .v3-banner-hero) — full colour, the copy sits on the banner's open left side ===== */
.v3-banner-hero>.v3-hbn{position:absolute;inset:0;z-index:0;overflow:hidden;pointer-events:none;background:#E9F6EE}
.v3-banner-hero>.v3-hbn img{width:100%;height:100%;object-fit:cover;object-position:72% 50%;display:block}
.v3-banner-hero>canvas.v3-wall,.v3-banner-hero>.v3-hgrid{display:none!important}
.v3-banner-hero .hero-grid>:not(:first-child){display:none!important}
@media (min-width:901px){
  .v3-banner-hero .hero-grid{grid-template-columns:minmax(0,min(560px,42vw))!important;min-height:min(820px,calc(100svh - 84px));align-content:center}
  html[data-theme] .v3-hero.v3-banner-hero:not(#v3-none){--fg:#0B1220;--fg-2:#3E4757;--fg-3:#5F6878;--surf:#FFFFFF;--surf-2:#F3F4F7;--surf-3:#E9EBF0;--stroke:rgba(11,18,32,.1);--stroke-2:rgba(11,18,32,.18);--inv:#0B1220;--inv-fg:#FFFFFF;--acc:#00874F;--outline:rgba(11,18,32,.2);
    --grad:linear-gradient(100deg,#0048A8 0%,#0088B8 48%,#00A35A 100%);--glass:rgba(255,255,255,.8);--glass-2:rgba(255,255,255,.96);--glass-stroke:rgba(11,18,32,.1);--navy:#0B1A2F;--ink:#0E1626;--muted:#4A5363;--line:#E3E6EC;color:#0B1220}
  html[data-theme] .v3-hero.v3-banner-hero h1,html[data-theme] .v3-hero.v3-banner-hero .v3-ondark{color:#0B1220!important}
  html[data-theme] .v3-hero.v3-banner-hero :is(.sub,.v3-ondark-2,.hero-feat,.trust span){color:#2A3345!important}
  html[data-theme=dark] .v3-hero.v3-banner-hero .btn-outline{color:#0B1220!important;border-color:rgba(11,18,32,.25)!important;background:rgba(255,255,255,.72)!important}
}
/* banners sit in the right part of the hero and blend into the mint on the left, so the copy never covers the photo at any screen size */
@media (min-width:901px){
  .v3-banner-hero>.v3-hbn{background:#EEF9F0;container-type:size}
  /* never crop the photo: it is drawn whole (its own aspect, --a set by motion.js), right-aligned, as big as fits while
     its empty left ~26% may sit under the copy column (--cp = copy column's right edge) and the subject stays clear of the text */
  .v3-banner-hero>.v3-hbn img{--cp:calc(max((100cqw - var(--maxw)) / 2, 0px) + var(--pad) + min(560px, 42cqw));
    --dw:min(100cqh * var(--a, 2.36), (100cqw - var(--cp)) / .74, 100cqw);--dh:calc(var(--dw) / var(--a, 2.36));
    position:absolute;inset:0;width:100%!important;height:100%;box-sizing:border-box;object-fit:fill;
    padding:calc((100cqh - var(--dh)) / 2) 0 calc((100cqh - var(--dh)) / 2) calc(100cqw - var(--dw));
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 22%),linear-gradient(180deg,transparent 0,#000 7%,#000 93%,transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 22%),linear-gradient(180deg,transparent 0,#000 7%,#000 93%,transparent 100%);
    -webkit-mask-composite:source-in;mask-composite:intersect;-webkit-mask-origin:content-box;mask-origin:content-box;-webkit-mask-clip:content-box;mask-clip:content-box}
  /* near-square photos (PMS, Mutual Funds): heads touch the top edge, so no top fade — only left and bottom */
  body:is([data-page=pms],[data-page=mf]) .v3-banner-hero>.v3-hbn img{
    -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 22%),linear-gradient(180deg,#000 0,#000 90%,transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 22%),linear-gradient(180deg,#000 0,#000 90%,transparent 100%)}
}
@media (max-width:900px){
  .v3-banner-hero>.v3-hbn{top:0;left:12px;right:12px;bottom:auto;height:calc((100vw - 24px) * .5625);border-radius:22px;box-shadow:0 18px 40px -22px rgba(11,26,47,.45)}
  .v3-banner-hero .hero-grid{padding-top:calc((100vw - 24px) * .5625 + 26px)!important}
}
/* several banners on one page crossfade (motion.js §4) */
.v3-banner-hero>.v3-hbn.v3-hbn-multi img{position:absolute;top:0;right:0;height:100%;opacity:0;transition:opacity 1.2s var(--ease)}
.v3-banner-hero>.v3-hbn.v3-hbn-multi img.on{opacity:1}
.v3-hbn-dots{position:absolute;z-index:2;display:flex;gap:8px;right:calc(max((100% - var(--maxw)) / 2, 0px) + var(--pad));bottom:76px}
.v3-hbn-dots button{width:9px;height:9px;padding:0;border:0;border-radius:9px;background:rgba(11,18,32,.28);cursor:pointer;transition:width .5s var(--ease),background-color .5s}
.v3-hbn-dots button.on{width:28px;background:#00874F}
@media (max-width:900px){
  /* phone box is 16:9; wider photos lose only their empty left side, never the right */
  .v3-banner-hero>.v3-hbn img{object-position:100% 50%}
  .v3-banner-hero>.v3-hbn.v3-hbn-multi img{left:0;width:100%;object-position:100% 50%}
  /* near-square PMS / MF photos in the 16:9 phone box: keep the faces (top of the photo) */
  body:is([data-page=pms],[data-page=mf]) .v3-banner-hero>.v3-hbn img{object-position:100% 0}
  .v3-hbn-dots{right:auto;left:50%;transform:translateX(-50%);bottom:auto;top:calc((100vw - 24px) * .5625 - 26px)}
  .v3-hbn-dots button{background:rgba(255,255,255,.8);box-shadow:0 1px 3px rgba(0,0,0,.25)}
}

/* AIF accredited section: headline + lede use the full width available */
body[data-page=aif] #accredited .sec-c{max-width:min(1180px,100%)}
body[data-page=aif] #accredited .sec-c .h2{max-width:none}
body[data-page=aif] #accredited .sec-c .lede{max-width:980px}

/* insurance categories: photo on the left of each tab panel */
.ins-ph{display:block;width:100%;aspect-ratio:16/9;border-radius:22px;overflow:hidden;margin-bottom:26px;background:#EEF2F6;box-shadow:0 20px 44px -28px rgba(11,26,47,.45)}
.ins-ph img{width:100%;height:100%;object-fit:cover;object-position:50% 12%;display:block}

/* mutual funds: photos in category, goal and learn cards */
.mf-ph{display:block;height:170px;border-radius:16px;overflow:hidden;margin-bottom:12px;background:#EEF2F6}
.mf-ph img{width:100%;height:100%;object-fit:cover;display:block;transition:transform 1.2s var(--ease)}
.card:hover .mf-ph img{transform:scale(1.05)}
#goals .card .mf-ph{height:180px;margin:-6px -6px 14px}

/* ===== photo backgrounds on cards (motion.js §4b) — full colour photo on top, copy below ===== */
.v3-photo-card{position:relative;overflow:hidden;isolation:isolate;padding-top:calc(150px + 22px)!important}
.v3-photo-card>.v3-cph{position:absolute;left:0;right:0;top:0;height:150px;z-index:0;background:#0B1220 center/cover no-repeat;transition:transform 1.2s var(--ease)}
.v3-photo-card:hover>.v3-cph{transform:scale(1.05)}
.v3-photo-card>.ic-bubble{position:absolute!important;top:112px;left:22px;z-index:2;background:#fff!important;box-shadow:0 10px 24px -10px rgba(11,18,32,.45)}
.v3-photo-card>*:not(.v3-cph){position:relative;z-index:1}
.v3-photo-card>.ic-bubble{position:absolute!important}
.v3-photo-card::after{display:none!important}

/* ===== process steps: vertical timeline on phones (same as the homepage) — fills the width ===== */
@media (max-width:600px){
  .process{grid-template-columns:1fr!important;row-gap:0!important;padding-left:26px}
  .process::before{left:6px;right:auto;top:10px;bottom:10px;width:1.5px;height:auto}
  .process .step{display:grid;grid-template-columns:46px 1fr;column-gap:14px;align-items:start;padding:0 0 26px}
  .process .step:last-child{padding-bottom:0}
  .process .step::before{display:none}
  .process .step::after{left:-26px;top:16px}
  .process .step .ic-bubble{grid-row:1/4;width:46px;height:46px}
  .process .num{grid-column:2;margin-top:0;font-size:26px}
  .process h3{grid-column:2;margin:6px 0 4px;font-size:17px}
  .process p{grid-column:2;max-width:none}
}

/* ===== IEPF: result card buttons — main action highlighted, second one readable ===== */
body[data-page=iepf] .qc-res .acts .btn-white{background:linear-gradient(100deg,#3DF5A5,#2CD4E8)!important;color:#04140C!important;border-color:transparent!important;box-shadow:0 14px 34px -12px rgba(61,245,165,.7)}
body[data-page=iepf] .qc-res .acts .btn-ghost{background:transparent!important;color:#fff!important;border:1.5px solid rgba(255,255,255,.45)!important;-webkit-backdrop-filter:none;backdrop-filter:none}
body[data-page=iepf] .qc-res .acts .btn-ghost:hover{background:rgba(255,255,255,.1)!important}

/* ===== Unlisted ===== */
/* "Explain it simply with AI" — highlighted */
body[data-page=unlisted] a.btn-ghost[data-chat][href="#basics"]{background:linear-gradient(100deg,#3DF5A5,#2CD4E8)!important;color:#04140C!important;border-color:transparent!important;box-shadow:0 14px 34px -12px rgba(61,245,165,.7)}
/* AI view card: both buttons readable */
body[data-page=unlisted] .vs-ai #vsEnq{background:linear-gradient(100deg,#3DF5A5,#2CD4E8)!important;color:#04140C!important;border-color:transparent!important}
body[data-page=unlisted] .vs-ai #vsAsk{background:transparent!important;color:#fff!important;border:1.5px solid rgba(255,255,255,.5)!important;opacity:1!important}
/* compare table on phones: label on top, the two companies side by side underneath */
@media (max-width:720px){
  body[data-page=unlisted] .vs-row{grid-template-columns:1fr 1fr!important}
  body[data-page=unlisted] .vs-row .k{grid-column:1/-1!important;grid-row:1;padding:8px!important}
  body[data-page=unlisted] .vs-row>div:first-child{grid-column:1;grid-row:2;border-right:1px solid var(--line)}
  body[data-page=unlisted] .vs-row>div:last-child{grid-column:2;grid-row:2;text-align:left!important}
  body[data-page=unlisted] .vs-row>div{padding:12px 14px!important;font-size:13.5px!important;line-height:1.5}
  body[data-page=unlisted] .vs-pick{padding:12px!important}
}

/* ===== narrow phones (320–414px): grid cells may shrink, wide rows re-flow ===== */
.pk [class*="-g"]>*,.pk [class*="grid"]>*,.sp>*,.stats>.stat{min-width:0}
.pk .tx-pn h3{flex-wrap:wrap}
.pk .tx-lad div>*{min-width:0}
@media (max-width:359px){.pk .tx-lad div{grid-template-columns:112px minmax(0,1fr) 34px!important;gap:8px!important}}
@media (max-width:420px){
  body[data-page=sip] .lr{grid-template-columns:40px minmax(0,1fr) auto!important;gap:8px!important}
  body[data-page=sip] .lr>*{min-width:0}
  body[data-page=retire] .rail{grid-template-columns:1fr 1fr!important}
  body[data-page=retire] .rail div{padding:16px 12px!important;flex-direction:column;align-items:flex-start;gap:6px;border-bottom:1px solid var(--line)}
  body[data-page=retire] .rail b{font-size:2rem!important}
  body[data-page=pms] .stats{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .stats .stat span{overflow-wrap:anywhere}
}
.pk .tx-two>*{min-width:0}@media (max-width:900px){.pk .tx-two{grid-template-columns:minmax(0,1fr)!important}}
@media (max-width:360px){.sp .btn{white-space:normal;text-align:left;max-width:100%}}

/* 3-D artwork icons on cards (motion.js) */
.ic-bubble.v3-ic3d{width:64px!important;height:64px!important;border-radius:18px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.ic-bubble.v3-ic3d img{width:100%;height:100%;object-fit:contain;display:block}
/* PMS photo cards: number badge stays readable on the photo */
.v3-photo-card>.num-badge{position:absolute!important;top:14px;right:16px;z-index:2;color:#fff!important;-webkit-text-stroke:0!important;text-shadow:0 2px 10px rgba(0,0,0,.45)}

/* debt funds: fund-type panels get a photo on the right; "how to choose" gets a photo beside the checklist */
.v3-side-photo{position:relative;padding-right:calc(38% + clamp(22px,3vw,38px))!important;min-height:340px;overflow:hidden}
.v3-side-photo>.v3-sph{position:absolute;top:0;right:0;bottom:0;width:38%;background:#E9EEF5 center/cover no-repeat}
.v3-side-photo .df-dl{grid-template-columns:1fr!important}
.v3-tl-split{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:clamp(28px,5vw,72px);align-items:stretch;margin-top:40px}
.v3-tl-split>.timeline{margin:0;max-width:none}
.v3-tl-ph{border-radius:28px;background:#E9EEF5 center/cover no-repeat;min-height:420px;box-shadow:0 30px 60px -40px rgba(11,26,47,.5)}
@media (max-width:760px){
  .v3-side-photo{padding-right:clamp(22px,3vw,38px)!important;padding-top:calc(200px + 24px)!important;min-height:0}
  .v3-side-photo>.v3-sph{left:0;width:auto;bottom:auto;height:200px}
  .v3-tl-split{grid-template-columns:1fr}
  .v3-tl-ph{min-height:240px;order:-1}
}
#goals .card .mf-ph img{object-position:50% 22%}
