/* ==========================================================================
   CoMindLabs design system — light editorial theme
   Palette and type derived from the supplied logo and layout references.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=Inter:wght@400;450;500;600&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ground — dark is the default theme */
  --bg:        #06070c;
  --bg-2:      #0b0d14;
  --surface:   rgba(255, 255, 255, .028);
  --surface-2: rgba(255, 255, 255, .055);
  --input:     rgba(255, 255, 255, .035);
  --line:      rgba(255, 255, 255, .085);
  --line-2:    rgba(255, 255, 255, .16);
  --logo-grey: rgba(255, 255, 255, .10);

  /* ink */
  --text:   #eef1f7;
  --text-2: #a2abbf;
  --text-3: #6d7689;

  /* brand */
  --violet: #b07cff;
  --blue:   #7c8cff;
  --charcoal: #ffffff;                 /* the "solid" surface for buttons and chips */
  --on-charcoal: #0a0b11;              /* text that sits on it */
  --brand-gradient: linear-gradient(100deg, #a5b0ff 0%, #d0a5ff 48%, #7fe6ff 100%);
  --btn-bg: linear-gradient(135deg, #7c8cff, #6b6bff);
  --btn-fg: #ffffff;
  --btn-bg-hover: linear-gradient(135deg, #8d9bff, #7a7aff);

  /* project accents */
  --indigo:  #7c8cff;
  --emerald: #3ddc97;
  --cyan:    #4fd6e8;
  --amber:   #ffbf47;
  --rose:    #ff7a9c;
  --sky:     #5cb8ff;
  --orange:  #ff9558;
  --teal:    #45dbc0;
  --accent:  var(--indigo);

  /* status */
  --good: #3ddc97;
  --warn: #ffbf47;
  --bad:  #ff6b7d;
  --tint: .14;                          /* alpha used for status tints */
  --tint-line: .28;
  --grid: rgba(255, 255, 255, .10);
  --scrim: rgba(0, 0, 0, .28);

  --good-tint: rgba(61,220,151,.13);  --good-line: rgba(61,220,151,.28);  --good-fg: #6ee7b7;
  --warn-tint: rgba(255,191,71,.13);  --warn-line: rgba(255,191,71,.28);  --warn-fg: #ffd98a;
  --bad-tint:  rgba(255,107,125,.13); --bad-line:  rgba(255,107,125,.28); --bad-fg:  #ffb0ba;
  --blue-tint: rgba(124,140,255,.14); --blue-line: rgba(124,140,255,.30); --blue-fg: #b6c0ff;
  --band-bg: linear-gradient(140deg, #141724, #0b0d14);
  --band-fg: #ffffff;

  --r-sm: 10px; --r: 14px; --r-lg: 18px; --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow:    0 12px 34px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 24px 60px -14px rgba(0, 0, 0, .72);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Inter Tight', 'Inter', ui-sans-serif, -apple-system, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --topbar-bg: rgba(6, 7, 12, .82);
  /* Opaque equivalent of --surface sitting on --bg. Sticky elements inside a
     card need an opaque fill or scrolled content bleeds through them, and a
     flat --bg-2 reads as a different block against the card. */
  --card-solid: color-mix(in srgb, #ffffff 2.8%, var(--bg));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Decorative field behind the page: soft colour on dark, the logo's pale node
   shapes on light. Both drift on the same keyframes. */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(90px); opacity: .30; will-change: transform;
}
.aurora i:nth-child(1) { width: 620px; height: 620px; top: -220px; left: -140px;
  background: radial-gradient(circle, #4b5bff, transparent 70%); animation: drift1 34s ease-in-out infinite; }
.aurora i:nth-child(2) { width: 540px; height: 540px; top: -120px; right: -160px;
  background: radial-gradient(circle, #a855f7, transparent 70%); animation: drift2 42s ease-in-out infinite; }
.aurora i:nth-child(3) { width: 460px; height: 460px; top: 46%; left: 30%;
  background: radial-gradient(circle, #06b6d4, transparent 70%); opacity: .16; animation: drift3 50s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(120px, 80px) scale(1.14); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-100px, 110px) scale(.88); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(80px,-90px) scale(1.18); } }

.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 3px 3px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}

/* -------------------------------------------------------------- typography */

h1, h2, h3, h4 { font-family: var(--display); font-weight: 620; letter-spacing: -.022em; line-height: 1.14; margin: 0 0 .45em; color: var(--text); }
h1 { font-size: clamp(30px, 3.6vw, 42px); }
h2 { font-size: 23px; }
h3 { font-size: 17px; letter-spacing: -.018em; }
p { margin: 0 0 1em; color: var(--text-2); }
a { color: var(--blue); text-decoration: none; transition: color .15s; }
a:hover { color: #2f57b8; }
code, pre, .mono { font-family: var(--mono); font-size: .9em; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); font-size: 13px; }
.kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--text-3); font-weight: 600; margin-bottom: 9px; }
.tnum { font-variant-numeric: tabular-nums; }
.gradient-text {
  background: linear-gradient(100deg, #a5b0ff 0%, #d0a5ff 48%, #7fe6ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------------------------------------------ layout */

main { max-width: 1160px; margin: 0 auto; padding: 36px 24px 110px; }
main.wide { max-width: 1400px; }
main.narrow { max-width: 470px; padding-top: 60px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 9px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.sep { width: 1px; height: 22px; background: var(--line); }

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky; top: 14px; z-index: 60;
  /* Equal-width outer columns put the capsule at the true centre of the
     viewport, rather than centred in whatever space the brand and the action
     buttons happen to leave over. */
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px;
  margin: 14px 18px 0; padding: 0 24px; height: 58px;
  /* No panel and no fade behind the logo. The nav itself is unchanged. */
  background: transparent;
  border-bottom: 0;
  overflow: visible;
  transition: height .35s var(--ease);
}
.topbar.scrolled { height: 50px; }
.topbar .brand-mark, .topbar .brand-logo, .topbar .avatar { transition: transform .35s var(--ease); }
.topbar.scrolled .brand-mark, .topbar.scrolled .brand-logo { transform: scale(.88); }

/* Ops console: separate chrome from the worker product shell. */
body.ops-mode .topbar {
 border-bottom: 1px solid color-mix(in srgb, var(--indigo) 28%, var(--line));
 background: color-mix(in srgb, var(--bg) 88%, var(--indigo) 12%);
}
body.ops-mode .nav-capsule a.on {
 color: var(--indigo);
}

.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: -.03em; }
.brand:hover { color: var(--text); }
.brand-logo {
  display: block; width: auto; height: 28px; flex: none;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, #ffffff 4%, var(--bg));
  border: 1px solid var(--line);
  overflow: hidden; padding: 6px;
}
.brand-mark .brand-logo { width: 100%; height: auto; filter: none; }

/* Nav sits in a bordered capsule, centred between the brand and the actions. */
.nav-capsule {
  display: flex; align-items: center; gap: 2px;
  justify-self: center; padding: 3px; max-width: 100%; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border: 1px solid var(--line); border-radius: 13px;
  backdrop-filter: blur(10px);
}
.nav-capsule::-webkit-scrollbar { display: none; }
.nav-capsule a {
  padding: 6px 14px; border-radius: 10px; border: 1px solid transparent;
  color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: color .16s, background .16s, border-color .16s;
}
.nav-capsule a:hover { color: var(--text); background: var(--surface-2); }
.nav-capsule a.on {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  border-color: color-mix(in srgb, var(--blue) 52%, transparent);
  color: var(--text); font-weight: 600; border-radius: 10px;
  box-shadow: 0 0 18px -6px color-mix(in srgb, var(--blue) 70%, transparent);
}

.topnav { display: flex; gap: 2px; }
.topnav a {
  padding: 8px 14px; border-radius: 10px; border: 1px solid transparent;
  color: var(--text-2); font-size: 14.5px; font-weight: 500;
  transition: color .15s, background .15s, border-color .15s;
}
.topnav a:hover { background: var(--surface-2); color: var(--text); }
.topnav a.on {
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  border-color: color-mix(in srgb, var(--blue) 46%, transparent);
  color: var(--text); font-weight: 600;
}
.brand-accent { color: var(--blue); }

/* ------------------------------------------------------- mobile menu -- */

/* Two-rule mark in a circular control; crosses into an X while the menu is open. */
.icon-btn.burger { display: none; align-items: center; justify-content: center; }
.burger-lines { position: relative; display: block; width: 16px; height: 12px; }
.burger-lines i {
  position: absolute; left: 0; width: 100%; height: 1.6px; border-radius: 2px;
  background: currentColor;
  transition: transform .32s var(--ease), width .32s var(--ease), opacity .2s;
}
.burger-lines i:nth-child(1) { top: 2px; }
.burger-lines i:nth-child(2) { bottom: 2px; width: 68%; }
.icon-btn.burger:hover .burger-lines i:nth-child(2) { width: 100%; }
.icon-btn.burger.open .burger-lines i:nth-child(1) { transform: translateY(3.2px) rotate(45deg); }
.icon-btn.burger.open .burger-lines i:nth-child(2) { width: 100%; transform: translateY(-3.2px) rotate(-45deg); }

.mobile-nav { position: fixed; inset: 0; z-index: 150; }
.mobile-scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,.62);
  opacity: 0; transition: opacity .3s var(--ease); backdrop-filter: blur(3px);
}
.mobile-nav.open .mobile-scrim { opacity: 1; }
.mobile-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(88vw, 340px);
  background: var(--bg-2); border-left: 1px solid var(--line);
  padding: 26px 22px; overflow-y: auto;
  transform: translateX(100%); transition: transform .34s var(--ease);
  display: flex; flex-direction: column; gap: 26px;
}
.mobile-nav.open .mobile-panel { transform: translateX(0); }
.mobile-links { display: grid; gap: 4px; }
.mobile-links a {
  padding: 14px 16px; border-radius: 12px; border: 1px solid transparent;
  color: var(--text-2); font-family: var(--display); font-size: 17px; font-weight: 550;
  transition: background .16s, color .16s, border-color .16s;
}
.mobile-links a:hover { background: var(--surface-2); color: var(--text); }
.mobile-links a.on {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  border-color: color-mix(in srgb, var(--blue) 46%, transparent);
  color: var(--text);
}
.mobile-actions { display: grid; gap: 10px; margin-top: auto; }

/* Tighten the capsule rather than dropping it, so the burger stays mobile-only. */
@media (max-width: 1120px) {
  .nav-capsule a { padding: 8px 12px; font-size: 13.8px; }
  .topbar { gap: 12px; padding: 0 16px; }
}
@media (max-width: 900px) {
  .nav-capsule a { padding: 7px 10px; font-size: 13.2px; }
}
/* True mobile only: hand navigation to the drawer. */
@media (max-width: 760px) {
  .nav-capsule { display: none; }
  .icon-btn.burger { display: flex; }
}
@media (max-width: 620px) { .hide-sm { display: none !important; } }

.topbar-end { justify-self: end; display: flex; align-items: center; gap: 11px; }
.topbar .brand { justify-self: start; }



.balance-chip {
  /* squared to match the nav items rather than reading as a pill */
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px;
  background: var(--good-tint); border: 1px solid var(--good-line); box-shadow: none;
  transition: box-shadow .18s, transform .18s var(--ease);
}
.balance-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.balance-chip b { color: var(--good); font-family: var(--display); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }

.icon-btn {
  position: relative; width: 33px; height: 33px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2); cursor: pointer; padding: 0;
  box-shadow: var(--shadow-sm); transition: background .15s, color .15s, transform .18s var(--ease);
}
.icon-btn:hover { color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow); }
.dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 2px var(--bg); }

/* ------------------------------------------------------------------ avatar */

.avatar { border-radius: 50%; flex: none; overflow: hidden; display: block; background: var(--logo-grey); }
.avatar.ring { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }

/* ------------------------------------------------------------------- cards */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card.glow { border-color: var(--blue-line); box-shadow: 0 0 0 3px var(--blue-tint); }
.card.pad-lg { padding: 30px; }
.card + .card { margin-top: 18px; }
/* Grid and flex layouts space their own children, so the stacking margin must
   not apply there — inside a grid it also shortens the stretched sibling. */
.grid > .card + .card, .duo > .card + .card, .stack > .card + .card { margin-top: 0; }

.stat {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 17px 19px; box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: clamp(23px, 2.4vw, 29px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.stat span { display: block; font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; margin-top: 6px; font-weight: 600; }
.stat .trend { position: absolute; top: 15px; right: 17px; font-size: 11.5px; font-weight: 600; }

/* ------------------------------------------------------------------- pills */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; font-family: var(--display);
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
  letter-spacing: .01em; white-space: nowrap;
}
.pill.good { background: var(--good-tint); color: var(--good); border-color: var(--good-line); }
.pill.warn { background: var(--warn-tint); color: var(--warn); border-color: var(--warn-line); }
.pill.bad  { background: var(--bad-tint); color: var(--bad); border-color: var(--bad-line); }
.pill.brand{ background: var(--blue-tint); color: var(--blue); border-color: var(--blue-line); }
.pill.solid{ background: var(--charcoal); color: var(--on-charcoal); border-color: transparent; }
.pill.lg { padding: 6px 14px; font-size: 12.5px; }
.pay { color: var(--good); font-weight: 700; font-variant-numeric: tabular-nums; }

.tier-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px 5px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid currentColor; background: color-mix(in srgb, currentColor 12%, transparent);
}
.tier-badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------- controls */

button, .btn {
  font: 600 14.5px var(--display); letter-spacing: -.01em;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .18s var(--ease), box-shadow .2s, background .2s, color .2s;
  box-shadow: var(--shadow-sm);
}
button:hover:not(:disabled), .btn:hover { transform: translateY(-1.5px); box-shadow: var(--shadow); color: var(--btn-fg); background: var(--btn-bg-hover); }
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; transform: none; }
button.ghost, .btn.ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); }
button.ghost:hover:not(:disabled), .btn.ghost:hover { background: var(--surface); border-color: var(--text-3); color: var(--text); }
button.accent, .btn.accent { background: var(--rose); color: var(--on-charcoal); }
button.accent:hover:not(:disabled) { background: var(--rose); filter: brightness(1.08); }
button.ok { background: var(--good); color: var(--on-charcoal); }
button.ok:hover:not(:disabled) { filter: brightness(1.08); background: var(--good); }
button.danger { background: var(--bad-tint); color: var(--bad); border-color: var(--bad-line); }
button.danger:hover:not(:disabled) { background: var(--bad-tint); filter: brightness(1.15); color: var(--bad); }
button.sm, .btn.sm { padding: 6px 13px; font-size: 13.5px; }
button.lg, .btn.lg { padding: 14px 28px; font-size: 15.5px; }
button.block { width: 100%; }
button.link { background: none; border: 0; box-shadow: none; color: var(--blue); padding: 0; font-weight: 500; }
button.link:hover { transform: none; box-shadow: none; background: none; color: var(--blue); text-decoration: underline; }

