/* Velum site — shared look, taken from the client's own house theme (ThemeDefinition.VELUM):
   neutral black liquid glass (never tinted), one periwinkle accent, light large type, uppercase overlines,
   the black Dynamic Island, toggles whose knob blooms, and motion that dissolves in place. */
:root {
   --bg: #04050b;
   --accent: #a7b8ff;
   --accent-hi: #c3ceff;
   --accent-2: #8ea2ff;
   --on-accent: #0a0d1a;
   --ink: #f4f6ff;
   --dim: #a9b0c6;
   --faint: #7e8499;
   --glass: rgba(9, 11, 20, .5);
   --glass-strong: rgba(7, 8, 15, .72);
   --rim: rgba(255, 255, 255, .11);
   --rim-hi: rgba(255, 255, 255, .22);
   --well: rgba(255, 255, 255, .045);
   --well-hi: rgba(255, 255, 255, .08);
   --good: #8ef0b4;
   --bad: #ff8a8a;
   --ease: cubic-bezier(.25, .1, .25, 1);
   --ease-out: cubic-bezier(.4, 0, 1, 1);
   --glide: cubic-bezier(.16, 1, .3, 1);
   --sans: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
   --mono: "Geist Mono", ui-monospace, monospace;
   /* Older names used by page styles. */
   --panel: var(--glass);
   --panel-solid: #0b0d16;
   --field: var(--well);
   --edge: var(--rim);
   --edge-hi: var(--rim-hi);
   --sky: #8ea2ff;
   --indigo: #c3ceff;
   --cyan: #a7b8ff;
   --r: 18px;
   --r-sm: 11px;
   color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.glide { scroll-behavior: auto; }
html.glide #smooth { position: fixed; top: 0; left: 0; width: 100%; will-change: transform; }
html, body { margin: 0; }
body {
   background: var(--bg);
   color: var(--ink);
   font: 400 15px/1.6 var(--sans);
   letter-spacing: -.005em;
   -webkit-font-smoothing: antialiased;
   overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: rgba(167, 184, 255, .35); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.mono { font-family: var(--mono); }
.muted { color: var(--dim); }
.overline, .kicker { font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* ---------- Scene: blue water behind everything ---------- */
#waves { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.vignette { position: fixed; inset: 0; z-index: -1; pointer-events: none;
   background: radial-gradient(120% 90% at 50% 35%, transparent 50%, rgba(2, 3, 10, .6) 100%); }
/* Fine grain so large gradients never band. */
.vignette::after { content: ""; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- Glass ---------- */
.glass, .card {
   position: relative;
   background: var(--glass);
   border: 1px solid var(--rim);
   border-radius: var(--r);
   box-shadow: 0 30px 80px rgba(0, 0, 0, .38), inset 0 0 0 1px rgba(255, 255, 255, .02);
}
.card { padding: 24px; }
/* The edge light: a stroke that follows the curve, brightest where the cursor is. */
.card.glow::before {
   content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
   background: radial-gradient(240px circle at var(--mx, -500px) var(--my, -500px), rgba(195, 206, 255, .9), rgba(167, 184, 255, .25) 45%, transparent 70%);
   -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
   opacity: 0; transition: opacity .2s var(--ease);
}
.card.glow:hover::before { opacity: 1; }
.card h3 { margin: 0; font-size: 19px; font-weight: 500; letter-spacing: -.015em; }
/* Accent-filled: how Velum shows an enabled module. */
.filled { background: linear-gradient(160deg, var(--accent-hi), var(--accent)); color: var(--on-accent); border-color: transparent; }
.filled .muted, .filled .sub { color: rgba(10, 13, 26, .68); }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 500 11.5px var(--mono);
   color: var(--accent-hi); background: rgba(167, 184, 255, .1); border: 1px solid rgba(167, 184, 255, .3); }

/* ---------- Dynamic Island (site navigation) ---------- */
.island {
   position: fixed; top: 14px; left: 50%; z-index: 70; transform: translateX(-50%);
   display: flex; align-items: center; gap: 4px;
   height: 46px; padding: 5px 5px 5px 8px; border-radius: 26px;
   background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 16px 50px rgba(0, 0, 0, .55);
   transition: padding .2s var(--ease), box-shadow .2s var(--ease);
   max-width: calc(100vw - 24px);
}
.island:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .26), 0 16px 50px rgba(0, 0, 0, .55); }
.isl-mark { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); }
.isl-mark svg { width: 19px; height: 19px; fill: #05060c; }
.isl-label { position: relative; display: grid; min-width: 0; padding: 0 10px 0 8px; height: 34px; align-items: center; overflow: hidden; white-space: nowrap; }
.isl-label span { grid-area: 1 / 1; font-size: 13.5px; font-weight: 500; color: var(--ink); transition: opacity .2s var(--ease), filter .2s var(--ease), transform .2s var(--ease); }
.isl-label span small { color: #8f96ad; font-size: 13.5px; }
.isl-label span.out { opacity: 0; filter: blur(4px); transform: translateY(-4px); transition-timing-function: var(--ease-out); transition-duration: .14s; }
.isl-label span.pre { opacity: 0; filter: blur(4px); transform: translateY(5px); transition: none; }
.isl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 7px; display: inline-block; vertical-align: 1px; box-shadow: 0 0 8px var(--good); }
.isl-links { display: flex; align-items: center; gap: 2px; overflow: hidden; max-width: 360px; opacity: 1;
   transition: max-width .2s var(--ease), opacity .2s var(--ease), filter .2s var(--ease); }
.isl-links a { padding: 7px 12px; border-radius: 18px; font-size: 13.5px; color: #c9cee0; white-space: nowrap; transition: background .14s, color .14s; }
.isl-links a:hover, .isl-links a[aria-current] { background: rgba(255, 255, 255, .1); color: #fff; }
.island.compact:not(:hover):not(:focus-within) .isl-links { max-width: 0; opacity: 0; filter: blur(4px); transition-duration: .14s; transition-timing-function: var(--ease-out); }
.isl-cta { flex: none; height: 36px; padding: 0 16px; border-radius: 18px; display: grid; place-items: center; font-size: 13.5px; font-weight: 600; color: var(--on-accent);
   background: var(--accent); transition: background .14s, box-shadow .14s; }
.isl-cta:hover { background: var(--accent-hi); box-shadow: 0 0 22px rgba(167, 184, 255, .55); }
@media (max-width: 640px) {
   .island .isl-links { display: none; }
   .island.open .isl-links { display: flex; }
   .island { flex-wrap: wrap; height: auto; min-height: 46px; justify-content: space-between; }
   .island.open { border-radius: 22px; }
   .island.open .isl-links { order: 3; width: 100%; max-width: none; justify-content: space-around; padding: 6px 0 4px; }
}

/* ---------- Buttons ---------- */
.btn {
   position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
   height: 42px; padding: 0 20px; border-radius: 21px; border: 1px solid var(--rim-hi);
   background: rgba(255, 255, 255, .06); color: var(--ink); font-weight: 500; font-size: 14.5px; cursor: pointer;
   transition: background .14s var(--ease), border-color .14s, box-shadow .14s; overflow: hidden; isolation: isolate; white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .32); }
.btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hi); box-shadow: 0 0 28px rgba(167, 184, 255, .45); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn svg { width: 16px; height: 16px; flex: none; }
/* Contained ink pulse on press (no scale). */
.btn .ripple { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; transform: scale(0);
   background: currentColor; opacity: .16; animation: ink .45s var(--ease) forwards; }
@keyframes ink { to { transform: scale(1); opacity: 0; } }

/* ---------- Click GUI parts: module tabs, grouped wells, rows, slider bars, checkboxes ---------- */
.tabs { display: flex; align-items: center; gap: 4px; min-height: 50px; padding: 0 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 44px; padding: 0 18px; border-radius: 13px; border: 0; background: none; cursor: pointer; position: relative;
   font: 600 17px var(--sans); letter-spacing: -.01em; color: var(--ink); transition: color .14s var(--ease); }
.tab.off { color: #7f879f; }
.tab::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(150deg, var(--accent), var(--accent-2)); opacity: 0; transition: opacity .16s var(--ease); }
.tab span { position: relative; }
.tab[aria-selected="true"] { color: var(--on-accent); }
.tab[aria-selected="true"]::before { opacity: 1; }
.tabs .spacer { flex: 1; }
.tabs .plan-pill { flex: none; font: 500 12.5px var(--mono); color: var(--dim); padding: 6px 12px; border-radius: 999px; background: var(--well); }
/* A group: dim header, then rows. */
.well { border-radius: 18px; background: rgba(4, 6, 16, .34); padding: 18px 20px 20px; }
.well > .gh { font-size: 16px; font-weight: 600; color: #8b93ab; letter-spacing: -.01em; margin-bottom: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.row .l { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.row .l small { display: block; font-size: 13px; font-weight: 400; color: var(--dim); letter-spacing: 0; margin-top: -1px; }
.row .v { font-size: 17px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.row .v.dim { color: var(--dim); font-weight: 500; }
.good { color: var(--good); }

/* Slider bar, as in the client: thick, rounded, accent gradient fill. */
.bar { height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .07); margin: 4px 0 12px; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s var(--ease); }

/* Checkbox: rounded square, accent when on. */
.check { display: flex; align-items: center; gap: 14px; min-height: 46px; width: 100%; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.check .box { flex: none; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .06); display: grid; place-items: center; position: relative; overflow: hidden; }
.check .box::before { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, var(--accent), var(--accent-2)); opacity: 0; transition: opacity .14s var(--ease); }
.check .box svg { position: relative; width: 15px; height: 15px; fill: none; stroke: var(--on-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .14s var(--ease); }
.check[aria-checked="true"] .box::before, .check[aria-checked="true"] .box svg { opacity: 1; }
.check .t { font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: #8b93ab; transition: color .14s var(--ease); }
.check[aria-checked="true"] .t { color: var(--ink); }
.check .t small { display: block; font-size: 13px; font-weight: 400; color: var(--dim); }
.check.static { cursor: default; }
.act { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.btn.accent { background: linear-gradient(150deg, var(--accent), var(--accent-2)); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.btn.accent:hover { box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 55%, transparent); }

/* ---------- Toggle: endpoints cross-dissolve, the on knob blooms ---------- */
.toggle { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; border: 0; padding: 0; cursor: pointer;
   background: rgba(255, 255, 255, .13); transition: background .14s var(--ease); }
.toggle::before, .toggle::after { content: ""; position: absolute; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: opacity .14s var(--ease); }
.toggle::before { left: 4px; opacity: 1; }
.toggle::after { right: 4px; opacity: 0; box-shadow: 0 0 10px 2px rgba(255, 255, 255, .9), 0 0 22px 6px rgba(167, 184, 255, .75); }
.toggle[aria-checked="true"] { background: var(--accent); }
.toggle[aria-checked="true"]::before { opacity: 0; }
.toggle[aria-checked="true"]::after { opacity: 1; }
.filled .toggle { background: rgba(10, 13, 26, .22); }
.filled .toggle[aria-checked="true"] { background: rgba(10, 13, 26, .85); }

/* ---------- Segmented control: selection dissolves, no travelling pill ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--well); border: 1px solid var(--rim); }
.seg button { border: 0; background: none; cursor: pointer; padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--dim);
   transition: background .16s var(--ease), color .16s var(--ease); }
.seg button[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.seg .pill { display: none; }

/* ---------- Fields ---------- */
.field { width: 100%; height: 42px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--rim); background: var(--well);
   color: var(--ink); font: inherit; font-size: 14px; outline: none; transition: border-color .14s, box-shadow .14s; }
.field:focus { border-color: rgba(167, 184, 255, .6); box-shadow: 0 0 0 3px rgba(167, 184, 255, .16); }
.field::placeholder { color: var(--faint); }

/* ---------- Reveal: stationary dissolve ---------- */
[data-reveal] { opacity: 0; filter: blur(8px); transform: translateY(18px);
   transition: opacity 1.4s var(--glide), filter 1.4s var(--glide), transform 1.4s var(--glide); transition-delay: var(--d, 0s); }
[data-reveal].in { opacity: 1; filter: none; transform: none; }

/* ---------- Toast (fallback when a page has no island) ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translateX(-50%); opacity: 0; pointer-events: none;
   padding: 10px 16px; border-radius: 999px; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); font-size: 13.5px; transition: opacity .2s var(--ease); }
.toast.show { opacity: 1; }

footer { padding: 40px 0 56px; color: var(--faint); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 18px; }
footer nav a:hover { color: var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .16em; font-size: 13px; }
.brand svg { width: 22px; height: 22px; fill: var(--accent); }

@media (prefers-reduced-motion: reduce) {
   *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
   [data-reveal] { opacity: 1; transform: none; filter: none; }
}
