/* Profile-specific layout and contrast. Other public pages keep their own scale. */
.reference-public .ref-profile{
  --profile-text:#23354a;
  --profile-muted:#526277;
  --profile-link:#155fb5;
  --profile-border:#d5dfeb;
  --profile-panel:#fff;
  --profile-soft:#f1f5fa;
  color:var(--profile-text);
  background:var(--bg);
  padding-bottom:44px;
}
[data-theme=dark] .reference-public .ref-profile{
  --profile-text:#e5edf8;
  --profile-muted:#b5c4d7;
  --profile-link:#8fc6ff;
  --profile-border:#314761;
  --profile-panel:#152238;
  --profile-soft:#203149;
}
.reference-public .profile-breadcrumb{height:50px;background:var(--surface);border-bottom:1px solid var(--line)}
.reference-public .profile-breadcrumb>.wrap{height:100%;display:flex;align-items:center;min-width:0}
.reference-public .profile-breadcrumb .breadcrumbs{height:auto;min-height:0;width:100%;min-width:0;margin:0;padding:0;border:0;background:transparent;flex-wrap:wrap;line-height:1.6;color:var(--profile-muted);letter-spacing:.5px}
.reference-public .profile-breadcrumb .breadcrumbs>span{color:var(--profile-link);min-width:0;overflow-wrap:anywhere}
.reference-public .ref-profile .page-content{min-width:0;padding-bottom:0}
.reference-public .ref-profile-hero{padding:26px 16px 0}
.reference-public .ref-profile-hero>.trader-avatar{width:96px;height:96px;margin:0 auto 18px;border-width:3px;background:#eaf0f8;color:#405673;outline:1px solid #a9bfdc;box-shadow:none;font-size:28px}
[data-theme=dark] .reference-public .ref-profile-hero>.trader-avatar{background:#293c57;color:#ebf3ff;outline-color:#587aa6}
.reference-public .ref-profile-hero h1{font-size:28px;line-height:1.3;font-weight:800;letter-spacing:-.6px;text-transform:none;color:var(--profile-text);overflow-wrap:anywhere}
.reference-public .ref-profile-meta{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px 12px;margin-top:9px;font-size:12px;font-weight:500;color:var(--profile-muted);line-height:1.7}
.reference-public .ref-profile-meta>span+span{border-left:1px solid var(--profile-border);padding-left:12px}
.reference-public .ref-profile-hero .btn{height:42px;min-height:42px;min-width:132px;margin-top:16px;padding:10px 22px;background:#1765c4;color:#fff;border:1px solid #1765c4;border-radius:9px;font-size:13px;font-weight:700;text-transform:none;line-height:20px}
.reference-public .ref-profile-hero .btn:hover{background:#104f9e;filter:none}
.reference-public .ref-profile-hero .btn svg{width:16px;height:16px}
.reference-public .ref-profile-top{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:28px;align-items:stretch}
.reference-public .ref-profile-contact,.reference-public .ref-profile-fund{min-width:0;min-height:180px;border-radius:18px;padding:22px;border:1px solid var(--profile-border);background:var(--profile-panel)}
.reference-public .ref-profile h2{display:flex;align-items:center;min-height:24px;font-size:16px;font-weight:800;line-height:1.5;letter-spacing:-.2px;padding-left:12px;margin-bottom:17px;color:var(--profile-text);border-left-color:#216ec3}
[data-theme=dark] .reference-public .ref-profile h2{border-left-color:#79b7ff}
.reference-public .ref-profile-contacts{gap:8px}
.reference-public .ref-profile-contacts a{display:grid;grid-template-columns:18px 76px minmax(0,1fr);align-items:baseline;gap:10px;min-height:34px;font-size:14px;font-weight:600;line-height:1.7;color:var(--profile-text);min-width:0;overflow-wrap:anywhere}
.reference-public .ref-profile-contacts a svg{width:16px;height:16px;color:var(--profile-link);align-self:center}
.reference-public .ref-profile-contacts a .ref-contact-label{min-width:0;font-size:13px;font-weight:500;color:var(--profile-muted)}
.reference-public .ref-profile-contacts a .ref-contact-value{min-width:0;color:var(--profile-link);overflow-wrap:anywhere;word-break:normal}
.reference-public .ref-profile-contacts a:hover .ref-contact-value{text-decoration:underline;text-underline-offset:3px}
.reference-public .ref-profile .badge.demo{margin-top:12px;padding:4px 8px;background:#edf2f8;color:#465970;font-size:11px;line-height:1.5;font-weight:600;white-space:normal}
[data-theme=dark] .reference-public .ref-profile .badge.demo{background:#263b54;color:#d2e3f7}
.reference-public .ref-profile-fund{background:#edf8f1;border-color:#afd6bf;color:#20513a}
[data-theme=dark] .reference-public .ref-profile-fund{background:#14372d;border-color:#3a765b;color:#d4ebdf}
.reference-public .ref-profile-fund h2{color:#145c3a;border-left-color:#168653}
[data-theme=dark] .reference-public .ref-profile-fund h2{color:#b0f1cb;border-left-color:#7ee0a7}
.reference-public .ref-fund-value{gap:14px;min-width:0;position:relative;z-index:1}
.reference-public .ref-fund-value>svg{width:46px;height:46px;padding:14px;background:#17764d;color:#fff}
.reference-public .ref-fund-value>div{min-width:0}
.reference-public .ref-fund-value small{font-size:12px;font-weight:500;line-height:1.5;letter-spacing:.1px;text-transform:none;color:#2b6147}
.reference-public .ref-fund-value strong{display:block;margin-top:3px;font-size:26px;font-weight:800;line-height:1.25;color:#11633d;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
[data-theme=dark] .reference-public .ref-fund-value>svg{background:#216c4c}
[data-theme=dark] .reference-public .ref-fund-value small{color:#c1e6d1}
[data-theme=dark] .reference-public .ref-fund-value strong{color:#94edb9}
.reference-public .ref-profile-fund>p{position:relative;z-index:1;font-size:13px;font-weight:400;font-style:normal;line-height:1.75;color:#24543c;margin-top:15px}
.reference-public .ref-profile-fund>p strong{font-weight:650;color:inherit}
[data-theme=dark] .reference-public .ref-profile-fund>p{color:#d4ebdf}
.reference-public .ref-profile-fund>.text-red{padding:10px 12px;border-radius:7px;background:#fff1f2;color:#9f1239;font-weight:600}
[data-theme=dark] .reference-public .ref-profile-fund>.text-red{background:#432633;color:#ffd0d9}
.reference-public .ref-fund-watermark{width:128px;height:150px;right:22px;top:28px;opacity:.035;pointer-events:none}
.reference-public .ref-profile-services{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;margin-top:24px;padding:24px;border-radius:18px;border:1px solid var(--profile-border);background:var(--profile-panel)}
.reference-public .ref-profile-services>div{min-width:0}
.reference-public .ref-services-list{gap:12px}
.reference-public .ref-services-list li{font-size:14px;font-weight:500;line-height:1.7;text-transform:none;color:var(--profile-text);gap:12px}
.reference-public .ref-services-list svg{width:26px;height:26px;padding:6px;background:var(--profile-soft);color:var(--profile-link)}
.reference-public .ref-service-description{font-size:14px;line-height:1.8;font-weight:400;text-transform:none;color:var(--profile-muted);white-space:pre-line;overflow-wrap:anywhere;margin-top:15px}
.reference-public .ref-profile-services .bank-item{min-height:92px;gap:13px;padding:14px;margin-bottom:12px;border:1px solid var(--profile-border);border-radius:11px;background:var(--profile-soft);min-width:0}
.reference-public .ref-profile-services .bank-item:last-child{margin-bottom:0}
.reference-public .ref-bank-symbol{width:38px;height:38px;border-radius:9px;font-size:12px}
.reference-public .ref-profile-services .ref-bank-text{display:block;min-width:0;flex:1;margin:0}
.reference-public .ref-bank-text small{font-size:12px;font-weight:600;line-height:1.5;color:var(--profile-muted)}
.reference-public .ref-bank-text strong{display:block;font-size:15px;font-weight:750;line-height:1.6;letter-spacing:.1px;color:var(--profile-text);font-variant-numeric:tabular-nums;overflow-wrap:anywhere;margin-top:3px}
.reference-public .ref-bank-holder{display:block;font-size:12px;font-weight:400;line-height:1.5;color:var(--profile-muted);overflow-wrap:anywhere}
.reference-public .ref-profile .copy-button{width:36px;height:36px;min-width:36px;flex:none;padding:9px;border:1px solid var(--profile-border);border-radius:8px;background:var(--profile-panel);color:var(--profile-link);align-self:center;justify-content:center}
.reference-public .ref-profile .copy-button:hover{background:var(--profile-soft)}
.reference-public .ref-profile .copy-button svg{width:17px;height:17px}
.reference-public .ref-profile-note.panel{margin-top:24px;padding:22px;border-radius:18px;border:1px solid var(--profile-border);background:var(--profile-panel)}
.reference-public .ref-profile-note p{font-size:14px;line-height:1.8;color:var(--profile-muted)}
.reference-public .ref-profile-note .link{min-height:36px;color:var(--profile-link);font-size:13px;font-weight:650;margin-top:10px;text-decoration:underline;text-underline-offset:4px}
.reference-public .ref-profile .muted{color:var(--profile-muted)}
.reference-public .ref-profile :focus-visible{outline:3px solid var(--profile-link);outline-offset:4px}
@media(max-width:850px){
  .reference-public .ref-profile-top{grid-template-columns:1fr;gap:18px;margin-top:24px}
  .reference-public .ref-profile-contact,.reference-public .ref-profile-fund{min-height:0;padding:22px}
  .reference-public .ref-profile-services{grid-template-columns:1fr;gap:24px;padding:22px}
  .reference-public .ref-profile-services>div+div{padding-top:24px;border-top:1px solid var(--profile-border)}
}
@media(max-width:600px){
  .reference-public .profile-breadcrumb>.wrap{width:calc(100% - 32px)}
  .reference-public .profile-breadcrumb .breadcrumbs{font-size:10px;letter-spacing:0;gap:6px}
  .reference-public .ref-profile-hero{padding-top:24px;padding-inline:0}
  .reference-public .ref-profile-hero>.trader-avatar{width:80px;height:80px;font-size:25px;margin-bottom:16px}
  .reference-public .ref-profile-hero h1{font-size:24px;line-height:1.35}
  .reference-public .ref-profile-meta{font-size:11px;gap:3px 9px;line-height:1.7}
  .reference-public .ref-profile-meta>span+span{padding-left:9px}
  .reference-public .ref-profile-hero .btn{height:44px;min-height:44px;margin-top:15px}
  .reference-public .ref-profile-contact,.reference-public .ref-profile-fund{padding:19px;border-radius:14px}
  .reference-public .ref-profile h2{font-size:15px;margin-bottom:16px;padding-left:10px}
  .reference-public .ref-profile-contacts a{grid-template-columns:16px minmax(0,1fr);gap:2px 9px;min-height:44px;font-size:13px}
  .reference-public .ref-profile-contacts a svg{grid-column:1;grid-row:1/3;align-self:start;margin-top:3px}
  .reference-public .ref-profile-contacts a .ref-contact-label{grid-column:2;font-size:12px}
  .reference-public .ref-profile-contacts a .ref-contact-value{grid-column:2}
  .reference-public .ref-profile .badge.demo{font-size:11px}
  .reference-public .ref-fund-value{gap:12px}
  .reference-public .ref-fund-value>svg{width:42px;height:42px;padding:12px}
  .reference-public .ref-fund-value small{font-size:11px}
  .reference-public .ref-fund-value strong{font-size:25px}
  .reference-public .ref-profile-fund>p{font-size:13px}
  .reference-public .ref-profile-services{padding:19px;border-radius:14px;margin-top:18px}
  .reference-public .ref-service-description,.reference-public .ref-services-list li{font-size:13px}
  .reference-public .ref-profile-services .bank-item{padding:12px;gap:10px;flex-wrap:wrap}
  .reference-public .ref-bank-symbol{width:32px;height:32px;font-size:11px;align-self:flex-start;margin-top:3px}
  .reference-public .ref-bank-text strong{font-size:14px}
  .reference-public .ref-profile .copy-button{width:44px;height:44px;min-width:44px;padding:12px}
  .reference-public .ref-profile-note.panel{padding:19px;border-radius:14px;margin-top:18px}
  .reference-public .ref-profile-note p{font-size:13px}
}
@media(max-width:359px){
  .reference-public .ref-fund-value strong{font-size:22px}
  .reference-public .ref-profile-services .bank-item .copy-button{margin-left:auto}
}
/* On a phone, profile controls live in the header so they do not cover bank or policy text. */
@media(max-width:600px){
  .reference-public:has(.ref-profile) .theme-float{top:13px;bottom:auto;right:16px;width:38px;height:38px;border-radius:10px;background:#1765c4;border:1px solid #1765c4;box-shadow:none}
  .reference-public:has(.ref-profile) .back-top{top:13px;bottom:auto;right:62px;width:38px;height:38px;border-radius:10px;box-shadow:none}
}