label { display: block; font: 600 12.5px var(--display); color: var(--text-2); margin-bottom: 7px; letter-spacing: .005em; }
input, textarea, select {
  font: 400 14.5px var(--sans); width: 100%; color: var(--text);
  background: var(--input); border: 1px solid var(--line-2); border-radius: 11px;
  padding: 11px 14px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3.5px var(--blue-tint); }
input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3.5px var(--bad-tint); }
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
textarea.code { font-family: var(--mono); font-size: 13px; line-height: 1.65; min-height: 220px; tab-size: 4; background: var(--surface-2); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 51%, calc(100% - 13px) 51%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.field { margin-bottom: 16px; }
.field-hint { font-size: 12.5px; color: var(--text-3); margin: -3px 0 8px; }
.counter { font-size: 11.5px; color: var(--text-3); margin-top: 6px; text-align: right; font-variant-numeric: tabular-nums; transition: color .2s; }
.counter.short { color: var(--warn); }
.counter.ok { color: var(--good); }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.choices { display: grid; gap: 9px; }
.choice {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); transition: all .18s var(--ease);
}
.choice:hover { border-color: var(--line-2); }
.choice input { width: auto; margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.choice.picked { border-color: var(--blue); background: var(--blue-tint); box-shadow: 0 0 0 1px var(--blue-line); }
.choice.right { border-color: var(--good); background: var(--good-tint); }
.choice.wrong { border-color: var(--bad); background: var(--bad-tint); }
.choice b { font-weight: 600; font-size: 14.5px; }
.choice .faint { margin-top: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font: 500 13.5px var(--sans); color: var(--text-2); cursor: pointer; transition: all .16s var(--ease); user-select: none;
}
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip.on { background: var(--charcoal); border-color: var(--charcoal); color: var(--on-charcoal); }
.chip.on.bad-tone { background: var(--rose); border-color: var(--rose); color: var(--on-charcoal); }

.scale { display: flex; gap: 8px; flex-wrap: wrap; }
.scale button {
  width: 46px; height: 44px; padding: 0; background: var(--surface); box-shadow: none;
  border: 1px solid var(--line-2); color: var(--text-2); font-weight: 600; font-size: 15px;
}
.scale button:hover:not(.on) { border-color: var(--text-3); color: var(--text); transform: none; background: var(--surface); }
.scale button.on { background: var(--charcoal); border-color: var(--charcoal); color: var(--on-charcoal); transform: translateY(-2px); box-shadow: var(--shadow); }
.scale.wide button { flex: 1; min-width: 46px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { display: none; }
.switch i { width: 40px; height: 23px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .22s var(--ease); box-shadow: var(--shadow-sm); }
.switch input:checked + i { background: var(--good); }
.switch input:checked + i::after { transform: translateX(17px); }

/* ---------------------------------------------------------------- readouts */

.readout {
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 15px 18px; white-space: pre-wrap; line-height: 1.68; font-size: 14.5px;
  max-height: 440px; overflow: auto; color: var(--text);
}
.readout.alt { border-left-color: var(--violet); }
pre.readout { white-space: pre; font-family: var(--mono); font-size: 12.8px; line-height: 1.7; }
.instructions { white-space: pre-wrap; color: var(--text-2); font-size: 14.5px; line-height: 1.78; }
.instructions strong { color: var(--text); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 10px 12px; color: var(--text-3); font: 600 10.5px var(--display); text-transform: uppercase; letter-spacing: .12em; border-bottom: 1px solid var(--line); }
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }

.confirm-pop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.confirm-scrim { position: absolute; inset: 0; background: rgba(6, 7, 12, .78); }
.confirm-pop .confirm-card {
  position: relative; width: min(440px, 100%); margin: 0;
  background: #12141c !important;
  opacity: 1;
  backdrop-filter: none;
  border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.notice { padding: 14px 17px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; border: 1px solid; display: flex; gap: 11px; align-items: flex-start; }
.notice.err  { background: var(--bad-tint); color: var(--bad-fg); border-color: var(--bad-line); }
.notice.ok   { background: var(--good-tint); color: var(--good-fg); border-color: var(--good-line); }
.notice.info { background: var(--blue-tint); color: var(--blue-fg); border-color: var(--blue-line); }
.notice.warn { background: var(--warn-tint); color: var(--warn-fg); border-color: var(--warn-line); }
.notice b { color: inherit; }

.empty { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty h3 { color: var(--text-2); }

/* ---------------------------------------------------------------- feedback */

.toast-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: grid; gap: 10px; justify-items: end; }
.toast {
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  border-radius: 13px; padding: 14px 18px; font-size: 14px; max-width: 350px; color: var(--text);
  animation: toastIn .32s var(--ease); display: flex; gap: 11px; align-items: center;
}
.toast.ok  { border-left: 3px solid var(--good); }
.toast.err { border-left: 3px solid var(--bad); }
.toast.out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--bg-2) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r);
  border: 1px solid var(--line);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.spinner {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; flex: none;
}
button.ghost .spinner, .ghost .spinner { border-color: var(--line-2); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 6px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: var(--brand-gradient); transition: width .8s var(--ease); }
.progress.good i { background: var(--good); }

