/* Sonvera. One stylesheet, no scripts. Light and dark follow the device. */
:root {
  color-scheme: light dark;
  --bg: #f4f5fa; --card: #ffffff; --card-2: #fafbfe; --ink: #10132a; --ink-2: #3b4160; --muted: #6c7391;
  --line: #e5e7f1; --line-2: #eff0f7;
  --brand: #4f46e5; --brand-2: #8b5cf6; --brand-soft: #eceefe; --brand-ink: #3a32b8;
  --green: #0f9f6e; --green-soft: #def7ec; --green-ink: #046c4e;
  --amber: #e08a00; --amber-soft: #fff1d0; --amber-ink: #8a5200;
  --rose: #e5294f; --rose-soft: #ffe4ea; --rose-ink: #b4123a;
  --sky: #0a8fd4; --sky-soft: #def2fd; --sky-ink: #06608f;
  --violet: #8b3fe8; --violet-soft: #f1e6ff; --violet-ink: #6524b8;
  --slate-soft: #edeff5; --slate-ink: #565d7a;
  --btn-a: #4f46e5; --btn-b: #7c3aed; --btn-ink: #ffffff;
  --shadow: 0 1px 2px rgba(20, 24, 60, .05), 0 6px 20px rgba(20, 24, 60, .06);
  --shadow-lift: 0 2px 4px rgba(20, 24, 60, .06), 0 14px 34px rgba(20, 24, 60, .10);
  --glow: rgba(79, 70, 229, .13);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0c14; --card: #141826; --card-2: #181d2d; --ink: #eef0fa; --ink-2: #c9cde0; --muted: #8d94b0;
    --line: #242a3d; --line-2: #1c2132;
    --brand: #8b93ff; --brand-2: #b79bff; --brand-soft: #1f2350; --brand-ink: #c9cfff;
    --green: #34d399; --green-soft: #0f3026; --green-ink: #7eebc0;
    --amber: #fbbf24; --amber-soft: #36290b; --amber-ink: #fcd77a;
    --rose: #ff6b88; --rose-soft: #3d1522; --rose-ink: #ffa9b9;
    --sky: #4cc2ff; --sky-soft: #0c2c40; --sky-ink: #9bdcff;
    --violet: #c08bff; --violet-soft: #2a1b47; --violet-ink: #dcc0ff;
    --slate-soft: #1e2335; --slate-ink: #a7aec7;
    --btn-a: #5b54ee; --btn-b: #8b4df0; --btn-ink: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .28);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .4);
    --glow: rgba(139, 147, 255, .16);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font: 15px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  background:
    radial-gradient(900px 360px at 12% -120px, var(--glow), transparent 70%),
    radial-gradient(700px 320px at 92% -140px, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
svg.i { flex: none; display: inline-block; vertical-align: -3px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
code { font: .84em/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 8px; }

/* ---- top bar ---- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; padding: 10px 22px;
  background: color-mix(in srgb, var(--card) 82%, transparent); backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); box-shadow: 0 4px 12px color-mix(in srgb, var(--btn-a) 35%, transparent); }
.crumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; min-width: 0; }
.crumb a { color: var(--muted); white-space: nowrap; }
.crumb .op { display: inline-flex; align-items: center; gap: 8px; }
.crumb b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13.5px; }
.who form { margin: 0; }

/* ---- layout ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 22px 60px; }
.hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hero .hero-main { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 240px; }
h1 { font-size: 27px; line-height: 1.15; font-weight: 700; letter-spacing: -.022em; }
.sub { color: var(--muted); margin-top: 4px; }
.sub .sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; vertical-align: middle; margin: 0 8px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 22px; }
.col { display: grid; gap: 22px; min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.back:hover { color: var(--ink); text-decoration: none; }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; }
.card-head h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.card-head .hint { color: var(--muted); font-size: 13px; margin-left: auto; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--slate-soft); color: var(--slate-ink); }
.count.hot { background: var(--amber-soft); color: var(--amber-ink); }
.pad { padding: 4px 18px 18px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 18px 30px; color: var(--muted); text-align: center; }
.empty .ring { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
.empty .ring.idle { background: var(--slate-soft); color: var(--slate-ink); }

/* ---- banner ---- */
.note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 18px; border-radius: 12px; font-size: 14px;
  background: var(--amber-soft); color: var(--amber-ink); border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); }

/* ---- stats ---- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -34px; top: -34px; width: 110px; height: 110px; border-radius: 50%; background: var(--c-soft); opacity: .55; }
.stat .chip { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--c-soft); color: var(--c); }
.stat .fig { position: relative; z-index: 1; min-width: 0; }
.stat b { display: block; font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span.lbl { color: var(--muted); font-size: 13.5px; }
.c-brand { --c: var(--brand); --c-soft: var(--brand-soft); --c-ink: var(--brand-ink); }
.c-green { --c: var(--green); --c-soft: var(--green-soft); --c-ink: var(--green-ink); }
.c-amber { --c: var(--amber); --c-soft: var(--amber-soft); --c-ink: var(--amber-ink); }
.c-rose { --c: var(--rose); --c-soft: var(--rose-soft); --c-ink: var(--rose-ink); }
.c-sky { --c: var(--sky); --c-soft: var(--sky-soft); --c-ink: var(--sky-ink); }
.c-violet { --c: var(--violet); --c-soft: var(--violet-soft); --c-ink: var(--violet-ink); }
.c-slate { --c: var(--slate-ink); --c-soft: var(--slate-soft); --c-ink: var(--slate-ink); }

/* ---- avatars ---- */
.av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 700; font-size: 14px; letter-spacing: .02em; background: var(--c-soft); color: var(--c-ink); }
.av.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 19px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, var(--brand-2))); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--c) 30%, transparent); }
.av.sm { width: 30px; height: 30px; font-size: 11.5px; }
.t1 { --c: var(--brand); --c-soft: var(--brand-soft); --c-ink: var(--brand-ink); }
.t2 { --c: var(--green); --c-soft: var(--green-soft); --c-ink: var(--green-ink); }
.t3 { --c: var(--amber); --c-soft: var(--amber-soft); --c-ink: var(--amber-ink); }
.t4 { --c: var(--rose); --c-soft: var(--rose-soft); --c-ink: var(--rose-ink); }
.t5 { --c: var(--sky); --c-soft: var(--sky-soft); --c-ink: var(--sky-ink); }
.t6 { --c: var(--violet); --c-soft: var(--violet-soft); --c-ink: var(--violet-ink); }

