/* Sage reflections on charcoal and pearl. Keep data plots and price colours independent. */
:root {
  --pp-atmosphere: radial-gradient(ellipse 78% 32rem at 18% 0%, #47705b36, transparent 76%), linear-gradient(115deg,#09100e,#101815 58%,#0b110f);
  --pp-brush: linear-gradient(120deg,#b3d6c31c 0%,#8eaf9d0a 24%,transparent 52%,#d8e6df08 78%,#66867310);
  --pp-metal-edge: #839d8d52;
  --pp-rim: inset 0 1px 0 #e8fff01a, inset 0 -1px 0 #030a063d;
  --pp-press: inset 0 1px 0 #ffffff45, inset 0 -2px 0 #16342230, 0 2px 3px #07100b2b;
  --pp-mint: linear-gradient(165deg,#e4f5ec 0%,#c0e3cf 43%,#a7d6b9 75%,#c5e4d1);
}
html[data-theme=light] {
  --pp-atmosphere: radial-gradient(ellipse 78% 30rem at 18% 0%,#9cc4ae55,transparent 75%),linear-gradient(115deg,#f5f8f6,#eaf1ed 58%,#f4f6f5);
  --pp-brush: linear-gradient(120deg,#d2e3d9a8,#fcfefd55 35%,transparent 59%,#98b6a326);
  --pp-metal-edge: #91a99a73;
  --pp-rim: inset 0 1px 0 #ffffffdf,inset 0 -1px 0 #718d7b24;
}
html body,html[data-theme=light] body {background-image:var(--pp-atmosphere);background-repeat:no-repeat}
body :is(.panel,.card,.feature,.gate,.account-card,.config-summary,.config-payment,.fund-panel,.comparison-prime,.leverage-cards article,.mobile-market-list,.am-dropdown,.am-dialog,#customdialog,#prime-auth),
html[data-theme=light] body :is(.panel,.card,.feature,.gate,.account-card,.config-summary,.config-payment,.mobile-market-list,.am-dropdown,.am-dialog,#customdialog,#prime-auth) {
  background-image:var(--pp-brush)!important;
  box-shadow:var(--pp-rim);
  border-color:var(--pp-metal-edge);
}
body > header,html[data-theme=light] body > header {
  background-image:linear-gradient(105deg,#a4cab516,transparent 50%,#adbcb310)!important;
  box-shadow:var(--pp-rim);
}
body :is(.btn,.button,.buyrow a,.am-primary,.orderbuttons button,.mobile-place,#purchase,#custombuy) {
  box-shadow:var(--pp-press);
  transition:transform 120ms ease,filter 120ms ease;
}
body :is(a.btn.green,.buyrow a,#custombuy,.am-primary),
html[data-theme=light] body :is(a.btn.green,.buyrow a,#custombuy,.am-primary) {
  background:var(--pp-mint);
  color:#142e20;
  border:1px solid #9bbcaa;
}
@media (hover:hover) {
  body :is(.btn,.button,.buyrow a,.am-primary,.orderbuttons button,.mobile-place,#purchase,#custombuy):not(:disabled):not([aria-disabled=true]):hover {filter:brightness(1.06);transform:translateY(-1px)}
}
body :is(.btn,.button,.buyrow a,.am-primary,.orderbuttons button,.mobile-place,#purchase,#custombuy):not(:disabled):active {
  transform:translateY(1px);box-shadow:inset 0 2px 3px #10281b40;
}
@media (prefers-reduced-motion:reduce) {
  body :is(.btn,.button,.buyrow a,.am-primary,.orderbuttons button,.mobile-place,#purchase,#custombuy) {transition:none;transform:none!important}
}
/* Coupon fields and applied discounts. */
:root {
  --offer-fill: radial-gradient(ellipse at 4% 0%,#559f796b,transparent 58%),linear-gradient(115deg,#183c30,#204339 46%,#283c3a 76%,#344c48);
  --offer-edge:#719e89;
  --offer-title:#f0fff6;
  --offer-copy:#d0e8da;
  --offer-input:#10281f;
  --offer-ink:#edfff4;
  --offer-glint:linear-gradient(125deg,#edfff6,#a8ebc5 49%,#d9f1e4);
}
html[data-theme=light] {
  --offer-fill:radial-gradient(ellipse at 4% 0%,#a2e8bfad,transparent 58%),linear-gradient(115deg,#d4f4e1,#e9f7ed 46%,#d1e4de 78%,#e7efec);
  --offer-edge:#79a48e;
  --offer-title:#123828;
  --offer-copy:#335747;
  --offer-input:#f8fffa;
  --offer-ink:#143526;
}
body :is(.preset-coupon,.uf-coupon,form.coupon) {
  background:var(--offer-fill)!important;
  border:1px solid var(--offer-edge);
  box-shadow:inset 0 1px 0 #effff54d,inset 3px 0 0 #8cd9ac,0 6px 20px #05130a19;
  color:var(--offer-title);
}
body :is(.uf-coupon,form.coupon){padding:16px 20px;border-radius:12px}
body .uf-coupon{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-block:12px}
body .preset-coupon p, html[data-theme=light] body .preset-coupon p{color:var(--offer-copy)!important}
body :is(.preset-coupon,.uf-coupon,form.coupon,#couponform) input {
  background-color:var(--offer-input);color:var(--offer-ink);border:1px solid var(--offer-edge);min-width:0;max-width:100%
}
body :is(.preset-coupon,.uf-coupon,form.coupon,#couponform) input:focus-visible {
  outline:2px solid var(--offer-edge);outline-offset:2px
}
body :is(#presetcouponform button[type=submit],.uf-coupon button:first-of-type,#applycoupon,form.coupon button){
  background:var(--offer-glint);color:#103624;border:1px solid #b5ddc5;box-shadow:var(--pp-press)
}
body #presetcouponform button[type=button],body .uf-coupon button:last-of-type{
  background:var(--offer-input);color:var(--offer-copy);border:1px solid var(--offer-edge)
}
body .preset-discount{color:var(--offer-copy)!important;border-inline-start:2px solid var(--offer-edge);padding-inline-start:8px}
body .preset-coupon #presetstatus:empty{display:none}
@media(max-width:600px){body .uf-coupon input{flex:1 1 140px}body .uf-coupon{padding:14px;gap:8px}}

/* Interactive surfaces use a raised edge; editable values sit in an inset field. */
:root {
  --control-sheen:linear-gradient(145deg,#a4f4ce26,#6fb69d09 55%,#729eae14);
  --control-edge:#689783;
  --field-fill:#091e1b;
  --field-edge:#82a99b;
  --field-text:#f0faf5;
  --field-hint:#a5c1b8;
  --focus-ring:#8de6c4;
}
html[data-theme=light] {
  --control-sheen:linear-gradient(145deg,#8fceb94c,#d8eee532 55%,#81ada833);
  --control-edge:#577e70;
  --field-fill:#fbfffd;
  --field-edge:#67897e;
  --field-text:#17332a;
  --field-hint:#526e64;
  --focus-ring:#177859;
}
body :where(button,a.button,a.btn,[role="button"]):not(:disabled,[aria-disabled="true"],[role="switch"],.pp-rule-help,.selected,.active,[aria-selected="true"],[aria-pressed="true"],[value="sell"],[value="buy"]) {
  cursor:pointer;
  background-image:var(--control-sheen);
  border-color:var(--control-edge);
}
body :is(.panel,form,main,.am-dialog) :is(button,a.button):not(:disabled,[aria-disabled="true"],[role="switch"],.pp-rule-help,.selected,.active,[aria-selected="true"],[aria-pressed="true"],[value="sell"],[value="buy"]) {
  border-color:var(--control-edge);
  box-shadow:inset 0 1px 0 #dbffed25,0 1px 2px #00180c26;
}
body :is(#withdraw,#request-profit) {
  background:linear-gradient(145deg,#c6efd9,#89cfad);color:#103526;
}
html body :is(input:not([type]),input[type="text"],input[type="email"],input[type="password"],input[type="number"],input[type="search"],input[type="url"],input[type="date"],input[type="tel"],textarea,select):not(:disabled,[readonly]),
html[data-theme=light] body :is(input:not([type]),input[type="text"],input[type="email"],input[type="password"],input[type="number"],input[type="search"],input[type="url"],input[type="date"],input[type="tel"],textarea,select):not(:disabled,[readonly]) {
  background-color:var(--field-fill)!important;
  color:var(--field-text)!important;
  border:1px solid var(--field-edge)!important;
  border-radius:7px;
  box-shadow:inset 0 1px 3px #001b1024;
}
body :is(input,textarea)::placeholder {color:var(--field-hint);opacity:1}
body :is(button,a[href],input,select,textarea,[role="button"]):focus-visible {
  outline:2px solid var(--focus-ring)!important;outline-offset:2px;
}
@media(hover:hover){
  body :is(button,a.button,a.btn):enabled:hover,body a:is(.button,.btn):hover{border-color:var(--focus-ring)}
}
/* Keep custom purchase details aligned inside the bordered payment card. */
#customdialog .config-summary .config-payment {
  box-sizing:border-box;
  min-width:0;
  width:100%;
  padding:clamp(16px,2vw,24px);
}
#customdialog .config-payment > div:first-child {
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:space-between;
  gap:4px 12px;
}
#customdialog .config-payment strong {float:none;margin-inline-start:auto}
#customdialog .config-payment hr {margin:18px 0}
#customdialog #couponform:not([hidden]) {
  margin-block-start:12px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
#customdialog #couponform label {flex-basis:100%}
#customdialog #couponform input {box-sizing:border-box;max-width:100%;min-width:0;flex-basis:100%;margin:0!important}
#customdialog #codestatus {overflow-wrap:anywhere}

#reward-transfer {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px 24px;
  max-width:52rem;
  margin-block:20px;
}
#reward-transfer > label {
  display:grid;
  align-content:start;
  gap:7px;
  min-width:0;
  margin:0;
  line-height:1.4;
}
#reward-transfer :is(input,select) {
  display:block;
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:44px;
  margin:0;
}
#reward-transfer > button {grid-column:1/-1;justify-self:start;margin:0}
@media(max-width:700px) {
  #reward-transfer {grid-template-columns:minmax(0,1fr);gap:16px}
  #reward-transfer > button {justify-self:stretch}
}

/* Blend the custom build summary into the dialog without fading its text. */
#customdialog .config-layout > .config-summary {
  --summary-wash:105,145,121;
  background:linear-gradient(90deg,
    rgba(var(--summary-wash),.045) 0%,
    rgba(var(--summary-wash),.032) 28%,
    rgba(var(--summary-wash),.015) 60%,
    rgba(var(--summary-wash),0) 100%)!important;
  border-color:transparent!important;
  border-radius:0;
  box-shadow:none;
}
html[data-theme=light] #customdialog .config-layout > .config-summary {
  --summary-wash:46,110,77;
}
dialog.universal-funding.uf-direct {width:min(560px,95vw);box-sizing:border-box}
.uf-direct .uf-coupon input{max-width:100%;box-sizing:border-box}
.uf-direct .uf-confirm button{margin:8px}
@media(max-width:750px){dialog.universal-funding.uf-direct{width:100%}}

/* Sheet handles have one short grip and a compact heading gap. */
body button:is(.sheet-handle,.unified-sheet-handle) {
  box-shadow:none!important;
  background:transparent!important;
  border:0!important;
  filter:none!important;
}
@media(max-width:750px) {
  body :is(dialog,.am-dropdown) > button:is(.sheet-handle,.unified-sheet-handle) {
    height:22px!important;
    min-height:22px!important;
    margin:0!important;
    padding:0!important;
  }
  body :is(dialog,.am-dropdown) > button:is(.sheet-handle,.unified-sheet-handle) + .uf-head h2 {
    margin-block:6px 12px;
  }
  body dialog.universal-funding {padding-top:6px}
}

/* Account menu and appearance switch */
#more-account{display:flex;align-items:center;justify-content:space-between;gap:12px;overflow-wrap:anywhere;margin:12px 0}
#more-account button{padding:12px 18px;background:#28352c;color:white;border:1px solid #425249;border-radius:9px}
#more-theme{appearance:none;position:relative;width:42px;height:25px;background:#78877e;border-radius:20px;cursor:pointer}
#more-theme:checked{background:#58bf8a}
#more-theme:before{content:'';position:absolute;width:19px;height:19px;top:3px;left:3px;border-radius:50%;background:white}
#more-theme:checked:before{transform:translateX(17px)}


/* Set foreground and surface together so nested labels stay legible. */
html[data-theme=light] {
  color-scheme:light;
  --paper:#ffffff;
  --panel-soft:#edf4ef;
  --ink:#172e22;
  --muted-ink:#435d4d;
  --line:#a1b5a8;
  --action:#174f35;
}
html[data-theme=dark] {color-scheme:dark}
html[data-theme=light] body {background-color:#f3f7f4;color:var(--ink)}
html[data-theme=light] body :is(header,footer,dialog,main details,.panel,.card,.step,.gate,.account-card,
.feature,.market-grid article,.leverage-cards article,.plan,.fund-screen,.fund-panel,.fund-health,.fund-float,
.journey-stage,.journey-receipt,.terminal,.ticket,.book,.stats,.chartbox,.history,.comparison-frame,.comparison-prime,
.mobile-sheet,.mobile-details,.mobile-market-list,.mobile-bottom,.am-dropdown,.am-dialog,.am-card,.am-profit-card,.am-profit-net,
.uf-card,.config-summary,.config-payment,.custom-purchase-bar,.account-details,.checkout,#rail-panel,#prime-auth) {
  background:var(--paper)!important;color:var(--ink)!important;border-color:var(--line)!important
}
html[data-theme=light] body :is(.plans-wrap,.ticker,.top-tabs,.tabs,.amount-entry,.quantity,.exit-tabs,.order-type-tabs,.field,
.market-control,.daily,.fundhero,.cta,.comparison-brand,.asset-panel,.pp-rule-tip,.pp-rule-help,.mobile-trade-tabs,.chart,.chartbar) {
  background:var(--panel-soft)!important;color:var(--ink)!important;border-color:var(--line)!important
}
html[data-theme=light] body :is(h1,h2,h3,h4,th,summary,.brand,.value,.chartlabel,.chart-label,.capital-title,.market-name,.size-labels) {
  color:var(--ink)!important;-webkit-text-fill-color:currentColor!important
}
html[data-theme=light] body :is(p,small,label,.note,.muted,.fine,.label,.empty,.preview-note,.footer-links,.disclosure,.copyright,
.chart-message,.terminal-top,.terminal-bottom,.bookhead,.eyebrow,.market-disclaimer,.comparison-note,.divider,.am-notice) {
  color:var(--muted-ink)!important
}
html[data-theme=light] body :is(nav a,footer a,.sheet-links a,.mobile-bottom a,.am-account-link,.trade,.login) {color:var(--action)!important}
html[data-theme=light] body :is(button,.btn,.button,.login,.buyrow a,.am-account-link,[role=button]):not(.sheet-handle,.unified-sheet-handle) {
  background:var(--panel-soft)!important;color:var(--ink)!important;border-color:var(--line)!important
}
html[data-theme=light] body :is(button,.btn,.button,.buyrow a,.am-account-link,[role=button]) :is(span,strong,b,small,i,p,label) {
  color:inherit!important;-webkit-text-fill-color:currentColor!important
}
html[data-theme=light] body :is(button.selected,button.active,button[aria-pressed=true],button[aria-selected=true],a.selected,
.btn.green,.buyrow a,.am-primary,.pa-primary,.uf-confirm,.mobile-place,#custombuy,#purchase,#leverage-save,.orderbuttons button) {
  background:var(--action)!important;color:white!important;border-color:var(--action)!important
}
html[data-theme=light] body .orderbuttons button:last-child {background:#91324a!important;color:white!important}
html[data-theme=light] body :is(button:disabled,[aria-disabled=true]) {
  background:#e2e8e4!important;color:#526257!important;opacity:1!important
}
html[data-theme=light] body :is(.recommended,.pill,.badge,.market-leverage,.tier,.picker-symbol,.coin:not(.asset-coins .coin)) {
  background:#e2efe6!important;color:#254733!important
}
html[data-theme=light] body :is(.red,.loss,.picker-loss,.pa-error) {color:#963349!important}
html[data-theme=light] body :is(.green-text,.gain,.picker-gain,.green:not(.btn)) {color:#10613b!important}
html[data-theme=light] body :is(table,tbody,tr,td) {border-color:#ccdad1}
html[data-theme=light] body tr:hover td {background-color:#e7f1ea;color:var(--ink)}
html[data-theme=light] body :is(textarea,select,input):not([type=checkbox],[type=range],[type=radio],[type=submit],[type=button]) {
  background:var(--field-fill)!important;color:var(--field-text)!important
}
html[data-theme=light] body .mobile-bottom .selected {background:#d6e9dd!important;color:var(--action)!important}
html[data-theme=light] body #more-theme:not(:checked) {background:#64776b}
html[data-theme=light] body #prime-auth .pa-brand span {color:var(--action)}
html[data-theme=dark] body #prime-auth .pa-primary {background:#ccebd9;color:#133220}
html[data-theme=light] body :is(main:has(#marketrows),main:has(a.symbol),.leverage-preview) {
  background:var(--paper)!important;color:var(--ink)!important
}
html[data-theme=light] body :is(.hero h1 span,.fundhero h1 span,.facts strong,.fund-tabs strong,.capital p strong,.comparison-brand span,.brand>span,.comparison-icon) {color:var(--action)!important}
html[data-theme=light] body :is(.facts span,.stat span,.unavailable) {color:var(--muted-ink)!important}
html[data-theme=light] body :is(.symbol,.symbol strong,.market-avatar) {color:var(--ink)!important}
html[data-theme=light] body .market-avatar {background:#cfdfd4!important}
html[data-theme=light] body :is(.comparison-other .comparison-icon,.loss,.picker-loss) {color:#97354d!important}
html[data-theme=light] body :is(.uf-picked,.am-account-choice.am-picked) {background:#cce8d7!important;color:#173b29!important;border-color:#397052!important}
html[data-theme=dark] body :is(.tier.gold,.tier.platinum) {color:#182118!important}
html[data-theme=dark] body :is(.unavailable,.comparison-other .comparison-icon) {color:#c6a5b2}
html[data-theme=dark] body .orderbuttons button[value=buy] {background:#086240;color:#fff}
html[data-theme=dark] body .right .order-type-tabs button.selected {background:#c7ead5!important;color:#172e22!important}
html[data-theme=light] body .asset-coins :is(.btc,.nq),html[data-theme=dark] body .asset-coins :is(.btc,.nq) {color:#12251c}
html body .asset-coins .es {background:#9e0d30;color:white}
html[data-theme=light] #order .position-long {color:#10613b}
html[data-theme=light] #order .position-short {color:#963349}
html[data-theme=dark] #order .position-long {color:#75dda9}
html[data-theme=dark] #order .position-short {color:#ff8aa5}
html[data-theme=dark] body :is(a.btn.green,.buyrow a,#custombuy,.am-primary,#presetcouponform button[type=submit]) {background-color:#c4e7d2}
html[data-theme=dark] body :is(.capital-title h2,.account-card h3,.journey-head h2) {
  background:none;color:#d6efe0;-webkit-text-fill-color:currentColor
}
html[data-theme=light] body .preset-coupon strong {color:var(--offer-title)!important}
html[data-theme=light] body :is(.mobile-market-list,.leverage-preview) strong,
html[data-theme=light] body .portfolio-all-markets {color:var(--ink)!important}
html[data-theme=dark] body .tier.platinum {background:#bfcfda;color:#182118}

/* Account and copy menus share the same palette in the header and open panel. */
#auth {
  --menu-surface:#142119;--menu-control:#23382c;--menu-ink:#f1f8f2;--menu-detail:#c5d6ca;
  --menu-edge:#779582;--menu-selected:#2a503a;--menu-badge:#c6e8d2;--menu-badge-ink:#193d28;
}
html[data-theme=light] #auth {
  --menu-surface:#fff;--menu-control:#edf4ef;--menu-ink:#192f21;--menu-detail:#415b49;
  --menu-edge:#809986;--menu-selected:#d5eadb;--menu-badge:#d5e9dc;--menu-badge-ink:#1a462a;
}
html body header #auth .am-menu>summary {
  display:flex;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;
  height:44px;min-width:0;margin:0;padding:8px 12px;line-height:1.25;
  border:1px solid var(--menu-edge);border-radius:9px;background:var(--menu-control)!important;color:var(--menu-ink)!important;
}
#auth summary::-webkit-details-marker {display:none}
#auth .am-menu-label {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit}
#auth .am-chevron {flex:none;color:inherit}
#auth details[open]>summary .am-chevron {transform:rotate(180deg)}
html body header #auth #am-copy-count {
  flex:none;margin:0;padding:2px 6px;border-radius:5px;line-height:16px;
  color:var(--menu-badge-ink)!important;background:var(--menu-badge)!important
}
html body header #auth .am-menu[open]>summary,
html body header #auth .am-dropdown :is([aria-current=true],.am-picked) {
  color:var(--menu-ink)!important;background:var(--menu-selected)!important;border-color:var(--menu-edge)!important
}
html body header #auth .am-menu>.am-dropdown {
  box-sizing:border-box;max-height:min(70dvh,620px);overflow:auto;overscroll-behavior:contain;
  text-align:left;white-space:normal;background:var(--menu-surface)!important;color:var(--menu-ink)!important
}
html body header #auth .am-dropdown :is(strong, label, .am-account-choice span) {color:var(--menu-ink)!important}
html body header #auth .am-dropdown :is(small,.am-notice) {color:var(--menu-detail)!important;overflow-wrap:anywhere}
html body header #auth .am-dropdown :is(button:not(.unified-sheet-handle),.am-account-link) {
  color:var(--menu-ink)!important;background-color:var(--menu-control)!important;overflow-wrap:anywhere
}
html body header #auth .am-dropdown button:disabled {opacity:1;background:#dae1dc!important;color:#4b5a50!important;cursor:not-allowed}
html[data-theme=dark] body header #auth .am-dropdown button:disabled {background:#28332b!important;color:#b8c4ba!important}
#auth .am-dropdown :is(.am-account-choice,.am-choices,.am-account-choice span) {min-width:0;box-sizing:border-box;overflow-wrap:anywhere}
#auth .am-copy-menu .am-choices:has([data-am-choice]) {align-items:stretch}
#auth .am-copy-menu input[type=checkbox] {flex:0 0 18px;margin:0}
#auth .am-copy-menu label:has(>#am-copy) {display:flex;align-items:center;gap:10px}
#auth .am-menu>summary:focus-visible {outline:2px solid var(--focus-ring);outline-offset:2px}
@media(min-width:751px){
  header #auth .am-menu>.am-dropdown {top:calc(100% + 6px)}
  header #auth .am-dropdown .unified-sheet-handle {display:none}
}
@media(max-width:750px){
  body:not(.mobile-trade) header #auth>.am-menu {display:none!important}
html[data-theme=dark] body.mobile-trade #auth {
  --menu-surface:#161a17;--menu-control:#1a1d1b;--menu-ink:#edf2ee;--menu-detail:#bec9c1;
  --menu-edge:#323833;--menu-selected:#25392d;--menu-badge:#263c30;--menu-badge-ink:#99edbc;
}
body.mobile-trade #auth .am-menu:not(.am-copy-menu)>summary::before {content:"◉"}
body.mobile-trade #auth .am-copy-menu>summary::before {content:"▣"}
html[data-theme=dark] body.mobile-trade select:not([multiple]) {
  background-color:#1a1d1b!important;color:#edf2ee!important;border-color:#434c46!important;
  color-scheme:dark
}
html[data-theme=dark] body.mobile-trade select option {background:#1a1d1b;color:#edf2ee}

  html body.mobile-trade header #auth .am-menu>summary {
    display:flex;width:100%;min-height:32px;height:32px;padding:4px 5px;gap:3px;
    font:600 clamp(10px,2.9vw,12px)/16px Arial,sans-serif;text-align:center;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis
  }
  html body.mobile-trade header #auth #am-copy-count {margin:0;padding:1px 5px;font-size:10px;line-height:14px}
  html body.mobile-trade header #auth .am-menu>.am-dropdown {
    box-sizing:border-box;min-width:0;height:auto;overflow-y:auto;
    padding:10px 14px calc(14px + env(safe-area-inset-bottom));
  }
  html body.mobile-trade header #auth .am-copy-menu>.am-dropdown {gap:10px;flex-wrap:nowrap}
  body.mobile-trade #auth .am-dropdown .am-account-choice {width:100%;padding:9px 12px}
  body.mobile-trade #auth .am-dropdown [data-am-account] {white-space:normal}
}

body > header > .desktop-theme-toggle {
  display:none;
}
@media (min-width:751px) {
  body > footer#ticker {display:none}
  body > header:has(> #auth) {column-gap:6px}
  body > header:has(> #auth) > nav {margin-inline-start:18px}
  body > header #auth .am-header-actions {gap:6px!important}
  body > header > .desktop-theme-toggle {
    box-sizing:border-box;display:inline-grid;place-items:center;flex:0 0 38px;
    width:38px;height:38px;padding:0;margin:0;border-radius:9px;
    border:0;background:transparent!important;box-shadow:none;color:#eef8f1;
  }
}
.desktop-theme-toggle .theme-moon,
html[data-theme=light] .desktop-theme-toggle .theme-sun {display:none}
html[data-theme=light] .desktop-theme-toggle .theme-moon {display:inline}

:root {--km-logo:url("/brand/wordmark-dark.png")}
html[data-theme=light] {--km-logo:url("/brand/wordmark-light.png")}
body .km-wordmark {
  display:inline-block;width:120px;max-width:100%;aspect-ratio:897/320;
  background:var(--km-logo) center / contain no-repeat;vertical-align:middle;
}
body header a.brand:has(.km-wordmark) {display:inline-flex;align-items:center;flex-shrink:0}
body header .brand .km-wordmark {width:144px}
body .pa-brand .km-wordmark {width:160px;margin:0}
body .fund-nav .km-wordmark {width:76px}
body .comparison-brand .km-wordmark {width:125px;height:auto;border:0;border-radius:0}
@media(max-width:750px){
  body header .brand .km-wordmark {width:120px;margin:0!important}
}
body > .marketing-header .brand .km-wordmark {width:164px}
@media (min-width:751px) {
  body > .marketing-header {
    display:grid;
    grid-template-columns:minmax(max-content,1fr) auto minmax(max-content,1fr);
    align-items:center;
    column-gap:clamp(6px,1vw,16px);
  }
  .marketing-header > .brand {justify-self:start}
  .marketing-header > nav {grid-column:2;justify-self:center}
  .marketing-header > .btn,
  .marketing-header > .auth,
  .marketing-header > .desktop-theme-toggle {grid-column:3;grid-row:1;justify-self:end}
  .marketing-header > .btn,
  .marketing-header > .auth {margin-inline-end:44px}
}
@media (min-width:751px) and (max-width:1050px) {
  body > .marketing-header {padding-inline:18px}
  .marketing-header > nav {gap:14px}
}
@media (max-width:750px) {
  body > .marketing-header .brand .km-wordmark {width:132px}
}
/* Payout certificate keeps its own dark artwork in either site theme. */
.payout-certificate {
  container-type:inline-size;position:relative;isolation:isolate;overflow:hidden;
  aspect-ratio:16/9;display:grid;grid-template-rows:61% 39%;border-radius:16px;
  color:#f6f7f4;background:radial-gradient(ellipse at -9% -15%,#358f51 0%,#173a27 20%,transparent 49%),linear-gradient(120deg,#101913,#101110 58%,#161916);
  font-family:Arial,sans-serif;
}
.pc-top,.pc-bottom {margin-inline:3.4%;min-width:0;display:grid}
.pc-top {grid-template-columns:minmax(0,1fr) minmax(12%,auto);gap:4%;padding-top:2.6cqw}
.pc-brand {display:block;width:15cqw;height:auto}
.pc-caption {margin-top:3.2cqw;color:#c0cdbf;font-size:1.55cqw;text-transform:uppercase;letter-spacing:.04em}
.pc-amount {margin-top:2cqw;font-weight:600;font-size:clamp(20px,7.7cqw,100px);letter-spacing:-.045em;overflow-wrap:anywhere}
.pc-facts {margin:0;align-self:center;max-width:22cqw}
.pc-facts dt,.pc-recipient>span {color:#b6bdb6;font-size:1.38cqw}
.pc-facts dd {margin:.8cqw 0 2.7cqw;font-size:2cqw;font-weight:600;overflow-wrap:anywhere}
.pc-facts dd:last-child {margin-bottom:0}
.pc-tier {display:inline-block;max-width:100%;border-radius:2em;padding:.55em 1.1em;text-transform:uppercase;font:bold 1.15cqw Georgia,serif;letter-spacing:.045em;background:linear-gradient(115deg,#e3e7df,#adbeb0);color:#15221a}
.pc-gold {background:linear-gradient(110deg,#f8e7a3,#bf9954)}
.pc-silver,.pc-platinum {background:linear-gradient(110deg,#f2f5fa,#a7b4bb)}
.pc-emerald {background:linear-gradient(110deg,#bcebc7,#70b396)}
.pc-bottom {grid-template-columns:minmax(0,1fr) minmax(8em,17%);align-items:start;gap:3%;padding-top:3cqw;border-top:1px solid #ffffff26}
.pc-recipient {position:relative;text-align:center;width:fit-content;max-width:100%;min-width:25cqw;padding:0 3.7cqw}
.pc-recipient b {display:block;margin-top:1cqw;font-size:3cqw;line-height:1.12;overflow-wrap:anywhere}
.pc-recipient::before,.pc-recipient::after {content:'';position:absolute;top:0;bottom:0;width:2.8cqw;background:url('/brand/certificate-laurel.svg') center/contain no-repeat}
.pc-recipient::before {left:0}.pc-recipient::after {right:0;transform:scaleX(-1)}
@media(max-width:620px){
  .payout-certificate{aspect-ratio:auto;grid-template-rows:auto auto}
  .pc-top{padding-block:18px;grid-template-columns:minmax(0,1fr) auto}
  .pc-brand{width:95px}.pc-caption{font-size:10px}.pc-amount{font-size:clamp(22px,7cqw,40px)}
  .pc-facts{max-width:30cqw}.pc-facts dt,.pc-recipient>span{font-size:11px}.pc-facts dd{font-size:14px}.pc-tier{font-size:10px}
  .pc-bottom{padding-block:16px 24px;grid-template-columns:minmax(0,1fr) minmax(8em,30%)}
  .pc-recipient b{font-size:18px}
}
.pc-signature {align-self:start;text-align:center;color:#f5f4ed;font-size:clamp(10px,1.35cqw,18px)}
.pc-signature svg {width:100%;display:block;overflow:visible}
.pc-signature span {display:block;margin-top:.45em}

.pc-total-summary {display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.pc-total-summary h2 {font-size:1rem;margin:0 0 .35em}
.pc-total-summary strong {font-size:1.65rem}
.pc-gallery {display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:1rem}
.pc-preview {display:block;max-width:380px;width:100%;min-width:0;text-decoration:none;border-radius:12px}
.pc-preview:focus-visible {outline:3px solid currentColor;outline-offset:3px}
.pc-preview .payout-certificate {aspect-ratio:16/9;grid-template-rows:61% 39%;border-radius:inherit}
.pc-preview .pc-top {padding-block:2.6cqw 0}
.pc-preview .pc-brand {width:18cqw}
.pc-preview .pc-caption {font-size:2.25cqw}
.pc-preview .pc-amount {font-size:8cqw}
.pc-preview .pc-facts dt,.pc-preview .pc-recipient>span {font-size:2.1cqw}
.pc-preview .pc-facts dd,.pc-preview .pc-tier {font-size:2.5cqw}
.pc-preview .pc-bottom {grid-template-columns:minmax(0,1fr) 24%;padding-block:2cqw}
.pc-preview .pc-recipient b {font-size:3.8cqw}
.pc-preview .pc-signature {font-size:1.9cqw}

.pc-dialog {position:fixed;inset:0;margin:auto;border:0;padding:0;width:min(94vw,1120px,146dvh);max-width:none;max-height:94dvh;background:transparent;color:#fff;overflow:auto}
.pc-dialog::backdrop {background:rgb(0 0 0 / 78%)}
.pc-dialog>button {display:block;margin:0 0 .5rem auto;padding:.55rem 1rem;border:1px solid #aaa;border-radius:8px;background:#181c1a;color:#fff;cursor:pointer}
html:has(.pc-dialog[open]) {overflow:hidden}
.pc-dialog {text-align:right}.pc-dialog>button {display:inline-block;margin-left:.5rem}.pc-dialog .payout-certificate {text-align:left}
.pc-total-summary + section {padding-top:clamp(20px,2.4vw,30px)}
.pc-total-summary + section > h2 {margin:0 0 10px}

.universal-funding .uf-head button.uf-custom {margin:0 0 0 auto;padding:11px 18px;border:1px solid #c1f8d6;border-radius:7px;background:#c1f8d6;color:#102117;font-weight:600;cursor:pointer}
#customdialog[open] {box-sizing:border-box;width:min(1060px,98vw);padding:16px 20px}
#customdialog .config-layout {gap:20px}
#customdialog .config-controls h2 {font-size:clamp(30px,4vw,48px);margin:0 0 8px}
#customdialog .config-controls input[type=range] {margin:12px 0 7px}
#customdialog .divider {margin:14px 0 10px}
#customdialog .type-options {grid-template-columns:repeat(2,minmax(0,1fr))}
#customdialog .custom-build-details > summary {cursor:pointer;padding-block:6px;font-weight:600}
#customdialog .type-options button {padding:10px;border-radius:12px}
#customdialog .type-options span {margin-top:3px}
#customdialog .rule-sliders {gap:12px 18px}
#customdialog .config-summary {padding-left:14px}
#customdialog .config-summary dl div {margin-bottom:8px}
#customdialog .config-summary .build-heading {margin-bottom:8px}
#customdialog .config-payment {padding:12px}
@media(max-width:750px){
 body dialog#customdialog[open] {padding:0!important}
 #customdialog .config-layout {padding:4px 10px 10px}
 #customdialog .config-controls {padding:0!important}
 #customdialog .rule-sliders {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}
 #customdialog .rule-sliders label {font-size:13px}
 #customdialog .config-summary {padding:8px 10px!important}
 #customdialog .custom-purchase-bar {padding:7px 10px max(7px,env(safe-area-inset-bottom))}
 #customdialog .custom-purchase-bar .buyrow {gap:6px}
 #customdialog #custombuy {padding:10px}
}
@media(max-width:750px){
 body dialog#customdialog[open] {display:flex!important;flex-direction:column;height:auto;max-height:92dvh!important;overflow:hidden!important}
 #customdialog .config-layout {display:block;overflow:auto;min-height:0;flex:0 1 auto}
 #customdialog .type-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 #customdialog .type-options button {min-width:0;padding:6px;font-size:13px}
 #customdialog .type-options b {font-size:15px}
 #customdialog .type-options span {font-size:11px}
 #customdialog .rule-sliders input[type=range] {margin:9px 0 5px;padding:0;height:6px}
 #customdialog .rule-sliders label {min-width:0}
 #customdialog .custom-purchase-bar {flex:none}
}
@media(max-width:750px){
 #customdialog .type-options {grid-template-rows:auto}
 #customdialog .type-options button {margin:0;height:auto;min-height:44px;line-height:1.15}
 #customdialog .config-controls h2 {line-height:1.1}
 #customdialog .config-controls .divider {margin:8px 0}
 #customdialog .rule-sliders {margin:6px 0;gap:6px 10px}
 #customdialog #customnote {margin:6px 0;line-height:1.25}
}

dialog.universal-funding.uf-building {height:var(--catalog-height);box-sizing:border-box}
dialog.universal-funding.uf-building > #customdialog {display:block!important;position:static!important;inset:auto!important;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important;padding:0!important;margin:0!important;overflow:visible!important;border:0;box-shadow:none;background:transparent}
.uf-building #customdialog > :is(#closecustom,.unified-sheet-handle,.sheet-handle) {display:none!important}
.uf-building > .uf-catalog-back {margin:0 0 6px}
.uf-building #customdialog .config-controls h2 {margin:0 0 4px}
.uf-building #customdialog .divider {margin:8px 0}
.uf-building #customdialog .config-layout {padding-block:0;gap:12px}
@media(max-width:750px){
 dialog.universal-funding.uf-building[open] {display:flex;flex-direction:column;overflow:hidden!important}
 .uf-building > .uf-catalog-back {align-self:flex-start}
 dialog.universal-funding.uf-building > #customdialog {display:flex!important;flex-direction:column;min-height:0;flex:1;overflow:hidden!important}
 .uf-building #customdialog .config-layout {flex:1;overflow:auto}
}

/* Blend the embedded builder into the funding sheet while keeping its text opaque. */
html body dialog.uf-building > #customdialog,
html body dialog.uf-building #customdialog .config-summary .config-payment {
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
html body dialog.uf-building #customdialog .config-layout > .config-summary {
  background:linear-gradient(90deg,transparent,rgba(var(--summary-wash),.035) 50%,transparent)!important;
  border-color:transparent!important;
  box-shadow:none!important;
}
.uf-building #customdialog .config-layout {padding-inline:clamp(10px,1.2vw,16px);box-sizing:border-box}

#customdialog .rule-sliders {row-gap:12px;column-gap:clamp(16px,2vw,30px);align-items:start}
#customdialog .rule-sliders > label {min-width:0;padding-top:9px;border-top:1px solid color-mix(in srgb,currentColor 22%,transparent)}
#customdialog .rule-sliders > label > input[type=range] {display:block;width:100%;box-sizing:border-box;margin:12px 0 5px}
#customdialog .rule-sliders > label > input[type=range] + span {display:flex;justify-content:space-between;align-items:baseline;font-size:.82em;line-height:1.25;font-variant-numeric:tabular-nums}

#customdialog .rule-sliders > label:has(#customtrail) {grid-column:1 / -1;display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding-block:12px 4px}

.chart-pane .chart-side-actions {position:absolute;z-index:3;left:var(--chart-tools-edge,0px);bottom:max(112px,32%);display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.chart-pane .chart-side-actions button {writing-mode:vertical-rl;background:#141715;color:#fff;border:1px solid #414640;border-radius:0 4px 4px 0;padding:7px 3px;font:600 11px/1.15 Arial,sans-serif;cursor:pointer}
@media(max-width:750px){.chart-pane .chart-side-actions {left:0;bottom:max(112px,32%);margin-inline-start:0}}
#chart-feedback {width:min(360px,92vw);padding:20px;border:1px solid #536558;border-radius:12px;background:var(--paper,#17211a);color:var(--ink,#f1f5f2)}
#chart-feedback::backdrop {background:#0009}
#chart-feedback textarea {display:block;width:100%;margin-top:7px;padding:8px;font:inherit}
#chart-feedback form>div {display:flex;justify-content:flex-end;gap:8px}