/* ------------------------------------------------------------- animations */

.rise { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.stagger > * { animation: rise .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s }
.stagger > *:nth-child(2) { animation-delay: .06s }
.stagger > *:nth-child(3) { animation-delay: .1s }
.stagger > *:nth-child(4) { animation-delay: .14s }
.stagger > *:nth-child(5) { animation-delay: .18s }
.stagger > *:nth-child(6) { animation-delay: .22s }
.stagger > *:nth-child(7) { animation-delay: .26s }
.stagger > *:nth-child(8) { animation-delay: .3s }
.stagger > *:nth-child(n+9) { animation-delay: .34s }

.view-enter { animation: viewIn .42s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(9px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .aurora i { animation: none; }
  .forge-fallback::before, .forge-fallback::after { animation: none !important; }
  html { scroll-behavior: auto; }
  /* every scroll-driven transform is skipped, so nothing is left mid-flight */
  .rv, .rv-wipe { clip-path: none !important; filter: none !important; transform: none !important; opacity: 1 !important; }
}

/* ----------------------------------------------------------------- landing */

.hero { text-align: center; padding: 78px 0 46px; position: relative; }
.hero h1 { font-size: clamp(38px, 6.2vw, 68px); max-width: 940px; margin: 0 auto .32em; letter-spacing: -.04em; line-height: 1.04; }
.hero p { font-size: 17.5px; max-width: 590px; margin: 0 auto 30px; line-height: 1.65; }
.hero .row { justify-content: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2);
  margin-bottom: 26px;
}
.eyebrow .pill { padding: 3px 9px; font-size: 10.5px; }

/* ---- 3D forge overlay (background only; does not restyle the landing) -- */

.forge-scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}
.forge-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.72;
}
.forge-fallback::before,
.forge-fallback::after {
  content: '';
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(115deg, transparent 0 34px, rgba(255,255,255,.02) 34px 35px),
    repeating-linear-gradient(25deg, transparent 0 42px, rgba(124,140,255,.035) 42px 43px);
  animation: forgeDrift 28s linear infinite;
  opacity: .6;
}
.forge-fallback::after {
  animation-direction: reverse;
  animation-duration: 40s;
  opacity: .3;
  mix-blend-mode: screen;
}
@keyframes forgeDrift {
  from { transform: translate3d(0, 0, 0) rotate(0.001deg); }
  to { transform: translate3d(-4%, 3%, 0) rotate(0.001deg); }
}
main.has-forge {
  position: relative;
  z-index: 1;
}
body:has(main.has-forge) .aurora { opacity: .45; }

