/* =====================================================================
   OutsourceHub24 — design system
   Midnight navy + aurora (teal → blue → violet) with a gold "hub" accent.
   Poppins throughout, top-nav layout, light + dark via tokens.
   ===================================================================== */

:root {
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Brand */
  --navy: #0a1433;
  --night: #060d24;
  --night-2: #0d1a44;
  --teal: #2ee6c8;
  --blue: #3b82f6;
  --violet: #9b7bff;
  --gold: #f5c451;
  --aurora: linear-gradient(115deg, #2ee6c8 0%, #3b82f6 50%, #9b7bff 100%);
  --grad: linear-gradient(115deg, #0fb5a0 0%, #2d62f0 52%, #7654f5 100%);
  --grad-text: linear-gradient(100deg, #2ee6c8 0%, #5b9dff 45%, #b39bff 100%);

  /* Surfaces & text (light) */
  --bg: #f5f7fc;
  --bg-2: #edf1f9;
  --card: #ffffff;
  --card-2: #f8faff;
  --glass: rgba(255, 255, 255, .74);
  --input: #ffffff;
  --ink: #0b1533;
  --ink-2: #35415f;
  --muted: #637091;
  --line: #e1e6f1;
  --line-2: #edf0f7;
  --brand: #2c59e8;
  --brand-2: #4f7bff;
  --brand-ink: #1c44c8;
  --brand-soft: #e9efff;
  --amber: #b86e00;
  --amber-soft: #fff3dc;
  --green: #0b8f63;
  --green-soft: #e2f6ed;
  --red: #d33447;
  --red-soft: #fdecee;
  --sky: #0a78c4;
  --sky-soft: #e5f2fc;
  --purple: #6d3fe0;
  --purple-soft: #f1ebff;

  /* Spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: 16px;
  --nav-h: 68px;

  /* Radius */
  --r-xs: 8px; --r-sm: 12px; --r: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;

  /* Elevation */
  --e1: 0 1px 2px rgba(11, 21, 51, .05);
  --e2: 0 1px 2px rgba(11, 21, 51, .04), 0 6px 20px rgba(11, 21, 51, .06);
  --e3: 0 2px 6px rgba(11, 21, 51, .05), 0 16px 40px rgba(11, 21, 51, .10);
  --e4: 0 24px 70px rgba(11, 21, 51, .18);
  --glow: 0 10px 30px rgba(45, 98, 240, .32);
  --shadow: var(--e2);
  --shadow-lg: var(--e4);

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

/* Dark tokens: follow the system unless the user picked light, or when they picked dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050b1c; --bg-2: #0a1127; --card: #0c1530; --card-2: #101b3b; --glass: rgba(8, 15, 36, .74); --input: #09112a;
    --ink: #e8eefc; --ink-2: #b9c4de; --muted: #8592b3; --line: #1c2849; --line-2: #141f3f;
    --brand: #7093ff; --brand-2: #8ea9ff; --brand-ink: #a4baff; --brand-soft: rgba(112, 147, 255, .14);
    --amber: #f5b942; --amber-soft: rgba(245, 185, 66, .13); --green: #3ddc9e; --green-soft: rgba(61, 220, 158, .12);
    --red: #ff7a86; --red-soft: rgba(255, 122, 134, .13); --sky: #4cc3ff; --sky-soft: rgba(76, 195, 255, .12);
    --purple: #b89bff; --purple-soft: rgba(184, 155, 255, .14);
    --e1: 0 1px 2px rgba(0, 0, 0, .4); --e2: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
    --e3: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 44px rgba(0, 0, 0, .45); --e4: 0 28px 80px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #050b1c; --bg-2: #0a1127; --card: #0c1530; --card-2: #101b3b; --glass: rgba(8, 15, 36, .74); --input: #09112a;
  --ink: #e8eefc; --ink-2: #b9c4de; --muted: #8592b3; --line: #1c2849; --line-2: #141f3f;
  --brand: #7093ff; --brand-2: #8ea9ff; --brand-ink: #a4baff; --brand-soft: rgba(112, 147, 255, .14);
  --amber: #f5b942; --amber-soft: rgba(245, 185, 66, .13); --green: #3ddc9e; --green-soft: rgba(61, 220, 158, .12);
  --red: #ff7a86; --red-soft: rgba(255, 122, 134, .13); --sky: #4cc3ff; --sky-soft: rgba(76, 195, 255, .12);
  --purple: #b89bff; --purple-soft: rgba(184, 155, 255, .14);
  --e1: 0 1px 2px rgba(0, 0, 0, .4); --e2: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35);
  --e3: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 44px rgba(0, 0, 0, .45); --e4: 0 28px 80px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: calc(var(--nav-h) + 12px); }
body { overflow-x: clip; margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 15px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
  transition: background-color .3s var(--ease), color .3s var(--ease); }
body.lock, body.intro-on { overflow: hidden; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.18; letter-spacing: -.02em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img, svg, canvas { max-width: 100%; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .86em; background: var(--line-2); padding: 1px 6px; border-radius: 6px; }
::selection { background: rgba(59, 130, 246, .25); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .76rem; }
.ic { flex: none; vertical-align: middle; }
.row { display: flex; align-items: center; }
.row.gap { gap: 10px; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.wrap { flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* =====================================================================
   Intro splash (3 s, every open). Base styles are the FINAL frame; every
   keyframe animates from the start state with fill "both", so reduced
   motion (animations off) simply shows the finished lockup.
   ===================================================================== */
.intro { position: fixed; inset: 0; z-index: 200; background: #060d24; overflow: hidden; display: grid; place-items: center; color: #fff;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: manipulation; animation: introOut .45s 2.55s var(--ease) forwards; }
.intro:empty { animation: introOut .4s 6s forwards; cursor: default; } /* safety net if the app never starts */
.intro.hold { animation: none; }
.intro.skip { animation: introOut .25s var(--ease) forwards !important; }
.intro.reduced *, .intro.reduced .logo-mark.animated * { animation: none !important; }
.intro.reduced { animation: none !important; } /* static lockup for 400 ms, then removed by app.js */
.in-bg { position: absolute; inset: 0; background:
  radial-gradient(110vmax 70vmax at 50% 125%, rgba(40, 72, 200, .55) 0%, transparent 55%),
  radial-gradient(70vmax 50vmax at 50% -15%, rgba(26, 46, 130, .7) 0%, transparent 60%), #060d24; }
.in-waves { position: absolute; left: 0; top: -5%; width: 100%; height: 110%; animation: wvSwell 3s var(--ease-out) both; }
.in-waves .wv { animation: wvDrift 3.2s linear both; }
.in-waves .wv-b { animation-name: wvDriftB; opacity: .5; }
.in-waves path { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-dasharray: 1 1; stroke-dashoffset: 0; opacity: .8;
  animation: wvDraw 1.7s calc(var(--i) * 45ms) var(--ease-out) both; }
.in-glow { position: absolute; left: 50%; top: 44%; width: 78vmin; height: 78vmin; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59, 130, 246, .55), rgba(46, 230, 200, .16) 55%, transparent 100%); animation: glowIn 1.4s .1s var(--ease-out) both; }
.in-center { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 2.2vmin; margin-top: -3vmin; padding: 0 16px; text-align: center;
  animation: centerOut .45s 2.55s var(--ease) forwards; }
.intro.hold .in-center, .intro.reduced .in-center { animation: none; }
.in-stage { position: relative; width: clamp(180px, 40vmin, 440px); aspect-ratio: 1; display: grid; place-items: center; }
.in-stage .logo-mark { width: 54%; height: 54%; filter: drop-shadow(0 18px 40px rgba(20, 60, 200, .55)); }
.in-dial { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: dialSpin 3s var(--ease-out) both; }
.in-dial path { stroke: rgba(255, 255, 255, .34); stroke-width: 1.3; stroke-linecap: round; animation: tickIn .35s calc(.2s + var(--i) * 38ms) var(--ease-out) both; }
.in-dial path.maj { stroke: #2ee6c8; stroke-width: 2.4; }
.in-ring { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: .8; stroke-dasharray: 1 1; stroke-dashoffset: 0; animation: wvDraw 1.1s .2s var(--ease-out) both; }
.logo-mark.animated { animation: tileIn .7s .25s var(--spring) both; overflow: visible; }
.logo-mark.animated .lm-orbit { animation: orbitDraw .95s .55s var(--ease-out) both; }
.logo-mark.animated .lm-sat { transform-box: view-box; transform-origin: 32px 32px; transform: rotate(295.2deg); animation: satOrbit .95s .55s var(--ease-out) both; }
.logo-mark.animated .lm-check { stroke-dasharray: 100; stroke-dashoffset: 0; animation: checkDraw .45s 1.35s var(--ease-out) both; }
.logo-mark.animated .lm-tick { animation: fadeIn .3s .5s both; }
.in-word { display: flex; font-size: clamp(26px, 6.4vmin, 68px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; }
.in-word span { display: inline-block; animation: letterIn .55s calc(1.5s + var(--i) * 32ms) var(--ease-out) both; }
.in-word span.g { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.in-tag { font-size: clamp(11px, 1.9vmin, 19px); color: rgba(220, 230, 255, .66); letter-spacing: .2em; text-transform: uppercase; font-weight: 500; animation: fadeUp .5s 2.02s var(--ease-out) both; }
.in-skip { position: absolute; right: max(18px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 3; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .78); font-size: .8rem; font-weight: 500;
  cursor: pointer; animation: fadeIn .4s .6s both; }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }
@keyframes centerOut { to { transform: scale(1.06); filter: blur(2px); } }
@keyframes wvSwell { from { transform: scaleY(.35); opacity: 0; } 30% { opacity: 1; } }
@keyframes wvDrift { from { transform: translateX(0); } to { transform: translateX(-16%); } }
@keyframes wvDriftB { from { transform: translateX(-30%); } to { transform: translateX(-14%); } }
@keyframes wvDraw { from { stroke-dashoffset: 1; } }
@keyframes glowIn { from { transform: scale(.25); opacity: 0; } }
@keyframes dialSpin { from { transform: rotate(-40deg) scale(.92); } }
@keyframes tickIn { from { opacity: 0; } }
@keyframes tileIn { from { transform: scale(.35) rotate(-14deg); opacity: 0; } }
@keyframes orbitDraw { from { stroke-dasharray: 0 100; } }
@keyframes satOrbit { from { transform: rotate(0deg); opacity: 0; } 12% { opacity: 1; } }
@keyframes checkDraw { from { stroke-dashoffset: 100; } }
@keyframes letterIn { from { opacity: 0; transform: translateY(.45em); filter: blur(6px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Layout ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left)); }
.wrap.narrow { max-width: 820px; }
#view { min-height: 60vh; }
#view.enter > main { animation: viewIn .45s var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
main.page { padding: 32px 0 88px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head p { margin: 0; }

/* ---------- Top nav (glass) ---------- */
.topbar { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top); background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line); transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease); }
body.scrolled .topbar { box-shadow: var(--e1); }
.topbar .wrap { height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; flex: none; border-radius: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.14rem; color: var(--ink); letter-spacing: -.025em; white-space: nowrap; }
.logo-word b { font-weight: 700; background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { flex: none; display: block; }
.nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.nav a { color: var(--ink-2); padding: 9px 14px; border-radius: var(--r-pill); font-weight: 500; font-size: .92rem; transition: background .15s, color .15s; white-space: nowrap; }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.user { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); padding: 7px 13px 7px 9px; border-radius: var(--r-pill); font-weight: 600; font-size: .88rem; color: var(--ink); min-height: 40px; transition: border-color .15s, transform .15s var(--ease); }
.credit-pill .ic { color: var(--gold); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .92rem; border: 0; cursor: pointer; flex: none; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); transition: transform .15s var(--ease); }
.avatar:active { transform: scale(.94); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun, :root[data-theme="dark"] [data-theme-toggle] .i-sun { display: inline; }
:root[data-theme="dark"] .theme-btn .i-moon, :root[data-theme="dark"] [data-theme-toggle] .i-moon { display: none; }
[data-theme-toggle] .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .i-sun { display: inline; }
  :root:not([data-theme="light"]) [data-theme-toggle] .i-moon { display: none; }
}
.topbar .burger { display: none; }
.menu-pop { position: absolute; right: max(var(--gutter), env(safe-area-inset-right)); top: calc(var(--nav-h) - 6px + env(safe-area-inset-top)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--e4); padding: 6px; min-width: 240px; display: none; transform-origin: top right; }
.menu-pop.open { display: block; animation: pop .18s var(--ease-out); }
.menu-pop .who { padding: 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.menu-pop button, .menu-pop a { display: flex; gap: 10px; align-items: center; width: 100%; background: none; border: 0; padding: 11px 12px; min-height: 44px; border-radius: 10px; cursor: pointer; color: var(--ink); text-align: left; font-size: .92rem; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }

/* Transparent nav over the dark home hero, glass once scrolled. */
body.on-home .topbar { position: fixed; left: 0; right: 0; }
body.on-home:not(.scrolled) .topbar { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.on-home:not(.scrolled) .topbar .logo, body.on-home:not(.scrolled) .topbar .nav a, body.on-home:not(.scrolled) .topbar .icon-btn { color: #fff; }
body.on-home:not(.scrolled) .topbar .nav a { color: rgba(236, 242, 255, .82); }
body.on-home:not(.scrolled) .topbar .btn.ghost { background: rgba(255, 255, 255, .08); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }

/* ---------- Drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer-back { position: absolute; inset: 0; background: rgba(4, 9, 26, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--ease); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); background: var(--card); box-shadow: var(--e4); display: flex; flex-direction: column; gap: 14px;
  padding: calc(14px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) 18px; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform .34s var(--ease-out); }
.drawer.open .drawer-back { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.drawer-links { display: grid; gap: 2px; }
.drawer-links a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: var(--r-sm); color: var(--ink); font-weight: 500; font-size: 1.02rem; }
.drawer-links a > .ic:last-child:not(:first-child) { margin-left: auto; color: var(--muted); }
.drawer-links a .ic:first-child { color: var(--brand); }
.drawer-links a.on { background: var(--brand-soft); color: var(--brand); }
.drawer-links a:active { background: var(--line-2); }
.drawer-foot { margin-top: auto; display: grid; gap: 10px; }
.drawer-user { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--bg-2); border-radius: var(--r); }
.drawer-user .avatar { cursor: default; }
.drawer-credits { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--ink-2); min-height: 48px; }
.drawer-credits .ic { color: var(--gold); } .drawer-credits b { color: var(--ink); }

/* ---------- Mobile tab bar ---------- */
.mobile-nav { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 0; border-radius: var(--r-pill); padding: 11px 20px; min-height: 44px;
  font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; text-decoration: none; position: relative; isolation: isolate; user-select: none; -webkit-user-select: none;
  transition: transform .16s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s; }
.btn:active { transform: scale(.965); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.lg { padding: 13px 26px; font-size: 1rem; min-height: 50px; }
.btn.xl { padding: 15px 30px; font-size: 1.02rem; min-height: 56px; }
.btn.sm { padding: 7px 15px; font-size: .85rem; min-height: 38px; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: var(--red); }
.btn.grad { background: var(--grad); background-size: 160% 100%; background-position: 0 0; box-shadow: 0 6px 18px rgba(45, 98, 240, .26); transition: transform .16s var(--ease), box-shadow .25s var(--ease), background-position .5s var(--ease); }
.btn.glass-btn { background: rgba(255, 255, 255, .07); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn.block { width: 100%; }
.btn .ic { transition: transform .2s var(--ease); }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; transition: background .15s, color .15s, transform .15s var(--ease); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .3; cursor: default; background: none; }
@media (hover: hover) {
  .nav a:hover { background: var(--line-2); color: var(--ink); }
  body.on-home:not(.scrolled) .topbar .nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .menu-pop button:hover, .menu-pop a:hover { background: var(--line-2); }
  .credit-pill:hover { border-color: var(--brand); }
  .avatar:hover { transform: scale(1.05); }
  .btn:hover { background: var(--brand-ink); box-shadow: var(--glow); }
  .btn:hover .ic:last-child { transform: translateX(2px); }
  .btn.ghost:hover { background: var(--line-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .btn.soft:hover { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
  .btn.danger:hover { background: var(--red); filter: brightness(.94); box-shadow: none; }
  .btn.grad:hover { background: var(--grad); background-size: 160% 100%; background-position: 100% 0; box-shadow: 0 10px 30px rgba(45, 98, 240, .42); }
  .btn.glass-btn:hover { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); }
  .icon-btn:hover { background: var(--line-2); color: var(--ink); }
  body.on-home:not(.scrolled) .topbar .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
}

/* ---------- Components ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--e2); padding: 22px; transition: box-shadow .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), background-color .3s; }
.card.pad-0 { padding: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.st-queued { background: var(--amber-soft); color: var(--amber); }
.st-running { background: var(--brand-soft); color: var(--brand); }
.st-delivered { background: var(--green-soft); color: var(--green); }
.st-failed { background: var(--red-soft); color: var(--red); }
.st-muted { background: var(--line-2); color: var(--muted); }
.st-awaiting { background: var(--amber-soft); color: var(--amber); }
.tier-standard { background: var(--green-soft); color: var(--green); }
.tier-advanced { background: var(--sky-soft); color: var(--sky); }
.tier-complex { background: var(--purple-soft); color: var(--purple); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; box-shadow: 0 0 0 0 currentColor; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.7); } }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.svc-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.svc-ic.sm { width: 36px; height: 36px; border-radius: 11px; }
.bar { height: 8px; background: var(--line-2); border-radius: var(--r-pill); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--aurora); border-radius: var(--r-pill); transition: width .7s var(--ease-out); position: relative; overflow: hidden; }
.bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: shimmer 1.8s infinite; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .ic { color: var(--brand); margin-bottom: 8px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--brand-soft); color: var(--ink-2); border-radius: var(--r); padding: 13px 15px; font-size: .88rem; }
.notice .ic { color: var(--brand); margin-top: 2px; }
.notice.warn { background: var(--amber-soft); } .notice.warn .ic { color: var(--amber); }
.notice.bad { background: var(--red-soft); } .notice.bad .ic { color: var(--red); }
.notice.good { background: var(--green-soft); } .notice.good .ic { color: var(--green); }
.tabs { display: inline-flex; background: var(--line-2); border-radius: var(--r-pill); padding: 4px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 7px 14px; min-height: 36px; border-radius: var(--r-pill); font-size: .84rem; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s; }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--e2); }

/* ---------- Skeletons ---------- */
.sk { border-radius: var(--r); background: linear-gradient(90deg, var(--line-2) 0%, var(--bg-2) 40%, var(--line-2) 80%); background-size: 300% 100%; animation: skel 1.4s ease-in-out infinite; }
.sk-title { height: 36px; width: min(320px, 70%); margin-bottom: 12px; border-radius: 10px; }
.sk-line { height: 14px; border-radius: 8px; }
.sk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 28px 0 20px; }
.sk-card { height: 112px; border-radius: var(--r-lg); }
.sk-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; }
.sk-panel { height: 340px; border-radius: var(--r-lg); }
.sk-panel.short { height: 230px; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .label { font-weight: 500; font-size: .88rem; color: var(--ink-2); }
.field .req { color: var(--brand); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field input[type=tel], .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); background: var(--input); color: var(--ink); border-radius: var(--r-sm); padding: 11px 14px; min-height: 46px; font-size: .95rem; transition: border-color .15s, box-shadow .15s, background-color .3s; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field textarea.mono { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field .err { color: var(--red); font-size: .8rem; animation: fadeUp .25s var(--ease-out); }
.field .hint { color: var(--muted); font-size: .8rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 15px; min-height: 40px; font-size: .86rem; cursor: pointer; background: var(--input); transition: all .18s var(--ease); user-select: none; }
.pills label:active { transform: scale(.96); }
.pills input { display: none; }
.pills label:has(input:checked) { background: var(--brand); border-color: var(--brand); color: #fff; }
.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; font-size: .92rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; min-height: 50px; background: var(--input); }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: var(--r-pill); background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.switch .cost { margin-left: auto; font-size: .8rem; color: var(--brand); font-weight: 600; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 46px; height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--input); cursor: pointer; }
input[type=range] { accent-color: var(--brand); width: 100%; min-height: 32px; }
.upload { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--brand); cursor: pointer; font-weight: 500; min-height: 36px; }
.upload input { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pw { position: relative; }
.pw input { padding-right: 76px !important; }
.pw-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 12px; border: 0; background: transparent; color: var(--brand); font-weight: 600; font-size: .82rem; cursor: pointer; border-radius: 8px; }

/* ---------- Shared marketing bits ---------- */
section.block { padding: clamp(64px, 9vw, 110px) 0; }
.section-title { text-align: center; max-width: 700px; margin: 0 auto clamp(32px, 5vw, 52px); }
.section-title h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); letter-spacing: -.03em; font-weight: 700; }
.section-title p { color: var(--muted); font-size: 1.04rem; margin: 0; }
.kicker { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 6px 13px; border-radius: var(--r-pill); margin-bottom: 16px; }
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* Legacy marketing hooks kept for other views */
.hero { padding: 72px 0 40px; text-align: center; position: relative; overflow: hidden; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps .card { padding: 26px; }
.steps .n { width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 600; display: grid; place-items: center; margin-bottom: 14px; font-size: .9rem; }
.band { background: var(--night); color: #fff; border-radius: var(--r-xl); padding: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; overflow: hidden; }
.band h3 { color: #fff; } .band p { color: rgba(255, 255, 255, .7); margin: 0; font-size: .92rem; }
.band .ic { color: var(--gold); margin-bottom: 10px; }
footer.site { border-top: 1px solid var(--line); padding: 30px 0; color: var(--muted); font-size: .85rem; }

.demo-card { max-width: 760px; margin: 0 auto; text-align: left; padding: 24px; }
.pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
.pipe div { border-radius: 12px; padding: 12px; background: var(--line-2); font-size: .78rem; color: var(--muted); transition: background .45s var(--ease), box-shadow .45s var(--ease), color .45s; min-width: 0; }
.pipe div b { display: block; color: var(--ink); font-weight: 600; font-size: .82rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe div.done { background: var(--green-soft); } .pipe div.done b { color: var(--green); }
.pipe div.now { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); } .pipe div.now b { color: var(--brand); }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.svc-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-lg); font: inherit; color: inherit; position: relative; overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease), border-color .3s, opacity .8s var(--ease-out); }
.svc-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--aurora); -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 .3s; pointer-events: none; }
.svc-card:active { transform: scale(.985); }
.svc-card h3 { margin: 4px 0 0; font-size: 1.02rem; }
.svc-card p { margin: 0; color: var(--muted); font-size: .87rem; flex: 1; }
.svc-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; gap: 8px; }
.svc-card .from { font-weight: 600; color: var(--ink-2); }
.svc-card .svc-ic { transition: transform .35s var(--spring), background .3s, color .3s; }
@media (hover: hover) {
  .svc-card:hover { transform: translateY(-4px); box-shadow: var(--e3); border-color: transparent; }
  .svc-card:hover::after { opacity: 1; }
  .svc-card:hover .svc-ic { transform: scale(1.08) rotate(-4deg); background: var(--grad); color: #fff; }
}

.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; margin-top: 24px; }
.pack { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 30px 28px; }
.pack.featured { border: 2px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--aurora) border-box; box-shadow: 0 26px 70px rgba(45, 98, 240, .22); }
.pack .badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #fff; font-size: .74rem; font-weight: 600; padding: 5px 13px; border-radius: var(--r-pill); white-space: nowrap; }
.pack .badge.alt { background: var(--night); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.pack h3 { font-size: 1.2rem; margin: 0; }
.pack .pack-blurb { color: var(--muted); font-size: .86rem; margin: 2px 0 10px; min-height: 3em; }
.pack .price { font-size: clamp(2.2rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.pack .price small { font-size: .9rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.pack .cr { font-weight: 600; color: var(--brand); font-size: .92rem; }
.pack ul { list-style: none; padding: 0; margin: 16px 0 22px; font-size: .9rem; color: var(--ink-2); flex: 1; }
.pack li { display: flex; gap: 9px; margin-bottom: 9px; } .pack li .ic { color: var(--green); margin-top: 3px; }
@media (hover: hover) { .pack:hover { transform: translateY(-4px); box-shadow: var(--e3); } .pack.featured:hover { box-shadow: 0 30px 80px rgba(45, 98, 240, .3); } }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .25s, box-shadow .25s; }
.faq details[open], .faq details.is-open { border-color: var(--brand); box-shadow: var(--e2); }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; min-height: 58px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: none; }
.faq .plus { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); flex: none; transition: transform .3s var(--ease-out), background .3s; }
.faq .plus::before, .faq .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--brand); border-radius: 2px; transition: transform .3s var(--ease-out); }
.faq .plus::after { transform: rotate(90deg); }
.faq details[open] .plus { transform: rotate(180deg); background: var(--brand); }
.faq details[open] .plus::before, .faq details[open] .plus::after { background: #fff; }
.faq details[open] .plus::after { transform: rotate(0deg); }
.faq-a { overflow: hidden; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: .93rem; }

/* =====================================================================
   Landing page
   ===================================================================== */
.home { overflow-x: clip; }
.hero-x { position: relative; isolation: isolate; overflow: hidden; color: #fff; background:
  radial-gradient(900px 520px at 85% 10%, rgba(76, 94, 255, .38), transparent 60%),
  radial-gradient(700px 460px at 5% 90%, rgba(46, 230, 200, .16), transparent 60%),
  linear-gradient(180deg, #060d24 0%, #0a1740 70%, #0b1a4a 100%);
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + clamp(40px, 7vw, 88px)) 0 clamp(40px, 6vw, 64px); }
.hero-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .95; }
.hero-glow { position: absolute; z-index: -1; left: 50%; bottom: -35%; width: 120%; height: 70%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(59, 130, 246, .35), transparent); pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-x .eyebrow { display: inline-flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); padding: 7px 14px 7px 10px; border-radius: var(--r-pill);
  font-size: .8rem; font-weight: 500; color: #d7e3ff; margin-bottom: 22px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fadeUp .7s .1s var(--ease-out) both; }
