/* Shared finish: satin light surfaces, measured depth, and one control vocabulary. */
:root{--ui-radius:20px;--ui-shadow:0 14px 44px #1d396b0b,0 2px 5px #1d396b04;--ui-ease:cubic-bezier(.2,.7,.25,1)}
:root:not([data-theme="dark"]){--paper:#f6f7f5;--muted:#5d6b82;--line:#dce3ed}
:root:not([data-theme="dark"]) header{background:linear-gradient(180deg,#fffffff5,#f6f7f5f0);border-bottom-color:#dce3ed}
:root:not([data-theme="dark"]) .nav-pill{background:#fff;border-color:#e0e6ef;box-shadow:0 5px 20px #19366d06}
:root:not([data-theme="dark"]) :is(.panel,.metric-card,.position-card,.catalog-card,.journey-entry,.journey-panel){background:linear-gradient(145deg,#fff,#fafbfd);box-shadow:var(--ui-shadow)}
:root:not([data-theme="dark"]) :is(.input-box,.field-input,.field-select){background:#f4f7fb;border-color:#dfe6f0}
:is(.panel,.metric-card,.position-card,.catalog-card){border-radius:var(--ui-radius)}
:is(.input-box,.field-input,.field-select){transition:border-color .18s,box-shadow .18s}
:is(.input-box:focus-within,.field-input:focus,.field-select:focus){border-color:#6f94ef;box-shadow:0 0 0 3px #567de912}
.btn{gap:14px;transition:background .18s,box-shadow .18s,transform .22s var(--ui-ease)}
.btn:active:not(:disabled){transform:translateY(0) scale(.985)}
.btn:focus-visible,.text-link:focus-visible{outline:2px solid var(--cobalt);outline-offset:4px}
.btn svg.icon{width:18px;height:18px;display:block}
.quote-row{align-items:baseline}
.quote-row>:last-child{text-align:right;font-variant-numeric:tabular-nums;min-width:0;overflow-wrap:anywhere}
:is(.metric-card strong,.position-card strong,.table td,.balance-chip b,.allocation-value strong){font-variant-numeric:tabular-nums}
.product-card{position:relative;border-radius:22px;transition:transform .25s var(--ui-ease),border-color .2s,box-shadow .2s;isolation:isolate}
.product-card:before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 100% 0,#7397e814,transparent 65%);border-radius:inherit}
.product-card:hover,.product-card:focus-within{transform:translateY(-4px);border-color:#89a5df;box-shadow:0 16px 32px #26468112}
.product-icon{border:1px solid #7492d32b;background:linear-gradient(145deg,#f2f6ff,#e6edfb)}
:root[data-theme="dark"] .product-icon{background:linear-gradient(145deg,#203550,#14263d);border-color:#5475ac55}
.section-heading{position:relative}
.section-heading:after{content:'';position:absolute;left:0;bottom:-16px;width:56px;height:2px;background:linear-gradient(90deg,#668ee8,transparent);pointer-events:none}
/* The portfolio sits just beyond the Vaults stream instead of at the hero's foot. */
@media(min-width:1001px){
 .confluence-hero .hero-portfolio{top:calc(52.5% + 70px);bottom:auto;right:var(--layout-edge);width:220px}
 .confluence-hero .hero-portfolio:before{content:'';position:absolute;left:24px;top:-29px;width:1px;height:28px;background:linear-gradient(transparent,#7297e480)}
 .confluence-hero .hero-portfolio{border-radius:18px;box-shadow:0 18px 48px #183c7812}
}
/* Each service has an abstract visual signature; forms and finance semantics stay shared. */
.app-shell[data-page]{--service-color:#315ee8}
.app-shell[data-page="perpetuals"]{--service-color:#6653c7}
.app-shell[data-page="liquidity"]{--service-color:#167b9b}
.app-shell[data-page="vaults"]{--service-color:#4763b2}
.app-shell[data-page="launch"]{--service-color:#875bc5}
.app-shell[data-page="tokenized"]{--service-color:#2d7b94}
.app-shell[data-page] .app-heading{position:relative;display:grid;grid-template-columns:76px minmax(0,1fr) auto;align-items:center;gap:24px;padding:12px 0 20px}
.app-shell[data-page] .app-heading>div:not(.service-mark){min-width:0}
.service-mark{width:76px;height:76px;display:grid;place-items:center;position:relative;color:var(--service-color);border:1px solid color-mix(in srgb,var(--service-color) 25%,transparent);background:color-mix(in srgb,var(--service-color) 6%,var(--paper));border-radius:22px;overflow:hidden}
.service-mark>.icon{width:34px;height:34px;stroke-width:1.35;position:relative;z-index:1}
.service-mark:before{content:'';position:absolute;inset:10px;border:1px solid currentColor;opacity:.14;border-radius:inherit;pointer-events:none}
[data-page="swap"] .service-mark:before{inset:13px 7px;border-radius:6px;transform:rotate(-18deg)}
[data-page="perpetuals"] .service-mark{border-radius:12px 28px}
[data-page="perpetuals"] .service-mark:before{inset:8px;transform:rotate(45deg);border-radius:8px}
[data-page="liquidity"] .service-mark{border-radius:50%}
[data-page="liquidity"] .service-mark:before{inset:5px;border-radius:50%;box-shadow:inset 0 0 0 7px var(--paper)}
[data-page="vaults"] .service-mark{border-radius:16px}
[data-page="vaults"] .service-mark:before{inset:8px;border-radius:8px;border-style:double;border-width:3px}
[data-page="launch"] .service-mark:before{transform:rotate(45deg);border-radius:4px;inset:12px}
[data-page="tokenized"] .service-mark:before{border-radius:4px;transform:translate(7px,-6px)}
.app-shell[data-page] .eyebrow:before{background:var(--service-color)}
.app-shell[data-page] .ticket{border-top:3px solid var(--service-color)}
.app-shell[data-page] .app-nav a.active{box-shadow:inset 3px 0 var(--service-color)}
.app-shell[data-page] .info-block .panel-head{border-bottom-color:color-mix(in srgb,var(--service-color) 20%,var(--line))}
:root[data-theme="dark"] .app-shell[data-page]{--service-color:#9bb6ff}
:root[data-theme="dark"] .app-shell[data-page="perpetuals"]{--service-color:#b2a6ec}
:root[data-theme="dark"] .app-shell[data-page="liquidity"]{--service-color:#7dc8dc}
:root[data-theme="dark"] .app-shell[data-page="vaults"]{--service-color:#9fb4ec}
:root[data-theme="dark"] .app-shell[data-page="launch"]{--service-color:#c4a5ed}
:root[data-theme="dark"] .app-shell[data-page="tokenized"]{--service-color:#93c5d8}
/* Reading position is explicit through a line, weight, and aria-current. */
.docs-sidebar{--reading-progress:0%;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.docs-sidebar:before{content:'';display:block;flex:0 0 2px;min-height:2px;margin:0 10px 12px;background:linear-gradient(90deg,var(--cobalt) var(--reading-progress),var(--line) var(--reading-progress));border-radius:2px}
.docs-sidebar>a{position:relative;transition:color .15s,background .15s}
.docs-sidebar>a[aria-current="location"]{color:var(--ink);font-weight:600;background:#6b92e510}
.docs-sidebar>a[aria-current="location"]:before{content:'';position:absolute;left:0;top:8px;bottom:8px;width:2px;border-radius:2px;background:var(--cobalt)}
.doc-section{scroll-margin-top:calc(var(--site-header-height,104px) + 24px)}
.doc-section p{line-height:1.85}
.doc-section h2{max-width:36ch;line-height:1.2}
/* Entrances run once per route/session and leave content usable without JS/IO. */
@keyframes evolix-reveal{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
.reveal-enter{animation:evolix-reveal .6s var(--ui-ease) var(--reveal-delay,0ms) both}
@media(max-width:1000px){.app-shell[data-page] .app-heading{grid-template-columns:64px minmax(0,1fr);gap:20px}.service-mark{width:64px;height:64px;border-radius:18px}.app-heading>.balance-chip{grid-column:2}}
@media(max-width:600px){
 .app-shell[data-page] .app-heading{display:block;padding:8px 0 12px}
 .service-mark{position:absolute;right:0;top:0;width:72px;height:72px;opacity:.12;pointer-events:none}
 .app-shell[data-page] .app-heading>div:not(.service-mark){position:relative}
 .app-shell[data-page] .app-heading h1{max-width:calc(100% - 36px)}
 .app-heading>.balance-chip{margin-top:18px}
 .docs-sidebar:before{flex-basis:100%;margin:0 0 8px}
 .docs-sidebar>a[aria-current="location"]:before{top:auto;bottom:2px;left:10px;right:10px;width:auto;height:2px}
 .product-card:hover,.product-card:focus-within{transform:none}
}
.no-motion .reveal-enter{animation:none}
.no-motion :is(.btn,.product-card,.hero-portfolio):is(:hover,:active,:focus-within){transform:none}
@media(prefers-reduced-motion:reduce){.reveal-enter{animation:none}:is(.btn,.product-card,.hero-portfolio):is(:hover,:active,:focus-within){transform:none}}

.capital-fallback img{width:calc(var(--capital-stage-height,680px)*.72*var(--capital-frame-scale,1));height:calc(var(--capital-stage-height,680px)*.6*var(--capital-frame-scale,1))}
.product-card{--product-accent:#477fff}
.product-card[href="/perpetuals"]{--product-accent:#8a79d6}
.product-card[href="/liquidity"]{--product-accent:#268aa6}
.product-card[href="/vaults"]{--product-accent:#6080c9}
.product-card[href="/launch"]{--product-accent:#9a77ce}
.product-card[href="/tokenized"]{--product-accent:#3d879f}
.product-card .product-icon{color:var(--product-accent)}
.product-card:hover,.product-card:focus-within{border-color:var(--product-accent)}
.capital-core-trigger{width:calc(var(--capital-stage-height,680px)*.21*var(--capital-frame-scale,1));height:calc(var(--capital-stage-height,680px)*.21*var(--capital-frame-scale,1));min-width:82px;min-height:82px}