.ticker { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); padding: 6px 0; }
.ticker-track { display: flex; gap: 12px; width: max-content; animation: marquee 46s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.ticker-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; white-space: nowrap; color: var(--text-2);
}

#rates, #catalogue, #rates .rate-row, #catalogue .card { opacity: 1; visibility: visible; }
.rate-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rate-row:last-child { border-bottom: 0; }

.feature-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  color: var(--accent);
}

.fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 54px; height: 54px; border-radius: 999px; padding: 0;
  background: var(--rose); color: var(--on-charcoal); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.fab:hover { background: var(--rose); filter: brightness(1.08); }

/* -------------------------------------------------------------- onboarding */

.steps { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.step { display: flex; align-items: center; gap: 10px; flex: none; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text-3);
  font-weight: 600; font-size: 13px; transition: all .32s var(--ease);
}
.step.on .step-dot { border-color: var(--charcoal); background: var(--charcoal); color: var(--on-charcoal); box-shadow: 0 0 0 5px var(--scrim); }
.step.done .step-dot { border-color: var(--good); background: rgba(18,144,95,.1); color: var(--good); }
.step-label { font-weight: 600; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.step.on .step-label { color: var(--text); }
.step.done .step-label { color: var(--text-2); }
.step-line { flex: 1; height: 1.5px; background: var(--line-2); margin: 0 12px; min-width: 16px; position: relative; overflow: hidden; }
.step-line.filled::after { content: ''; position: absolute; inset: 0; background: var(--good); animation: fillLine .5s var(--ease) both; }
@keyframes fillLine { from { transform: translateX(-100%); } }

.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 28px 20px; text-align: center;
  cursor: pointer; transition: all .2s var(--ease); background: var(--surface-2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--blue-tint); }