.hero-x .eyebrow .ic { color: var(--teal); }
.hero-x h1 { font-size: clamp(2.2rem, 5.3vw, 4.35rem); font-weight: 700; line-height: 1.04; letter-spacing: -.04em; margin: 0 0 22px; color: #fff; text-wrap: balance; animation: fadeUp .8s .18s var(--ease-out) both; }
.hero-x h1 em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-x .lead { font-size: clamp(1rem, 1.35vw, 1.17rem); color: rgba(222, 231, 255, .76); max-width: 590px; margin: 0 0 30px; animation: fadeUp .8s .28s var(--ease-out) both; }
.hero-x .cta, .cta-x .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-x .cta { animation: fadeUp .8s .38s var(--ease-out) both; }
.hero-x .trust { list-style: none; margin: 26px 0 0; padding: 0; display: flex; gap: 10px 22px; flex-wrap: wrap; font-size: .86rem; color: rgba(222, 231, 255, .72); animation: fadeUp .8s .48s var(--ease-out) both; }
.hero-x .trust li { display: inline-flex; gap: 7px; align-items: center; }
.hero-x .trust .ic { color: var(--teal); }
.hero-visual { perspective: 1400px; animation: fadeUp 1s .35s var(--ease-out) both; min-width: 0; }
.mock { border-radius: var(--r-xl); color: #fff; transform: rotateY(-9deg) rotateX(5deg); transform-style: preserve-3d; animation: floaty 9s ease-in-out infinite; }
.glass { background: linear-gradient(160deg, rgba(30, 50, 120, .55), rgba(10, 20, 55, .6)); border: 1px solid rgba(255, 255, 255, .13); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1); }
@keyframes floaty { 0%, 100% { transform: rotateY(-9deg) rotateX(5deg) translateY(0); } 50% { transform: rotateY(-6deg) rotateX(3deg) translateY(-10px); } }
.mock-top { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; color: rgba(255, 255, 255, .7); }
.mock-top span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.mock-top b { margin-left: 8px; font-weight: 500; }
.mock-body { padding: 20px; display: grid; gap: 16px; }
.mock-clock { display: flex; gap: 18px; align-items: center; }
.mring { position: relative; width: 108px; height: 108px; flex: none; display: grid; place-items: center; text-align: center; }
.mring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.mring circle { fill: none; stroke-width: 8; }
.mring .t { stroke: rgba(255, 255, 255, .1); }
.mring .a { stroke: var(--teal); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 4; animation: drain 40s linear infinite; filter: drop-shadow(0 0 6px rgba(46, 230, 200, .6)); }
@keyframes drain { to { stroke-dashoffset: 60; } }
.mring b { display: block; font-size: 1.02rem; font-variant-numeric: tabular-nums; font-weight: 600; }
.mring span { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.mock-now { min-width: 0; flex: 1; }
.mock-now > b { display: block; font-size: .95rem; margin: 2px 0 0; }
.muted-l { color: rgba(222, 231, 255, .6); }
.pipe.mini { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-top: 10px; }
.pipe.mini div { padding: 7px 6px; font-size: .62rem; border-radius: 9px; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .55); }
.pipe.mini div b { font-size: .68rem; color: #fff; }
.pipe.mini div.done { background: rgba(46, 230, 200, .16); } .pipe.mini div.done b { color: var(--teal); }
.pipe.mini div.now { background: rgba(59, 130, 246, .25); box-shadow: inset 0 0 0 1.5px var(--blue); } .pipe.mini div.now b { color: #bcd3ff; }
.mock-q { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mock-q li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); font-size: .86rem; animation: fadeUp .6s calc(.8s + var(--d) * 120ms) var(--ease-out) both; }
.mock-q .pos { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 600; background: rgba(255, 255, 255, .1); flex: none; }
.mock-q li:first-child .pos { background: var(--grad); }
.mock-q .ic { color: var(--teal); }
.mock-q .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-q .cr { color: rgba(255, 255, 255, .55); font-size: .78rem; }
.stats-x { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 28px; }
.stats-x > div { display: grid; gap: 2px; }
.stats-x b { font-size: clamp(2rem, 3.8vw, 3rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stats-x b span { background: inherit; -webkit-background-clip: text; background-clip: text; }
.stats-x > div > span { font-size: .86rem; color: rgba(222, 231, 255, .64); }

.marquee-sec { padding: 30px 0 34px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.marquee-sec > p { text-align: center; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin: 0 16px 18px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee .track > span { display: inline-flex; align-items: center; gap: 9px; margin-right: 12px; padding: 11px 18px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.marquee .track > span .ic { color: var(--brand); }
.marquee .track > span.svc { background: transparent; color: var(--muted); }
@media (hover: hover) { .marquee:hover .track { animation-play-state: paused; } }
@keyframes marquee { to { transform: translateX(-50%); } }

.ind { max-width: 1120px; margin: 0 auto; }
.ind-tabs { display: flex; gap: 4px; padding: 5px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill); width: fit-content; max-width: 100%; margin: 0 auto 30px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.ind-tabs::-webkit-scrollbar { display: none; }
.ind-tabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 18px; min-height: 44px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--muted); font-weight: 500; font-size: .9rem; cursor: pointer; scroll-snap-align: center; transition: background .25s var(--ease), color .25s, box-shadow .25s; }
.ind-tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: var(--e2); }
.ind-tabs button[aria-selected="true"] .ic { color: var(--brand); }
@media (hover: hover) { .ind-tabs button:hover { color: var(--ink); } }
.ind-panel { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 48px); align-items: center; animation: panelIn .5s var(--ease-out) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }
.ind-copy h3 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.ind-copy p { color: var(--muted); font-size: 1rem; margin-bottom: 24px; }
.ind-uses { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.use { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); color: var(--ink); box-shadow: var(--e1);
  transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s; animation: fadeUp .5s calc(var(--d) * 70ms) var(--ease-out) both; }
.use b { display: block; font-weight: 600; margin-bottom: 3px; }
.use span { color: var(--muted); font-size: .84rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.use em { font-style: normal; font-size: .8rem; font-weight: 600; color: var(--brand); margin-top: auto; }
.use:active { transform: scale(.985); }
@media (hover: hover) { .use:hover { transform: translateY(-3px); box-shadow: var(--e3); border-color: var(--brand); } }

#services { background: linear-gradient(180deg, transparent, var(--bg-2)); }
.feats { padding-top: clamp(40px, 6vw, 80px); }
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.feat + .feat { margin-top: clamp(64px, 9vw, 120px); }
.feat.rev .feat-copy { order: 2; }
.feat-copy h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); font-weight: 700; letter-spacing: -.03em; }
.feat-copy > p { color: var(--muted); font-size: 1.02rem; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; color: var(--ink-2); font-size: .93rem; }
.ticks li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ticks .ic { color: var(--green); }
.feat-art { position: relative; min-width: 0; }
.feat-art::before { content: ''; position: absolute; inset: 10% 5%; background: var(--aurora); filter: blur(60px); opacity: .22; border-radius: 50%; z-index: -1; }
.feat-art .card { position: relative; }
.art-queue { padding: 8px; }
.art-queue .q-item .t b { display: block; font-weight: 500; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-queue .q-item:first-child { background: var(--brand-soft); }
.art-wallet { padding: 26px; display: grid; gap: 14px; }
.w-top { display: grid; gap: 2px; }
.w-top span { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: .86rem; }
.w-top span .ic { color: var(--gold); }
.w-top b { font-size: 2.8rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.w-top small { color: var(--muted); }
.w-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-2); font-size: .9rem; flex-wrap: wrap; }
.w-row span { display: inline-flex; gap: 8px; align-items: center; } .w-row .ic { color: var(--brand); }
.w-row em { font-style: normal; font-size: .78rem; color: var(--muted); }

.stepper-x { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.stepper-x::before, .stepper-x::after { content: ''; position: absolute; top: 27px; left: 12.5%; right: 12.5%; height: 2px; border-radius: 2px; background: var(--line); }
.stepper-x::after { background: var(--aurora); transform: scaleX(0); transform-origin: left; transition: transform 1.6s .3s var(--ease-out); }
.stepper-x.in::after { transform: scaleX(1); }
.stepper-x li { text-align: center; position: relative; z-index: 1; }
.stepper-x .dot { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--brand); border: 1px solid var(--line); box-shadow: var(--e2);
  transition: transform .5s var(--spring), background .4s, color .4s; transition-delay: calc(.3s + var(--d) * 280ms); }
.stepper-x.in .dot { background: var(--grad); color: #fff; border-color: transparent; transform: scale(1.06); }
.stepper-x .n { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.stepper-x h3 { font-size: 1.1rem; }
.stepper-x p { color: var(--muted); font-size: .9rem; margin: 0; }

.trial-x { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px 28px; border-radius: var(--r-xl); border: 1px solid rgba(59, 130, 246, .28);
  background: linear-gradient(120deg, rgba(46, 230, 200, .13), rgba(59, 130, 246, .1) 50%, rgba(155, 123, 255, .14)); margin-bottom: 18px; }
.trial-x > div { display: flex; gap: 16px; align-items: center; min-width: 0; flex: 1 1 320px; }
.trial-x > div > .ic { color: var(--brand); }
.trial-x h3 { margin: 0 0 2px; font-size: 1.15rem; }
.trial-x p { margin: 0; color: var(--muted); font-size: .92rem; }
.guarantee { display: flex; gap: 14px; align-items: center; margin: 26px auto 0; max-width: 820px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--green-soft); color: var(--ink-2); font-size: .93rem; }
.guarantee .ic { color: var(--green); }
.guarantee b { color: var(--ink); }

.cta-x { position: relative; isolation: isolate; overflow: hidden; background:
  radial-gradient(800px 400px at 50% 110%, rgba(59, 130, 246, .45), transparent 60%),
  radial-gradient(600px 300px at 15% 0%, rgba(155, 123, 255, .25), transparent 60%), #060d24;
  color: #fff; text-align: center; padding: clamp(80px, 11vw, 140px) 0; }
.cta-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.cta-x h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.08; max-width: 820px; margin: 0 auto 18px; text-wrap: balance; }
.cta-x h2 em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta-x p { color: rgba(222, 231, 255, .74); max-width: 580px; margin: 0 auto 30px; font-size: 1.05rem; }
.cta-x .cta { justify-content: center; }

.site-x { background: #040917; color: rgba(222, 231, 255, .66); padding: 64px 0 calc(28px + env(safe-area-inset-bottom)); font-size: .9rem; }
.site-x .logo { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.4fr 1fr; gap: 32px; }
.foot-brand p { margin: 16px 0 0; max-width: 340px; font-size: .88rem; }
.site-x h4 { color: #fff; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 12px; }
.site-x a { display: block; color: rgba(222, 231, 255, .66); padding: 6px 0; transition: color .15s; }
.site-x .foot-brand a, .site-x .logo { display: inline-flex; }
@media (hover: hover) { .site-x a:hover { color: #fff; } }
.foot-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .09); font-size: .82rem; }
.foot-base .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #56618a; margin-right: 8px; vertical-align: 1px; }
.foot-base .dot.on { background: var(--teal); box-shadow: 0 0 0 4px rgba(46, 230, 200, .18); }

/* ---------- Auth ---------- */
.auth { min-height: calc(100dvh - var(--nav-h)); display: grid; place-items: center; padding: 40px 16px; }
.auth .card { width: 100%; max-width: 440px; padding: 34px; }
.auth h1 { font-size: 1.7rem; margin-bottom: 4px; }
.auth form { display: grid; gap: 14px; margin-top: 24px; }
.auth-x { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); place-items: stretch; padding: 0; }
.auth-side { position: relative; isolation: isolate; overflow: hidden; color: #fff; display: flex; align-items: center; padding: clamp(40px, 6vw, 72px);
  background: radial-gradient(700px 420px at 90% 0%, rgba(76, 94, 255, .4), transparent 60%), linear-gradient(180deg, #060d24, #0b1a4a); }
.auth-waves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.auth-glow { position: absolute; left: -20%; bottom: -30%; width: 80%; height: 70%; background: radial-gradient(closest-side, rgba(46, 230, 200, .2), transparent); z-index: -1; }
.auth-side-in { max-width: 480px; animation: fadeUp .8s var(--ease-out) both; }
.auth-side .logo { color: #fff; }
.auth-side h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; margin: 34px 0 28px; color: #fff; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.auth-side li { display: flex; gap: 14px; align-items: center; }
.auth-side .ai { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: var(--teal); flex: none; }
.auth-side li b { display: block; font-weight: 600; }
.auth-side li span { font-size: .86rem; color: rgba(222, 231, 255, .64); }
.auth-foot { margin: 40px 0 0; font-size: .8rem; color: rgba(222, 231, 255, .46); }
.auth-main { display: grid; place-items: center; padding: clamp(28px, 5vw, 56px) var(--gutter) calc(40px + env(safe-area-inset-bottom)); }
.auth-card { animation: fadeUp .6s .1s var(--ease-out) both; box-shadow: var(--e3); }
.auth-mobile-logo { display: none; }
.auth-switch { margin: 20px 0 0; text-align: center; }

/* ---------- Dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { padding: 18px 20px; }
.stat .label { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 6px; }
.stat .val { font-size: 1.85rem; font-weight: 700; letter-spacing: -.025em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.stat.hero-stat { background: radial-gradient(260px 160px at 100% 0%, rgba(76, 94, 255, .55), transparent 70%), linear-gradient(160deg, #0b1a4a, #060d24); color: #fff; border: 0; position: relative; overflow: hidden; }
.stat.hero-stat::after { content: ''; position: absolute; right: -50px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 10px solid rgba(46, 230, 200, .14); }
.stat.hero-stat .label { color: rgba(222, 231, 255, .7); }
.stat.hero-stat .label .ic { color: var(--gold); }
.stat.hero-stat .btn { position: relative; z-index: 1; }
.dash { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; align-items: start; }
.dash > div { display: grid; gap: 20px; }
.now { background: linear-gradient(var(--card), var(--card)) padding-box, var(--aurora) border-box; border: 1.5px solid transparent; box-shadow: 0 16px 44px rgba(45, 98, 240, .14); }
.stepper { display: flex; gap: 6px; margin: 18px 0 14px; }
.stepper .s { flex: 1; min-width: 0; }
.stepper .s i { display: block; height: 5px; border-radius: var(--r-pill); background: var(--line-2); margin-bottom: 8px; position: relative; overflow: hidden; }
.stepper .s.done i { background: var(--green); }
.stepper .s.now i { background: var(--brand-soft); }
.stepper .s.now i::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--aurora); border-radius: var(--r-pill); animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.stepper .s b { font-size: .74rem; font-weight: 600; display: block; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .s span { font-size: .7rem; color: var(--muted); }
.stepper .s.now b { color: var(--brand); }
.engine { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 600; border-radius: 6px; padding: 1px 7px; }
.engine.claude { background: #fbeee6; color: #b4400b; }
.engine.gemini { background: #e8f0fe; color: #1a5fd0; }
:root[data-theme="dark"] .engine.claude { background: rgba(251, 146, 60, .14); color: #fdba74; }
:root[data-theme="dark"] .engine.gemini { background: rgba(96, 165, 250, .14); color: #93c5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .engine.claude { background: rgba(251, 146, 60, .14); color: #fdba74; }
  :root:not([data-theme="light"]) .engine.gemini { background: rgba(96, 165, 250, .14); color: #93c5fd; }
}
.engine.local, .engine.template { background: var(--line-2); color: var(--muted); }
.meter { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.queue-list { list-style: none; margin: 0; padding: 0; }
.q-item { display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; background: var(--card); transition: background .2s, box-shadow .25s, transform .2s var(--ease); position: relative; }
.q-item + .q-item { border-top: 1px solid var(--line-2); }
.q-item .grip { cursor: grab; color: var(--muted); touch-action: none; padding: 0; width: 36px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; flex: none; }
.q-item.dragging { box-shadow: var(--e4); z-index: 5; background: var(--card); border-radius: 14px; cursor: grabbing; outline: 1.5px solid var(--brand); }
.q-item .pos { width: 26px; height: 26px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-size: .75rem; font-weight: 600; color: var(--ink-2); flex: none; transition: background .3s, color .3s; }
.q-item:first-child .pos { background: var(--grad); color: #fff; }
.q-item .t { flex: 1; min-width: 0; }
.q-item .t a { color: var(--ink); font-weight: 500; font-size: .92rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item .t span { font-size: .78rem; color: var(--muted); }
.q-item .acts { display: flex; gap: 2px; }
.proj-list { display: grid; }
.proj { display: flex; align-items: center; gap: 14px; padding: 14px 22px; min-height: 60px; color: var(--ink); border-top: 1px solid var(--line-2); transition: background .2s; }
.proj:active { background: var(--line-2); }
.proj .t { flex: 1; min-width: 0; }
.proj .t b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .93rem; }
.proj .t span { font-size: .78rem; color: var(--muted); }
.proj .cr { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.proj > .ic:last-child { color: var(--muted); transition: transform .2s var(--ease); }
@media (hover: hover) {
  .q-item:hover { background: var(--card-2); }
  .q-item .grip:hover { color: var(--ink-2); background: var(--line-2); }
  .proj:hover { background: var(--card-2); }
  .proj:hover > .ic:last-child { transform: translateX(3px); color: var(--brand); }
  a.card:hover, .card.clickable:hover { transform: translateY(-2px); box-shadow: var(--e3); }
}
.ledger { list-style: none; padding: 0; margin: 0; }
.ledger li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: .86rem; }
.ledger li:first-child { border-top: 0; }
.ledger .d { font-weight: 600; white-space: nowrap; margin-left: auto; font-variant-numeric: tabular-nums; }
.ledger .d.pos { color: var(--green); } .ledger .d.neg { color: var(--ink-2); } .ledger .d.zero { color: var(--muted); font-weight: 500; }
.ledger .n { min-width: 0; } .ledger .n span { display: block; color: var(--muted); font-size: .76rem; }

/* ---------- New project ---------- */
.steps-top { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.steps-top b { color: var(--brand); font-weight: 600; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.builder form { display: grid; gap: 18px; }
.est { position: sticky; top: calc(var(--nav-h) + 20px); }
.est .total { font-size: 2.6rem; font-weight: 700; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.est .total small { font-size: .95rem; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.est .factors { list-style: none; padding: 0; margin: 16px 0; font-size: .86rem; }
.est .factors li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); }
.est .factors li span:last-child { font-weight: 600; white-space: nowrap; }
.est .factors li.new { animation: flash .9s var(--ease); }
@keyframes flash { from { background: var(--brand-soft); } }
.cmeter { display: flex; gap: 4px; margin: 14px 0 6px; }
.cmeter i { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--line-2); transition: background .3s; }
.cmeter.l1 i:nth-child(1), .cmeter.l2 i:nth-child(-n+2), .cmeter.l3 i { background: var(--aurora); }
.balance-line { display: flex; justify-content: space-between; font-size: .88rem; padding: 12px 0; border-top: 1px solid var(--line); gap: 10px; }
.svc-summary { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.delivers { list-style: none; padding: 0; margin: 10px 0 0; font-size: .85rem; color: var(--ink-2); }
.delivers li { display: flex; gap: 8px; margin-top: 7px; } .delivers .ic { color: var(--green); margin-top: 2px; }

/* ---------- Project ---------- */
.proj-head { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.proj-head h1 { font-size: 1.6rem; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.proj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.proj-grid > div { display: grid; gap: 20px; min-width: 0; }
.preview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.preview .bar-top { display: flex; gap: 6px; align-items: center; padding: 10px 12px; background: var(--line-2); border-bottom: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.preview .bar-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.preview .bar-top span { margin-left: 8px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview iframe { width: 100%; height: 620px; border: 0; display: block; background: #fff; }
.files { list-style: none; padding: 0; margin: 0; }
.files li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.files li:first-child { border-top: 0; }
.files .t { flex: 1; min-width: 0; font-size: .9rem; overflow-wrap: anywhere; } .files .t span { display: block; color: var(--muted); font-size: .76rem; }
.files li.on .t b { color: var(--brand); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { display: flex; gap: 12px; padding-bottom: 16px; position: relative; font-size: .86rem; animation: fadeUp .4s var(--ease-out) both; }
.timeline li::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line-2); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--green-soft); border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--green); flex: none; margin-top: 2px; }
.timeline .dot.err { background: var(--red-soft); box-shadow: 0 0 0 1.5px var(--red); }
.timeline span { color: var(--muted); font-size: .76rem; display: block; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: .86rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; white-space: pre-line; max-height: 140px; overflow: auto; }
pre.code { background: var(--night); color: #dfe7ff; padding: 14px; border-radius: var(--r-sm); font-size: .8rem; white-space: pre-wrap; word-break: break-all; margin: 0; }

/* ---------- Billing ---------- */
.billing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.billing .full { grid-column: 1 / -1; }
.buy-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.buy { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; flex-direction: column; gap: 4px; background: var(--card); transition: transform .25s var(--ease-out), box-shadow .25s, border-color .25s; }
.buy.featured { border: 1.5px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--aurora) border-box; box-shadow: 0 14px 40px rgba(45, 98, 240, .16); }
.buy .p { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; }
@media (hover: hover) { .buy:hover { transform: translateY(-3px); box-shadow: var(--e3); } }
.withdraw-value { background: var(--line-2); border-radius: var(--r-sm); padding: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.withdraw-value b { font-size: 1.4rem; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.tbl th { text-align: left; font-weight: 500; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
@media (hover: hover) { table.tbl tbody tr:hover td { background: var(--card-2); } }

/* ---------- Modal & toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(4, 9, 26, .5); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); z-index: 60; display: grid; place-items: center; padding: 20px; animation: fade .2s; overscroll-behavior: contain; }
.modal-back.out { opacity: 0; transition: opacity .2s; }
.modal { background: var(--card); border-radius: var(--r-xl); padding: 28px; width: 100%; max-width: 440px; position: relative; box-shadow: var(--e4); animation: modalIn .35s var(--ease-out); max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); }
.modal.wide { max-width: 720px; }
.modal-x { position: absolute; top: 12px; right: 12px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
#toasts { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; gap: 10px; align-items: center; background: rgba(8, 15, 40, .92); color: #fff; padding: 12px 18px; min-height: 48px; border-radius: 16px; box-shadow: var(--e4); font-size: .9rem; animation: toastIn .4s var(--spring);
  border: 1px solid rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer; }
.toast-ok .ic { color: var(--teal); } .toast-bad .ic { color: #ff9aa4; }
.toast.out { opacity: 0; transform: translateY(10px) scale(.96); transition: all .3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
.pay-sheet { text-align: center; }
.pay-sheet .amt { font-size: 2.4rem; font-weight: 700; margin: 8px 0 2px; }

/* ---------- 24-hour clock ---------- */
.clock { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .01em; color: var(--ink); }
.clock.soon { color: var(--amber); }
.clock.late { color: var(--red); }
.clock.paused { color: var(--muted); }
.ring { position: relative; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; }
.ring .arc { transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 4px rgba(59, 130, 246, .35)); }
.ring.late .arc { stroke: var(--red); }
.ring.paused .arc { stroke: var(--muted); filter: none; }
.ring-text { position: relative; text-align: center; line-height: 1.15; }
.ring-text b .clock { font-size: 1.28rem; }
.ring-text > span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-top: 2px; }
.ring.paused .ring-text > span { color: var(--amber); font-weight: 600; }
.clock-main { display: flex; gap: 22px; align-items: center; }
.clock-info { flex: 1; min-width: 0; display: grid; gap: 8px; justify-items: start; }
.clock-info .notice { padding: 9px 12px; }
.clock-title { color: var(--ink); font-weight: 600; font-size: 1.02rem; }
.clock-card { background: radial-gradient(400px 200px at 100% 0%, var(--brand-soft), transparent 70%), var(--card); }
.mini-clocks { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 8px; }
.mini-clocks li { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.mini-clocks a { flex: 1; min-width: 0; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan { margin: 0; padding-left: 18px; font-size: .9rem; color: var(--ink-2); display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.delivered-time { background: var(--green-soft); border-color: transparent; }
.delivered-time > .row > .ic { color: var(--green); }

/* ---------- Free trial & cash-out ---------- */
.free-trial, .trial-card { margin-bottom: 18px; background: linear-gradient(120deg, rgba(46, 230, 200, .12), rgba(59, 130, 246, .08) 50%, rgba(155, 123, 255, .12)), var(--card); border-color: rgba(59, 130, 246, .25); }
.free-trial .ic, .trial-card .ic { color: var(--brand); }
.bank-line { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.bank-line .ic { color: var(--brand); }
/* Grid children may shrink below their content width (tables scroll inside their own wrappers). */
.billing > *, .dash > div, .dash > div > *, .proj-grid > div > *, .buy-row > * { min-width: 0; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1080px) {
  .dash, .builder, .proj-grid, .billing, .sk-cols { grid-template-columns: minmax(0, 1fr); }
  .est { position: static; }
  .stats, .sk-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; }
  .hero-x .lead { margin-left: auto; margin-right: auto; }
  .hero-x .cta, .hero-x .trust { justify-content: center; }
  .hero-visual { max-width: 560px; margin: 8px auto 0; width: 100%; }
  .mock { transform: none; animation: none; }
}
@media (max-width: 960px) {
  .topbar .nav { display: none; }
  .topbar .burger { display: inline-grid; }
  .ind-panel, .feat { grid-template-columns: minmax(0, 1fr); }
  .feat.rev .feat-copy { order: 0; }
  .ind-copy { text-align: center; }
  .stepper-x { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 560px; margin: 0 auto; }
  .stepper-x::before, .stepper-x::after { top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; }
  .stepper-x::after { transform: scaleY(0); transform-origin: top; }
  .stepper-x.in::after { transform: scaleY(1); }
  .stepper-x li { display: grid; grid-template-columns: 56px minmax(0, 1fr); column-gap: 18px; text-align: left; padding-bottom: 28px; }
  .stepper-x li:last-child { padding-bottom: 0; }
  .stepper-x .dot { grid-row: span 3; margin: 0; }
  .packs { grid-template-columns: minmax(0, 1fr); max-width: 480px; margin-left: auto; margin-right: auto; gap: 26px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .auth-x { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 28px var(--gutter) 30px; align-items: flex-start; }
  .auth-side h2 { font-size: 1.5rem; margin: 18px 0 16px; }
  .auth-side ul { grid-template-columns: 1fr 1fr; gap: 12px; }
  .auth-side li span, .auth-foot { display: none; }
  .auth-side .ai { width: 36px; height: 36px; border-radius: 11px; }
  .auth-side li b { font-size: .84rem; line-height: 1.3; }
  body.on-auth .topbar .logo-word { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .topbar .wrap { gap: 10px; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
    border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .7rem; font-weight: 500; color: var(--muted); padding: 6px; min-height: 52px; border-radius: 14px; transition: color .2s, background .2s; }
  .mobile-nav a:active { background: var(--line-2); }
  .mobile-nav a.on { color: var(--brand); }
  .mobile-nav a.on .ic { transform: translateY(-1px); }
  body.authed main.page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  body.authed #toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .steps, .band, .buy-row, .grid2 { grid-template-columns: minmax(0, 1fr); }
  .band { padding: 30px; }
  .pipe { grid-template-columns: 1fr 1fr; }
  .pipe div:last-child { grid-column: span 2; }
  .pipe.mini { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pipe.mini div:last-child { grid-column: auto; }
  .preview iframe { height: 460px; }
  .proj { padding: 14px 16px; }
  .stat .val { font-size: 1.5rem; }
  .card { padding: 18px; border-radius: var(--r); }
  .field input, .field select, .field textarea, .input { font-size: 16px; }
  .credit-pill .lbl { display: none; }
  .stats-x { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .ind-uses { grid-template-columns: minmax(0, 1fr); }
  .mock-clock { flex-direction: column; align-items: stretch; }
  .mring { margin: 0 auto; }
  .clock-main { flex-direction: column; align-items: flex-start; }
  .ind-tabs { width: auto; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; border-left: 0; border-right: 0; padding: 6px var(--gutter); }

  /* Tables become stacked cards */
  table.tbl.cardify thead { display: none; }
  table.tbl.cardify, table.tbl.cardify tbody, table.tbl.cardify tr, table.tbl.cardify td { display: block; width: 100%; }
  table.tbl.cardify tr { border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; margin-bottom: 10px; background: var(--card-2); }
  table.tbl.cardify td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line-2); text-align: right !important; overflow-wrap: anywhere; }
  table.tbl.cardify td:last-child { border-bottom: 0; }
  table.tbl.cardify td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; text-align: left; flex: none; padding-top: 2px; }
  table.tbl.cardify td > * { max-width: 70%; }

  /* Modals become bottom sheets */
  .modal-back { place-items: end stretch; padding: 0; }
  .modal, .modal.wide { max-width: none; border-radius: 24px 24px 0 0; padding: 30px max(20px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    max-height: 92dvh; animation: sheetIn .38s var(--ease-out); border-bottom: 0; }
  .modal::before { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
  .modal .row.end { flex-wrap: wrap-reverse; }
  .modal .row.end .btn { flex: 1 1 140px; }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}
@media (max-width: 600px) {
  .home .svc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .home .svc-card { padding: 14px; gap: 8px; border-radius: var(--r); }
  .home .svc-card p, .home .svc-card .chip { display: none; }
  .home .svc-card h3 { font-size: .9rem; line-height: 1.25; flex: 1; }
  .home .svc-card .svc-ic { width: 38px; height: 38px; border-radius: 11px; }
  .use { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; column-gap: 14px; row-gap: 6px; padding: 16px; }
  .use em { grid-column: 2; }
}
@media (max-width: 480px) {
  .topbar .wrap { gap: 6px; }
  .topbar .logo { gap: 8px; font-size: 1rem; min-width: 0; }
  .topbar .logo svg { width: 30px; height: 30px; }
  .user { gap: 4px; }
  .user .btn.sm { padding: 8px 13px; font-size: .82rem; }
  .hide-sm { display: none !important; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .trial-x { padding: 20px; }
  .trial-x .btn { width: 100%; }
  .hero-x .cta .btn { width: 100%; }
  .cta-x .cta .btn { width: 100%; }
  .auth .card { padding: 24px 20px; }
  .auth-side ul { grid-template-columns: minmax(0, 1fr); }
  .stats { gap: 10px; }
  .stat { padding: 14px 16px; }
}
@media (max-width: 400px) {
  body.authed .topbar .logo-word { display: none; }
  body:not(.authed) .theme-btn { display: none; }
}
@media (max-width: 360px) {
  .topbar .logo-word { display: none; }
  .stats-x b { font-size: 1.8rem; }
}
/* Touch devices: comfortable 44px targets everywhere. */
@media (pointer: coarse) {
  .btn.sm { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .tabs button { min-height: 44px; }
  .avatar { width: 42px; height: 42px; }
}

/* Reduced motion: no decorative movement, content always visible. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee { overflow-x: auto; }
  .marquee .track { animation: none; }
  .mock { transform: none; }
}