/* ---- tags ---- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; line-height: 1.6; white-space: nowrap; background: var(--slate-soft); color: var(--slate-ink); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.tag.plain::before { display: none; }
.tag.booked, .tag.sent { background: var(--green-soft); color: var(--green-ink); }
.tag.call_back, .tag.queued, .tag.test { background: var(--amber-soft); color: var(--amber-ink); }
.tag.urgent, .tag.failed { background: var(--rose-soft); color: var(--rose-ink); }
.tag.in_progress { background: var(--sky-soft); color: var(--sky-ink); }
.tag.kind { background: var(--brand-soft); color: var(--brand-ink); }
.tag.who { background: var(--sky-soft); color: var(--sky-ink); }
.tags { display: inline-flex; gap: 6px; flex-wrap: wrap; vertical-align: middle; }

/* ---- buttons ---- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: transform .08s ease, box-shadow .15s ease, background .15s ease; }
button:hover, .btn:hover { text-decoration: none; background: var(--card-2); box-shadow: var(--shadow); }
button:active, .btn:active { transform: translateY(1px); }
.btn.primary, button.primary { border-color: transparent; color: var(--btn-ink); background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); box-shadow: 0 6px 16px color-mix(in srgb, var(--btn-a) 32%, transparent); }
.btn.primary:hover, button.primary:hover { filter: brightness(1.07); }
.btn.call { border-color: transparent; background: var(--brand-soft); color: var(--brand-ink); }
.btn.call:hover { background: color-mix(in srgb, var(--brand-soft) 80%, var(--brand)); }
.btn.done { border-color: transparent; background: var(--green-soft); color: var(--green-ink); }
.btn.done:hover { background: color-mix(in srgb, var(--green-soft) 80%, var(--green)); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 8px 10px; }
.btn.ghost:hover { background: var(--slate-soft); color: var(--ink); box-shadow: none; }

/* ---- people to call ---- */
.person { position: relative; display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line-2); }
.person.is-urgent { background: linear-gradient(90deg, color-mix(in srgb, var(--rose-soft) 70%, transparent), transparent 60%); }
.person.is-urgent::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--rose); }
.person .body { flex: 1; min-width: 0; }
.person .line1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.person .name { font-weight: 650; font-size: 15.5px; color: var(--ink); }
.person .when { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.person .need { margin-top: 5px; color: var(--ink-2); overflow-wrap: anywhere; }
.person .where { display: flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.person .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.person .acts form { margin: 0; }

/* ---- agenda ---- */
.day { display: flex; align-items: center; gap: 8px; padding: 9px 18px; font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--card-2); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.visit { display: flex; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.day + .visit { border-top: 0; }
.visit .at { flex: none; align-self: flex-start; min-width: 78px; text-align: center; padding: 6px 8px; border-radius: 10px; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; background: var(--brand-soft); color: var(--brand-ink); }
.visit .body { flex: 1; min-width: 0; }
.visit .name { font-weight: 650; }
.visit p { color: var(--muted); font-size: 14px; margin-top: 3px; overflow-wrap: anywhere; }

/* ---- recent calls ---- */
a.call-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); color: inherit; transition: background .12s ease; }
a.call-row:hover { background: var(--card-2); text-decoration: none; }
.call-row .ico { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--c-soft); color: var(--c); }
.call-row .body { flex: 1; min-width: 0; }
.call-row .line1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.call-row .name { font-weight: 600; }
.call-row .snip { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-row .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.call-row .go { color: var(--muted); opacity: .6; }

/* ---- texts ---- */
.sms { padding: 14px 18px; border-top: 1px solid var(--line-2); }
.sms .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.sms .head b { color: var(--ink-2); font-weight: 650; }
.sms .head .when { margin-left: auto; }
.bubble { display: inline-block; max-width: 100%; padding: 10px 14px; border-radius: 16px 16px 16px 5px; background: var(--slate-soft); color: var(--ink-2); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.sms .stamp { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.av.lg.c-slate { background: linear-gradient(135deg, #7d86a8, #565d7a); }
.sms.to-customer .bubble { background: var(--brand-soft); color: var(--brand-ink); }

/* ---- call page ---- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: 1px solid var(--line-2); overflow: hidden; }
.fact { padding: 14px 18px; margin: 0 -1px -1px 0; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.fact dt { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-weight: 550; overflow-wrap: anywhere; }
dl { margin: 0; }
.chat { display: flex; flex-direction: column; gap: 10px; padding: 6px 18px 20px; }
.turn { max-width: 82%; }
.turn .by { font-size: 12px; font-weight: 650; color: var(--muted); margin: 0 6px 3px; }
.turn .said { padding: 10px 14px; border-radius: 16px 16px 16px 5px; background: var(--slate-soft); color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.turn.caller { align-self: flex-end; }
.turn.caller .by { text-align: right; }
.turn.caller .said { border-radius: 16px 16px 5px 16px; color: #fff; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); }
.plain-text { padding: 4px 18px 18px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }

/* ---- assistant page ---- */
.say { display: flex; gap: 14px; align-items: flex-start; padding: 6px 18px 20px; }
.say .said { padding: 12px 16px; border-radius: 5px 18px 18px 18px; background: var(--brand-soft); color: var(--brand-ink); font-size: 15.5px; }
.doc { padding: 0 18px 18px; }
.doc h3 { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin: 18px 0 8px; }
.doc p { color: var(--ink-2); margin: 6px 0; }
.doc ul, .doc ol { margin: 6px 0; padding-left: 22px; color: var(--ink-2); }
.doc li { margin: 5px 0; padding-left: 2px; }
.doc li::marker { color: var(--brand); font-weight: 700; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; padding: 4px 18px 20px; }
.field { padding: 12px 14px; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line-2); }
.field b { display: inline-block; font: 600 12.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 0 8px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-ink); }
.field p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.wire { padding: 0 18px 18px; display: grid; gap: 12px; }
.wire div span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.wire code { display: block; padding: 9px 12px; border-radius: 10px; background: var(--slate-soft); color: var(--ink-2); }

/* ---- operator table ---- */
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 18px; border-top: 1px solid var(--line-2); white-space: nowrap; }
th { border-top: 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--card-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: var(--card-2); }
.biz { display: flex; align-items: center; gap: 12px; font-weight: 650; color: var(--ink); }
.biz:hover { text-decoration: none; color: var(--brand); }

/* ---- login ---- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 400px; padding: 32px 30px 30px; box-shadow: var(--shadow-lift); }
.login .mark { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 18px; }
.login h1 { font-size: 24px; }
.login label { display: block; margin: 18px 0 6px; font-size: 13px; font-weight: 650; color: var(--ink-2); }
.login input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--card-2); color: var(--ink); font: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.login input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.login button { width: 100%; margin-top: 22px; padding: 12px; font-size: 15px; }
.err { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 12px; border-radius: 10px; background: var(--rose-soft); color: var(--rose-ink); font-size: 14px; }
.foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---- small screens ---- */
@media (max-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .col { display: contents; }
  .o1 { order: 1; } .o2 { order: 2; } .o3 { order: 3; } .o4 { order: 4; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .top { padding: 10px 14px; gap: 10px; }
  .brand span.word, .who .mail, .crumb .op, .who button span { display: none; }
  .wrap { padding: 18px 14px 50px; }
  h1 { font-size: 22px; }
  .av.lg { width: 48px; height: 48px; border-radius: 15px; font-size: 16px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 11px; }
  .stat .chip { width: 38px; height: 38px; border-radius: 12px; }
  .stat b { font-size: 25px; }
  .stat span.lbl { font-size: 12.5px; }
  .person { padding: 14px; gap: 11px; }
  .person .when { width: 100%; margin-left: 0; order: 5; }
  .card-head, .sms, .visit, a.call-row, .day { padding-left: 14px; padding-right: 14px; }
  .call-row .when { display: none; }
  .turn { max-width: 92%; }
  .hero .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- motion ---- */
/* Motion only runs once the browser is really drawing the page (the "motion" class is set on the
   first drawn frame). A page that is loaded but not drawn shows everything at once, never blank. */
html:not(.motion) *, html:not(.motion) *::before, html:not(.motion) *::after { animation: none !important; }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .26s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(70px, -50px, 0) scale(1.2); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-26px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes sheen { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.wrap > .back, .wrap > .hero, .wrap > .note, .wrap > .stats > .stat, .wrap .cols .card, .wrap > .card { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.wrap > .note { animation-delay: .04s; }
.stats > .stat:nth-child(1) { animation-delay: .06s; } .stats > .stat:nth-child(2) { animation-delay: .11s; }
.stats > .stat:nth-child(3) { animation-delay: .16s; } .stats > .stat:nth-child(4) { animation-delay: .21s; }
.cols .col:first-child .card:nth-child(1) { animation-delay: .24s; } .cols .col:last-child .card:nth-child(1) { animation-delay: .3s; }
.cols .col:first-child .card:nth-child(2) { animation-delay: .36s; } .cols .col:last-child .card:nth-child(2) { animation-delay: .42s; }
.wrap > .card { animation-delay: .26s; }
.stat { transition: transform .18s ease, box-shadow .18s ease; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.stat .chip { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.stat:hover .chip { transform: scale(1.08) rotate(-4deg); }
.tag.urgent::before { animation: pulse 1.8s ease-out infinite; }
.call-row .go { transition: transform .15s ease, opacity .15s ease; }
a.call-row:hover .go { transform: translateX(3px); opacity: 1; }
.spin { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
form.is-busy .spin { display: inline-block; }
form.is-busy .when-idle { display: none; }
.when-busy { display: none; }
form.is-busy .when-busy { display: inline; }
form.is-busy button { pointer-events: none; }

/* ---- login ---- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: var(--card); }
.auth-art { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: 44px 56px; color: #fff;
  background: linear-gradient(140deg, #272375 0%, #4338ca 42%, #7c3aed 100%); }
.auth-art::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse at 30% 35%, #000 15%, transparent 72%); mask-image: radial-gradient(ellipse at 30% 35%, #000 15%, transparent 72%); }
.blob { position: absolute; z-index: -2; border-radius: 50%; filter: blur(70px); opacity: .6; animation: drift 17s ease-in-out infinite alternate; }
.blob.b1 { width: 420px; height: 420px; background: #22d3ee; top: -150px; left: -110px; }
.blob.b2 { width: 500px; height: 500px; background: #f472b6; bottom: -200px; right: -150px; animation-duration: 21s; animation-delay: -7s; }
.blob.b3 { width: 300px; height: 300px; background: #a5b4fc; top: 42%; left: 48%; animation-duration: 25s; animation-delay: -12s; opacity: .45; }
.auth-art .brand { color: #fff; font-size: 18px; animation: fade .6s both; }
.auth-art .brand .mark { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); box-shadow: none; width: 38px; height: 38px; border-radius: 12px; }
.art-copy { margin-top: auto; padding-top: 40px; }
.art-copy h2 { font-size: clamp(32px, 3.6vw, 46px); line-height: 1.06; font-weight: 700; letter-spacing: -.035em; max-width: 13ch; animation: rise .7s .08s cubic-bezier(.2, .8, .2, 1) both; }
.art-copy h2 em { font-style: normal; background: linear-gradient(90deg, #a5f3fc, #fbcfe8, #a5f3fc); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite alternate; }
.art-copy p { margin-top: 16px; max-width: 40ch; font-size: 16.5px; line-height: 1.55; color: rgba(255, 255, 255, .84); animation: rise .7s .16s cubic-bezier(.2, .8, .2, 1) both; }
.feed { display: grid; gap: 12px; margin: 34px 0 auto; max-width: 370px; }
.fcard { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-radius: 17px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 12px 34px rgba(20, 10, 80, .28);
  animation: slide-in .75s cubic-bezier(.2, .8, .2, 1) both, bob 6s ease-in-out infinite; }
.fcard:nth-child(1) { animation-delay: .35s, 1.1s; }
.fcard:nth-child(2) { margin-left: 36px; animation-delay: .55s, 1.9s; }
.fcard:nth-child(3) { margin-left: 14px; animation-delay: .75s, 2.7s; }
.fcard .fi { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .92); }
.fcard:nth-child(1) .fi { color: #4f46e5; } .fcard:nth-child(2) .fi { color: #0f9f6e; } .fcard:nth-child(3) .fi { color: #e08a00; }
.fcard b { display: block; font-weight: 650; }
.fcard span.s { font-size: 13.5px; color: rgba(255, 255, 255, .8); }
.trades { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 34px; animation: fade .8s 1s both; }
.trades span { padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .9); }

.auth-form { display: grid; place-items: center; padding: 40px 28px; background:
  radial-gradient(520px 300px at 85% 0%, var(--glow), transparent 70%), var(--card); }
.login { width: 100%; max-width: 380px; padding: 0; box-shadow: none; }
.login > * { animation: rise .55s cubic-bezier(.2, .8, .2, 1) both; }
.login > :nth-child(1) { animation-delay: .10s; } .login > :nth-child(2) { animation-delay: .16s; } .login > :nth-child(3) { animation-delay: .22s; }
.login > :nth-child(4) { animation-delay: .28s; } .login > :nth-child(5) { animation-delay: .34s; } .login > :nth-child(6) { animation-delay: .40s; }
.login > :nth-child(7) { animation-delay: .46s; } .login > :nth-child(8) { animation-delay: .52s; }
.login .mark { display: none; }
.login h1 { font-size: 30px; }
.login .sub { font-size: 15.5px; margin-bottom: 8px; }
.inp { position: relative; }
.inp svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); transition: color .15s ease; pointer-events: none; }
.inp:focus-within svg { color: var(--brand); }
.login .inp input { padding: 13px 14px 13px 42px; border-radius: 13px; background: var(--card-2); font-size: 15.5px; }
.login button.primary { position: relative; overflow: hidden; margin-top: 26px; padding: 13px; border-radius: 13px; font-size: 15.5px; }
.login button.primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; }
.login button.primary:hover::after { transform: translateX(120%); }
.login button.primary .arrow { transition: transform .18s ease; }
.login button.primary:hover .arrow { transform: translateX(4px); }
form.is-busy .inp, form.is-busy label { opacity: .55; transition: opacity .2s ease; }
form.is-busy button.primary { filter: saturate(.85); }
.login .err { animation: shake .45s ease both, fade .3s both; }
.login .foot { text-align: left; margin-top: 26px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-art { padding: 26px 22px 30px; }
  .art-copy { padding-top: 26px; }
  .art-copy h2 { font-size: 30px; max-width: none; }
  .art-copy p { font-size: 15px; }
  .feed, .trades { display: none; }
  .auth-form { place-items: start center; padding: 30px 22px 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* ---- public pages ---- */
.pub { min-height: 100vh; display: flex; flex-direction: column; background: var(--card); }
.pub-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 22px clamp(18px, 5vw, 64px) 70px;
  background: linear-gradient(140deg, #272375 0%, #4338ca 42%, #7c3aed 100%); }
.pub-nav { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; }
.pub-nav .brand, .pub-bar .brand { font-size: 18px; }
.pub-nav .brand { color: #fff; }
.pub-nav .brand .mark { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3); box-shadow: none; width: 38px; height: 38px; border-radius: 12px; }
.btn.glass { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); }
.btn.glass:hover { background: rgba(255, 255, 255, .24); box-shadow: none; }
.btn.white { color: #312e81; background: #fff; border-color: #fff; padding: 13px 20px; border-radius: 13px; font-size: 16px; box-shadow: 0 12px 30px rgba(20, 10, 80, .3); }
.btn.white:hover { background: #f3f2ff; }
.pub-hero-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1180px; margin: 0 auto; padding-top: 56px; }
.pub-hero .art-copy { margin: 0; padding: 0; }
.pub-hero h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.03; font-weight: 700; letter-spacing: -.04em; animation: rise .7s .08s cubic-bezier(.2, .8, .2, 1) both; }
.pub-hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5f3fc, #fbcfe8, #a5f3fc); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite alternate; }
.pub-hero .art-copy p { max-width: 52ch; font-size: 18px; }
.cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 30px; animation: rise .7s .26s cubic-bezier(.2, .8, .2, 1) both; }
.cta-note { max-width: 44ch; font-size: 14.5px; color: rgba(255, 255, 255, .82); }
.pub-hero .feed { margin: 0; justify-self: end; width: 100%; }
.pub-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px clamp(18px, 5vw, 64px) 40px; }
.pub-sec { padding: 46px 0 6px; }
.pub-sec h2 { font-size: 28px; letter-spacing: -.025em; margin-bottom: 18px; }
.pub-lead { color: var(--muted); font-size: 17px; max-width: 62ch; margin: -6px 0 20px; }
.pub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pub-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pub-card { padding: 22px; border-radius: var(--radius); background: var(--card-2); border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease; }
.pub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.pub-card .chip { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--c-soft); color: var(--c); margin-bottom: 14px; }
.pub-card h3 { font-size: 17px; margin-bottom: 6px; }
.pub-card p { color: var(--muted); }
.trades.dark { padding-top: 0; animation: none; }
.trades.dark span { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); font-size: 14px; padding: 6px 14px; }
.pub-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 22px clamp(18px, 5vw, 64px); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.pub-foot span:first-child { font-weight: 700; color: var(--ink); margin-right: auto; }
.pub-foot a { color: var(--muted); }
.pub-bar { display: flex; align-items: center; gap: 14px; padding: 12px clamp(18px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.legal { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 44px 22px 60px; }
.legal h1 { font-size: 34px; }
.legal h2 { font-size: 19px; margin: 30px 0 8px; }
.legal p, .legal li { color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal li { margin: 6px 0; }
@media (max-width: 900px) {
  .pub-hero-in { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-top: 38px; }
  .pub-hero .feed { display: grid; justify-self: start; max-width: 380px; }
  .pub-grid, .pub-grid.two { grid-template-columns: minmax(0, 1fr); }
  .pub-hero { padding-bottom: 46px; }
}