.dropzone.done { border-style: solid; border-color: var(--good-line); background: var(--good-tint); }
.dropzone input { display: none; }
.dropzone.liveness-hint { cursor: default; border-style: solid; }
.dropzone.liveness-hint:hover { border-color: var(--line-2); background: var(--surface-2); }

/* ---- Sumsub-style live face verification ------------------------------- */

.liveness-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, #0c0e16 0%, #07080d 55%, #0a0c14 100%);
  padding: 22px;
  overflow: hidden;
}
.liveness-head {
  display: flex; justify-content: space-between; gap: 18px; align-items: flex-start;
  margin-bottom: 18px; flex-wrap: wrap;
}
.liveness-head h3 { margin: 0 0 .25em; font-size: 22px; letter-spacing: -.025em; }
.liveness-head p { margin: 0; max-width: 52ch; color: var(--text-2); font-size: 14.5px; }
.liveness-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.liveness-stage { display: grid; gap: 14px; justify-items: center; }
.liveness-frame {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: #05060a;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.liveness-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  background: #05060a;
}
.liveness-canvas { display: none; }
.liveness-mask {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 42% 36% at 50% 46%, transparent 58%, rgba(0,0,0,.72) 59%);
}
.liveness-oval {
  position: absolute; left: 50%; top: 46%;
  width: 58%; height: 48%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
  pointer-events: none;
  transition: border-color .25s, box-shadow .25s, transform .35s var(--ease);
}
.liveness-scan {
  position: absolute; left: 21%; right: 21%; top: 28%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124,140,255,.85), transparent);
  opacity: 0;
  pointer-events: none;
}
.liveness-stage.live .liveness-scan {
  opacity: 1;
  animation: livenessScan 2.4s var(--ease) infinite;
}
@keyframes livenessScan {
  0% { top: 28%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 68%; opacity: 0; }
}
.liveness-stage.live .liveness-oval {
  border-color: #8ea0ff;
  box-shadow: 0 0 0 1px rgba(124,140,255,.25), 0 0 28px rgba(124,140,255,.18);
}
.liveness-stage.pass .liveness-oval {
  border-color: var(--good);
  box-shadow: 0 0 0 1px rgba(61,220,151,.3), 0 0 28px rgba(61,220,151,.18);
}
.liveness-stage.fail .liveness-oval {
  border-color: var(--bad);
  box-shadow: 0 0 0 1px rgba(255,107,125,.3);
}
.liveness-stage.challenge-left .liveness-oval { transform: translate(-56%, -50%) rotate(-6deg); }
.liveness-stage.challenge-right .liveness-oval { transform: translate(-44%, -50%) rotate(6deg); }
.liveness-stage.challenge-up .liveness-oval { transform: translate(-50%, -56%); }
.liveness-stage.challenge-blink .liveness-oval {
  animation: livenessPulse .7s ease-in-out 2;
}
@keyframes livenessPulse {
  50% { border-color: #fff; transform: translate(-50%, -50%) scale(1.03); }
}

.liveness-status {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  display: flex; justify-content: center; pointer-events: none;
}
.liveness-prompt {
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -.015em;
  max-width: 34ch;
  min-height: 2.4em;
}
.liveness-progress {
  display: flex; gap: 8px; align-items: center; justify-content: center;
}
.liveness-progress i {
  width: 28px; height: 4px; border-radius: 99px;
  background: rgba(255,255,255,.12);
  transition: background .25s, transform .25s;
}
.liveness-progress i.on { background: #8ea0ff; transform: scaleY(1.35); }
.liveness-progress i.done { background: var(--good); }

.liveness-actions {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px;
}

@media (max-width: 720px) {
  .liveness-panel { padding: 16px; }
  .liveness-frame { width: min(100%, 340px); border-radius: 22px; }
}

.secure-note {
  display: flex; gap: 11px; align-items: flex-start; font-size: 12.8px; color: var(--text-2); line-height: 1.65;
  padding: 13px 15px; background: var(--good-tint); border: 1px solid var(--good-line); border-radius: 11px;
}
.secure-note svg { flex: none; color: var(--good); margin-top: 1px; }

/* ------------------------------------------------------------------- work */

.workspace { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 980px) { .workspace { grid-template-columns: 1fr; } }
/* Scrolls away with the page — no sticky positioning and no panel behind it. */
.work-head {
  position: static; background: transparent;
  margin: -36px -24px 20px; padding: 18px 24px; border-bottom: 1px solid var(--line);
}

.timer-ring { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--text-2); }
.timer-ring.low { color: var(--warn); }
.timer-ring.out { color: var(--bad); }

.avatar-edit input { display: none; }
.avatar-edit .overlay {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.62); color: #fff; opacity: 0; transition: opacity .18s;
}
.avatar-edit:hover .overlay { opacity: 1; }

.token { display: inline; padding: 1.5px 0; border-radius: 4px; cursor: pointer; transition: background .12s; }
.token:hover { background: var(--blue-tint); }
.token.sel { background: var(--blue-line); box-shadow: 0 0 0 1px var(--blue); }
.token.tagged { padding: 1.5px 3px; margin: 0 -1px; font-weight: 500; }
.annot-text { line-height: 2.3; font-size: 16px; user-select: none; color: var(--text); }
.span-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }

.genimg { width: 100%; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #0d0f14; display: block; aspect-ratio: 1; }

.code-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.code-wrap .bar { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); background: var(--surface); font: 500 11.5px var(--mono); color: var(--text-3); }
.code-wrap .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.code-wrap textarea { border: 0; border-radius: 0; background: transparent; }
.code-wrap textarea:focus { box-shadow: none; }
.code-wrap pre { margin: 0; padding: 16px; overflow: auto; font-family: var(--mono); font-size: 12.8px; line-height: 1.7; max-height: 420px; color: var(--text); }

/* ------------------------------------------------------------------ charts */

.chart { width: 100%; display: block; overflow: visible; }
.chart .bar { transition: opacity .18s; cursor: default; }
.chart .bar:hover { opacity: .72; }

.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-wrap .inner { position: absolute; text-align: center; }
.ring-wrap .inner b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.ring-wrap .inner span { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .11em; }
.ring circle { transition: stroke-dashoffset 1s var(--ease); }

/* ------------------------------------------------------------------ mobile */

@media (max-width: 860px) {
  .topbar { padding: 0 15px; }
  .topbar.scrolled { height: 48px; }
  main { padding: 22px 15px 90px; }
  .work-head { margin: -22px -15px 16px; padding: 15px; }
  .hero { padding: 44px 0 30px; }
  .steps { overflow-x: auto; padding-bottom: 6px; }
  .step-label { display: none; }
  .split-2 { grid-template-columns: 1fr; }
  .toast-wrap { right: 12px; left: 12px; bottom: 12px; justify-items: stretch; }
  .toast { max-width: none; }
}

/* ==========================================================================
   Motion primitives
   ========================================================================== */

.rv { opacity: 0; will-change: transform, opacity; transition: opacity .75s var(--ease), transform .75s var(--ease), filter .75s var(--ease); }
.rv-up     { transform: translateY(30px); }
.rv-down   { transform: translateY(-24px); }
.rv-left   { transform: translateX(-34px); }
.rv-right  { transform: translateX(34px); }
.rv-scale  { transform: scale(.94); }
.rv-blur   { filter: blur(9px); transform: translateY(18px); }
.rv-fade   { transform: none; }

/* Heavier entrances for hero moments and card grids. */
.rv-flip   { transform: perspective(1100px) rotateX(26deg) translateY(46px); transform-origin: 50% 100%; }
.rv-zoom   { transform: scale(.82) translateY(34px); }
.rv-swing  { transform: perspective(1100px) rotateY(-16deg) translateX(-40px); transform-origin: 0 50%; }
.rv-rise   { transform: translateY(72px) scale(.96); filter: blur(4px); }
.rv-wipe   { clip-path: inset(0 0 100% 0); transform: translateY(26px); }
.rv-wipe.in { clip-path: inset(0 0 0 0); }
.rv-depth  { transform: perspective(1200px) translateY(40px) rotateX(10deg) scale(.97); transform-origin: 50% 100%; }

.rv { transition-duration: .85s; }
.rv-flip, .rv-swing, .rv-rise, .rv-depth { transition-duration: 1s; }
.rv-wipe { transition: opacity .7s var(--ease), transform .85s var(--ease), clip-path 1.05s var(--ease); }

.rv.in { opacity: 1; transform: none; filter: none; }

.split { display: inline; }
.split-w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.split-w > i {
  display: inline-block; font-style: inherit; transform: translateY(105%);
  transition: transform .82s var(--ease);
}
.split.in .split-w > i { transform: translateY(0); }

.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 200; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; background: var(--brand-gradient); transform: scaleX(0); transform-origin: 0 50%; }

.tiltable { transition: transform .35s var(--ease), box-shadow .35s var(--ease); transform-style: preserve-3d; }
.tiltable::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), var(--blue-tint), transparent 62%);
  transition: opacity .3s;
}
.tiltable:hover::after { opacity: 1; }

button, .btn, .icon-btn, .balance-chip { will-change: transform; }

/* ==========================================================================
   Marketing chrome
   ========================================================================== */

.site-footer { width: 100%; padding: 0 clamp(12px, 2vw, 22px) clamp(12px, 2vw, 22px); margin-top: 96px; }
main.public { padding-bottom: 30px; }

/* Raised panel, inset from the page edges with a deep corner radius. */
.footer-panel {
  position: relative; max-width: 1440px; margin: 0 auto;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 32px; padding: 34px clamp(24px, 4.4vw, 62px) clamp(56px, 7vw, 92px);
  overflow: hidden;
}
.footer-panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(760px 320px at 10% 0%, rgba(124,140,255,.10), transparent 66%);
}
.footer-rule { border: 0; border-top: 1px solid var(--line); margin: 0 0 clamp(60px, 10vw, 128px); }

.footer-top {
  position: relative; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(36px, 5vw, 72px); align-items: start;
}
.footer-lead .brand { margin-bottom: 26px; }
.footer-headline {
  font-family: var(--display); font-size: clamp(28px, 4.2vw, 54px); font-weight: 620;
  letter-spacing: -.042em; line-height: 1.05; margin: 0;
}
.footer-headline .gradient-text { display: inline-block; }
/* Instrument Serif runs optically smaller than Inter Tight at the same size. */
.footer-headline .serif { font-size: 1.1em; letter-spacing: -.02em; }

.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 48px); }
.footer-col h4 {
  font-family: var(--display); font-size: 17px; font-weight: 650; letter-spacing: -.02em;
  color: var(--text); margin: 0 0 20px; text-transform: none;
}
.footer-links { display: grid; gap: 13px; }
.footer-links a {
  color: var(--text-2); font-size: 14.5px; justify-self: start; text-wrap: balance;
  transition: color .16s, transform .16s var(--ease);
}
.footer-links a:hover { color: var(--text); transform: translateX(3px); }

/* Scroll-to-top tucked into the panel's bottom-right corner. */
.footer-top-btn {
  position: absolute; right: clamp(18px, 3vw, 34px); bottom: clamp(16px, 2.6vw, 26px);
  width: 56px; height: 56px; border-radius: 999px; padding: 0;
  background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 10px 30px -8px rgba(124,140,255,.45);
}
.footer-top-btn:hover:not(:disabled) { background: var(--btn-bg-hover); filter: none; color: var(--btn-fg); }

/* Bottom bar lives outside the panel, on the page ground. */
.footer-bottom {
  max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px clamp(24px, 4.4vw, 62px) 6px;
  color: var(--text-3); font-size: 13.5px;
}
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.footer-legal a:hover { color: var(--text); text-decoration-color: currentColor; }
.footer-status { display: inline-flex; align-items: center; gap: 7px; }
.footer-status i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none;
  animation: statusPulse 2.6s ease-out infinite;
}
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 6px transparent; }
}

/* Stack before the four link columns start wrapping their labels. */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr; gap: 46px; }
  .footer-rule { margin-bottom: 56px; }
  .footer-headline { max-width: 18ch; }
}
@media (max-width: 760px) {
  .footer-panel { border-radius: 24px; padding: 26px 22px 74px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px 22px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 22px 4px; }
  .footer-top-btn { width: 46px; height: 46px; }
}

/* section furniture ------------------------------------------------------ */

.section { padding: 92px 0; position: relative; }
.section-sm { padding: 62px 0; }
.section-head { max-width: 660px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
#standards .section-head { margin-left: auto; margin-right: auto; text-align: center; }
#standards .section-head .eyebrow-line { justify-content: center; }
#home-faq { text-align: center; }
#home-faq .accordion { max-width: 760px; margin-left: auto; margin-right: auto; text-align: left; }
#disciplines .grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { #disciplines .grid.g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { #disciplines .grid.g4 { grid-template-columns: 1fr; } }
.section-head h2 { font-size: clamp(29px, 4.1vw, 46px); letter-spacing: -.04em; line-height: 1.06; margin-bottom: .38em; }
.section-head p { font-size: 16.5px; line-height: 1.7; margin: 0; }
.eyebrow-line { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .16em; font-weight: 600; color: var(--text-3); }
.eyebrow-line::before { content: ''; width: 26px; height: 1.5px; background: var(--brand-gradient); }

.rule { height: 1px; background: var(--line); margin: 0; border: 0; }

/* bento + numbered steps ------------------------------------------------- */

.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento > * { grid-column: span 2; }
.bento .wide { grid-column: span 3; }
.bento .full { grid-column: span 6; }
@media (max-width: 900px) { .bento { grid-template-columns: 1fr; } .bento > *, .bento .wide, .bento .full { grid-column: span 1; } }

.step-card { position: relative; overflow: hidden; }
.step-card .num {
  position: absolute; top: -14px; right: 6px; font-size: 92px; font-weight: 700; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.4px var(--line-2); pointer-events: none; user-select: none;
}

/* logo marquee ----------------------------------------------------------- */

.strip { border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--surface); }
.strip-track { display: flex; gap: 60px; width: max-content; animation: marquee 38s linear infinite; align-items: center; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip-item { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-weight: 600; font-size: 15px; white-space: nowrap; letter-spacing: -.01em; }

/* accordion -------------------------------------------------------------- */

.accordion { border-top: 1px solid var(--line); }
.acc-row { border-bottom: 1px solid var(--line); }
.acc-head {
  width: 100%; background: none; border: 0; box-shadow: none; color: var(--text);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; text-align: left;
  padding: 24px 4px; font-size: 17px; font-weight: 600; letter-spacing: -.018em; border-radius: 0;
}
.acc-head:hover:not(:disabled) { background: none; transform: none; box-shadow: none; color: var(--blue); }
.acc-mark { position: relative; width: 15px; height: 15px; flex: none; }
.acc-mark::before, .acc-mark::after {
  content: ''; position: absolute; background: currentColor; border-radius: 2px;
  transition: transform .34s var(--ease), opacity .34s;
}
.acc-mark::before { inset: 6.5px 0 6.5px 0; height: 2px; }
.acc-mark::after { inset: 0 6.5px 0 6.5px; width: 2px; }
.acc-row.open .acc-mark::after { transform: rotate(90deg); opacity: 0; }
.acc-row.open .acc-head { color: var(--blue); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .42s var(--ease); }
.acc-inner { padding: 0 4px 26px; color: var(--text-2); font-size: 15.5px; line-height: 1.75; max-width: 72ch; }

/* quotes ----------------------------------------------------------------- */

.quote-card { display: grid; gap: 18px; }
.quote-card blockquote { margin: 0; font-size: 18px; line-height: 1.6; letter-spacing: -.02em; color: var(--text); }
.quote-card .who { display: flex; align-items: center; gap: 12px; }
.quote-mark { font-size: 46px; line-height: .6; color: var(--logo-grey); font-weight: 700; }

/* CTA band --------------------------------------------------------------- */

.cta-band {
  position: relative; overflow: hidden; border-radius: 26px; padding: 66px 44px; text-align: center;
  background: var(--band-bg); color: var(--band-fg);
}
.cta-band h2 { color: #fff; font-size: clamp(28px, 4.4vw, 48px); letter-spacing: -.04em; max-width: 18ch; margin: 0 auto .5em; }
.cta-band p { color: rgba(255,255,255,.72); max-width: 48ch; margin: 0 auto 30px; font-size: 16.5px; }
.cta-band .btn {
  background: rgba(255, 255, 255, .07); color: #fff; border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 12px; backdrop-filter: blur(6px); box-shadow: none;
}
.cta-band .btn:hover { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-band .btn.ghost { background: transparent; border-color: rgba(255,255,255,.22); color: rgba(255,255,255,.82); border-radius: 12px; }
.cta-band .btn.ghost:hover { background: rgba(255,255,255,.09); color: #fff; }
.cta-band .orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .32; pointer-events: none; }
.cta-band .orb:nth-child(1) { width: 320px; height: 320px; background: #4b5bff; top: -130px; left: -80px; animation: drift1 26s ease-in-out infinite; }
.cta-band .orb:nth-child(2) { width: 300px; height: 300px; background: #a855f7; bottom: -140px; right: -70px; animation: drift2 32s ease-in-out infinite; }

/* legal / prose ---------------------------------------------------------- */

.prose { max-width: 68ch; }
.prose h2 { font-size: 22px; margin: 44px 0 14px; letter-spacing: -.025em; }
.prose h3 { font-size: 16.5px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--text-2); font-size: 15.5px; line-height: 1.78; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose > p:first-child { font-size: 17px; color: var(--text); }

.toc { position: sticky; top: 86px; align-self: start; display: grid; gap: 9px; }
.toc a { font-size: 13.5px; color: var(--text-3); padding: 3px 0 3px 13px; border-left: 2px solid var(--line); transition: all .18s; }
.toc a:hover { color: var(--text); border-left-color: var(--blue); }
@media (max-width: 900px) { .toc { display: none; } }

/* misc ------------------------------------------------------------------- */

.metric-row { display: flex; align-items: baseline; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.metric-row:last-child { border-bottom: 0; }
.metric-row b { font-size: 32px; font-weight: 600; letter-spacing: -.035em; min-width: 4.5ch; }

.net-pill { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; box-shadow: var(--shadow-sm); }
.net-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ==========================================================================
   Task workspace additions
   ========================================================================== */

.work-clock {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums;
  background: var(--good-tint); border: 1px solid var(--good-line); color: var(--good);
  transition: background .3s, border-color .3s, color .3s;
}
.work-clock span:last-child { font-weight: 500; font-size: 10.5px; opacity: .8; text-transform: uppercase; letter-spacing: .1em; }
.work-clock.idle {
  background: var(--warn-tint); border-color: var(--warn-line); color: var(--warn);
  animation: pulseWarn 1.1s ease-in-out infinite;
}
@keyframes pulseWarn { 50% { box-shadow: 0 0 0 5px var(--warn-tint); } }

/* A class-level display rule outranks the UA stylesheet's [hidden] rule, so the
   banner has to opt out of display explicitly or it shows on every task. */
.idle-bar[hidden] { display: none; }
.idle-bar {
  display: flex; gap: 14px; align-items: center; margin-bottom: 20px;
  padding: 15px 18px; border-radius: var(--r);
  background: var(--warn-tint); border: 1px solid var(--warn-line); color: var(--warn-fg);
  animation: rise .3s var(--ease) both;
}
.idle-bar b { color: var(--text); font-family: var(--display); }
.idle-bar button { background: var(--warn); color: #2a1c00; }
.idle-bar button:hover:not(:disabled) { background: var(--warn); filter: brightness(1.1); }

.avatar-edit { position: relative; display: inline-flex; cursor: pointer; border-radius: 50%; }
.avatar-edit input { display: none; }
.avatar-edit .overlay {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.62); color: #fff; opacity: 0; transition: opacity .18s;
}
.avatar-edit:hover .overlay { opacity: 1; }

.variants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.variant {
  position: relative; border-radius: 12px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.variant:hover { transform: translateY(-2px); border-color: var(--line-2); }
.variant.on { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.variant .genimg { border: 0; border-radius: 0; width: 100%; height: 100%; aspect-ratio: auto; }
.variant .tagline {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 9px; font: 600 10.5px var(--mono);
  background: linear-gradient(transparent, rgba(0,0,0,.82)); color: #fff; display: flex; justify-content: space-between;
}
.variant .picked-mark {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #fff; display: none; place-items: center;
}
.variant.on .picked-mark { display: grid; }

.brief-list { display: grid; gap: 8px; }
.brief-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text); }
.brief-item i { flex: none; margin-top: 3px; display: flex; }

/* Earnings breakdown: compact rows in a fixed-height scroller so the card
   sits level with the chart beside it rather than towering over it. */
.source-list {
  display: grid; gap: 14px;
  max-height: 253px; overflow-y: auto; padding-right: 8px;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.source-list::-webkit-scrollbar { width: 6px; }
.source-list::-webkit-scrollbar-track { background: transparent; }
.source-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.source-list::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
.source-row .progress { height: 5px; }

/* ==========================================================================
   Two-up panels
   A CSS-driven split so it reacts to resizing, not just to the width at the
   moment the view rendered. `.duo-fill` additionally makes both cards share a
   height at every viewport: the grid stretches them, and the body of each card
   flexes to absorb whatever height the taller sibling dictates.
   ========================================================================== */

.duo { display: grid; gap: 18px; grid-template-columns: minmax(0, var(--duo-left, 1.6fr)) minmax(0, 1fr); }
@media (max-width: 900px) {
  .duo { grid-template-columns: 1fr; }
  /* Stacked: let each panel take its natural height, with the list still capped. */
  .duo-fill { grid-auto-rows: auto; }
  .duo-fill .source-list { max-height: 300px; }
  .duo-fill .chart-slot { min-height: 0; }
}

/* The row height is set explicitly from the chart, so the panel beside it can
   never stretch the row — it scrolls its own content instead. */
.duo-fill { grid-auto-rows: var(--duo-h, auto); }
.duo-fill > .card { display: flex; flex-direction: column; min-height: 0; }
.duo-fill > .card > div:last-child { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* The chart centres in whatever height it is given rather than leaving a void. */
.duo-fill .chart-slot { flex: 1; min-height: 0; display: flex; align-items: center; }
.chart-wrap { width: 100%; }
.chart-wrap > .chart { display: block; width: 100%; height: 100%; }

/* The breakdown list takes the leftover height and scrolls past it. */
.duo-fill .source-list { flex: 1; min-height: 0; max-height: none; }
.duo-fill .goal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }

/* Transaction history: eleven rows visible, the rest behind a scroll, with the
   column header pinned so it stays readable on the way down. */
.card:has(.table-scroll) {
  /* Opaque fill so the sticky thead can share the exact same colour — a
     translucent --surface lets the aurora show through the card body and
     makes any solid header read as a different band. */
  background: var(--card-solid);
}
.table-scroll {
  --row-h: 55px;          /* measured row height, so 11 rows land exactly */
  --head-h: 40px;
  max-height: calc(var(--row-h) * 11 + var(--head-h));
  overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.table-scroll::-webkit-scrollbar { width: 6px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
/* `border-collapse: collapse` makes cell backgrounds unreliable under sticky
   positioning — scrolled rows bleed through the header. Separate borders fix it. */
.table-scroll table { border-collapse: separate; border-spacing: 0; }
.table-scroll thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--card-solid);
  border-bottom: 1px solid var(--line);
}

/* Mobile header: two ends with real spacing, rather than a squeezed grid whose
   empty middle column shoves the brand and the actions together. */
@media (max-width: 760px) {
  .topbar { display: flex; justify-content: space-between; gap: 10px; padding: 0 14px; }
  .topbar .brand { flex: 0 1 auto; min-width: 0; font-size: 16px; gap: 9px; }
  .topbar-end { gap: 8px; flex: none; }
  .balance-chip { padding: 6px 11px; }
  .balance-chip b { font-size: 13.5px; }
}
@media (max-width: 380px) {
  /* narrowest screens keep the mark and drop the wordmark */
  .topbar .brand > span:not(.brand-mark) { display: none; }
}
