/* KPI Daddy demo. One stylesheet; the brand colour comes from the coach's settings (--brand). */
:root {
  --brand: #5B3DF5;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #ffffff);
  --brand-line: color-mix(in srgb, var(--brand) 28%, #ffffff);
  --bg: #F4F4F1;
  --panel: #FFFFFF;
  --ink: #101114;
  --ink-2: #393C44;
  --muted: #6B6E78;
  --faint: #9497A1;
  --line: #E4E4DF;
  --line-2: #EFEFEB;
  --side: #0D0E12;
  --side-2: #17181E;
  --side-ink: #EDEDF1;
  --side-muted: #8D909C;
  --good: #0B7A4E; --good-bg: #E3F3EA;
  --warn: #965A00; --warn-bg: #FBF0DB;
  --bad: #B42318; --bad-bg: #FCEAE7;
  --ads: #1F6FEB; --setter: #C2410C; --closer: #BE185D; --cash: #047857;
  --r: 14px; --r-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 17, 20, .05);
  --shadow-lg: 0 24px 60px -12px rgba(16, 17, 20, .28), 0 4px 12px rgba(16, 17, 20, .08);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.hide { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--side) 252px, var(--bg) 252px); }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 14px 14px; gap: 18px; }
.logo { display: flex; align-items: center; gap: 11px; padding: 4px 6px; text-decoration: none; }
.mark { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: -.02em; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.logo b { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.logo small { display: block; color: var(--side-muted); font-size: 12px; line-height: 1.3; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-h { color: var(--side-muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: #C9CAD2; text-decoration: none; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.on { background: var(--side-2); color: #fff; box-shadow: inset 2px 0 0 var(--brand); }
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav a .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex: none; }
.nav .clients a { font-size: 13px; padding: 6px 10px; color: #B5B7C0; }
.side-foot { margin-top: auto; border-top: 1px solid #22232B; padding: 12px 6px 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #262833; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who small { color: var(--side-muted); font-size: 12px; }
.icon-btn { background: none; border: 0; color: var(--side-muted); padding: 6px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { color: #fff; background: var(--side-2); }
.icon-btn svg { width: 17px; height: 17px; }
.demo-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #C9B8FF; background: rgba(122, 92, 255, .14); border: 1px solid rgba(160, 135, 255, .22); padding: 3px 8px; border-radius: 99px; margin: 0 6px; align-self: flex-start; }

main { min-width: 0; padding: 30px 40px 96px; max-width: 1440px; width: 100%; }

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  .side { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; overflow: hidden; }
  .side .logo small, .side .logo b { display: none; }
  .side .logo { padding: 0; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; gap: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-h, .nav .clients, .demo-tag { display: none; }
  .nav a { padding: 7px 10px; font-size: 13px; }
  .nav a.on { box-shadow: inset 0 -2px 0 var(--brand); }
  .side-foot { margin: 0; border: 0; padding: 0; }
  .side-foot .who, .side-foot .avatar { display: none; }
  main { padding: 20px 16px 96px; }
}

/* ---------- Page parts ---------- */
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.025em; font-weight: 650; margin: 2px 0 0; max-width: 760px; }
.page-h p.sub { margin: 6px 0 0; color: var(--muted); max-width: 680px; }
.eyebrow { font-size: 12.5px; color: var(--muted); font-weight: 500; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 13px; margin-bottom: 10px; }
.back:hover { color: var(--ink); }
.back svg { width: 16px; height: 16px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-h h2 { font-size: 15px; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.card-h p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.card-b { padding: 16px 18px 18px; }
.stack { display: grid; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; padding: 2px 9px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; line-height: 1.6; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.brand { background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 80%, #000); }
.pill .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.3; }
.btn:hover { border-color: #CFCFC9; background: #FAFAF8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn svg { width: 16px; height: 16px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; outline: none; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input.sm { padding: 5px 9px; border-radius: 8px; font-size: 13px; }

/* Week picker */
.weekpick { display: inline-flex; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 3px; box-shadow: var(--shadow); }
.weekpick button { border: 0; background: none; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.weekpick button:hover:not(:disabled) { background: var(--line-2); }
.weekpick button:disabled { opacity: .3; cursor: default; }
.weekpick select { border: 0; background: none; font-weight: 550; padding: 0 6px; cursor: pointer; outline: none; }
.weekpick svg { width: 16px; height: 16px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.tile small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tile b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.03em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 550; color: var(--muted); white-space: nowrap; }
.delta.good { color: var(--good); } .delta.bad { color: var(--bad); }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.four .delta { white-space: normal; }
@media (max-width: 1200px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tile b { font-size: 21px; } }

/* Needs you */
.needs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.need { display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: #fff; transition: border-color .15s, transform .15s; position: relative; overflow: hidden; }
.need::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--bad); }
.need.stale::before { background: var(--warn); }
.need:hover { border-color: #CBCBC4; transform: translateY(-1px); }
.need .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.need b { font-weight: 650; }
.need p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.need .fix { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--good); font-weight: 550; font-size: 13px; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.t th { text-align: left; font-weight: 550; color: var(--muted); font-size: 12px; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FBFBF9; }
table.t td { padding: 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: middle; }
table.t th.n, table.t td.n { text-align: right; }
table.t tr:last-child td { border-bottom: 0; }
table.t.dense th, table.t.dense td { padding-left: 8px; padding-right: 8px; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: #FAFAF7; }
table.t tbody tr.sel td { background: var(--brand-soft); }
table.t td.good { color: var(--good); font-weight: 600; }
table.t td.bad { color: var(--bad); font-weight: 600; }
table.t th.grp { text-align: center; color: var(--ink-2); font-size: 11.5px; letter-spacing: .02em; border-bottom: 0; padding-bottom: 4px; background: #fff; }
table.t th.grp span { display: block; border-top: 3px solid var(--c); padding-top: 6px; }
table.t th.first, table.t td.first { position: sticky; left: 0; z-index: 1; }
table.t td.first { background: #fff; }
table.t tbody tr.sel td.first { background: var(--brand-soft); }
.cname { display: flex; align-items: center; gap: 10px; }
.cname .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 650; color: #fff; flex: none; }
.cname b { display: block; font-weight: 600; font-size: 13.5px; }
.cname small { display: block; color: var(--muted); font-size: 12px; }
.missing { color: var(--bad); font-weight: 550; }

/* Sources strip */
.sources { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: stretch; margin-bottom: 18px; }
.src { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.src i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-top: 6px; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 16%, transparent); }
.src b { display: block; font-size: 13px; font-weight: 600; }
.src small { display: block; font-size: 12px; color: var(--muted); }
.src small.late { color: var(--bad); font-weight: 550; }
.src-arrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; padding: 0 4px; white-space: nowrap; }
.src-arrow svg { width: 18px; height: 18px; }
@media (max-width: 1100px) { .sources { grid-template-columns: repeat(2, minmax(0, 1fr)); } .src-arrow { display: none; } }

/* Funnel steps */
.steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.step { padding: 14px 14px 13px; border-right: 1px solid var(--line-2); min-width: 0; position: relative; background: #fff; }
.step:last-child { border-right: 0; }
.step::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); opacity: .9; }
.step small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.03em; margin: 3px 0 8px; font-variant-numeric: tabular-nums; }
.rate { font-size: 12px; font-weight: 550; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rate.good { color: var(--good); } .rate.bad { color: var(--bad); } .rate.none { color: var(--faint); }
.meter { height: 5px; border-radius: 3px; background: var(--line-2); margin-top: 6px; position: relative; overflow: visible; }
.meter > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: currentColor; }
.meter::after { content: ""; position: absolute; left: 70%; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); border-radius: 1px; opacity: .55; }
.rate .tgt { color: var(--faint); font-weight: 500; }
.meter.good { color: var(--good); } .meter.bad { color: var(--bad); }
@media (max-width: 1200px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } .step { border-bottom: 1px solid var(--line-2); } }
@media (max-width: 560px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 12px 10px 11px; cursor: pointer; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tabs button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button small { font-weight: 500; color: var(--faint); font-size: 12px; }

/* Log form */
.logform { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; align-items: end; padding: 14px 18px; background: #FAFAF7; border-bottom: 1px solid var(--line-2); }
.logform.hide { display: none; }
.logform .field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logform .btn { height: 40px; }

/* Chart */
.chart svg { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }

/* Chat */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border: 0; border-radius: 99px; padding: 10px 18px 10px 10px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-lg); }
.fab .mark { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }
.fab:hover { transform: translateY(-1px); }
.drawer-bg { position: fixed; inset: 0; background: rgba(13, 14, 18, .28); z-index: 50; opacity: 0; transition: opacity .2s; }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px)); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 51; display: flex; flex-direction: column; transform: translateX(110%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.drawer.open { transform: none; }
.drawer-bg.open { opacity: 1; }
@media (max-width: 600px) { .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; } .fab { right: 16px; bottom: 16px; } }
.chat { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-h { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.chat-h .mark { width: 38px; height: 38px; border-radius: 50%; }
.chat-h b { display: block; font-weight: 650; }
.chat-h small { display: block; color: var(--muted); font-size: 12.5px; }
.chat-h .x { margin-left: auto; color: var(--muted); }
.chat-h .x:hover { background: var(--line-2); color: var(--ink); }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 160px; }
.msg { max-width: 88%; font-size: 14px; line-height: 1.5; }
.msg.q { align-self: flex-end; background: var(--ink); color: #fff; padding: 9px 13px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.msg.q.other { background: var(--line-2); color: var(--ink); }
.msg .by { display: block; font-size: 11px; font-weight: 600; opacity: .7; margin-bottom: 2px; }
.msg.a { align-self: flex-start; background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 10px 14px; border-radius: 16px 16px 16px 4px; }
.msg.a p { margin: 0 0 6px; } .msg.a p:last-child { margin: 0; }
.msg.a ul { margin: 4px 0 6px; padding-left: 18px; } .msg.a li { margin: 2px 0; }
.msg.a.err { background: var(--bad-bg); border-color: #F3C6BF; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 60%, #fff); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); text-align: left; }
.chip:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.chip.danger { border-style: dashed; }
.chat-in { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid var(--line-2); align-items: flex-end; }
.chat-in textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; max-height: 140px; outline: none; line-height: 1.45; }
.chat-in textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chat-in .btn { height: 40px; width: 40px; padding: 0; border-radius: 12px; }
.empty-chat { color: var(--muted); font-size: 13px; text-align: center; margin: auto; max-width: 280px; }
.empty-chat .mark { margin: 0 auto 10px; width: 44px; height: 44px; border-radius: 50%; }
.chat-card { display: flex; flex-direction: column; height: 640px; overflow: hidden; }
@media (max-width: 600px) { .chat-card { height: 560px; } }

/* Brain */
.brain-ta { width: 100%; min-height: 470px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #FCFCFA; outline: none; resize: vertical; }
.brain-ta:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); background: #fff; }
.lock-note { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--side); color: var(--side-ink); font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.lock-note svg { width: 20px; height: 20px; flex: none; color: #B6A6FF; margin-top: 1px; }
.lock-note b { color: #fff; }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13px; font-weight: 500; margin-bottom: 12px; }
.row-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* Flow diagram */
.flow { display: grid; grid-template-columns: minmax(0, 1.1fr) 40px minmax(0, 1fr) 40px minmax(0, 1fr); align-items: center; gap: 8px; }
.flow-col { display: grid; gap: 8px; }
.flow-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; display: flex; gap: 10px; align-items: center; min-width: 0; }
.flow-box i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.flow-box b { font-size: 13px; font-weight: 600; display: block; }
.flow-box small { font-size: 12px; color: var(--muted); display: block; }
.flow-box.main { border: 1.5px solid var(--ink); padding: 16px; flex-direction: column; align-items: flex-start; }
.flow-arrow { color: var(--faint); display: grid; place-items: center; }
.flow-arrow svg { width: 22px; height: 22px; }
@media (max-width: 800px) { .flow { grid-template-columns: minmax(0, 1fr); } .flow-arrow { transform: rotate(90deg); height: 28px; } }

/* Connections */
.conns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .conns { grid-template-columns: minmax(0, 1fr); } }
.conn { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: #fff; display: grid; gap: 10px; }
.conn-top { display: flex; align-items: center; gap: 12px; }
.conn-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--c); flex: none; }
.conn-top b { display: block; font-weight: 650; }
.conn-top small { display: block; color: var(--muted); font-size: 12.5px; }
.conn-top .pill { margin-left: auto; }
.conn p { margin: 0; color: var(--ink-2); font-size: 13px; }

/* Access */
.fee { width: 96px; }
.ends-soon { color: var(--warn); font-weight: 600; }

/* Login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-brand { background: var(--side); color: var(--side-ink); padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-brand::after { content: ""; position: absolute; width: 620px; height: 620px; right: -220px; bottom: -260px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 55%, transparent) 0%, transparent 65%); opacity: .55; pointer-events: none; }
.login-brand .logo b { font-size: 16px; }
.login-brand h1 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -.035em; font-weight: 650; margin: 0 0 18px; max-width: 560px; position: relative; z-index: 1; }
.login-brand h1 em { font-style: normal; color: color-mix(in srgb, var(--brand) 45%, #fff); }
.login-brand .lede { color: #B9BBC6; font-size: 16px; max-width: 470px; margin: 0; position: relative; z-index: 1; }
.login-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; max-width: 480px; position: relative; z-index: 1; }
.login-points li { display: flex; gap: 12px; color: #D5D6DE; font-size: 14px; }
.login-points svg { width: 18px; height: 18px; color: color-mix(in srgb, var(--brand) 45%, #fff); flex: none; margin-top: 2px; }
.login-foot { color: var(--side-muted); font-size: 12.5px; position: relative; z-index: 1; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.login-form h2 { font-size: 24px; letter-spacing: -.02em; margin: 0; font-weight: 650; }
.login-form p.sub { margin: -8px 0 4px; color: var(--muted); }
.login-form .btn { padding: 11px 14px; }
.err { color: var(--bad); font-size: 13px; min-height: 1.2em; margin: -4px 0 0; }
@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { padding: 28px 22px 32px; gap: 26px; }
  .login-brand h1 { font-size: 32px; }
  .login-points { display: none; }
  .login-foot { display: none; }
}

/* Locked */
.locked { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--side); }
.locked .card { max-width: 440px; padding: 30px; text-align: center; }
.locked .mark { margin: 0 auto 16px; width: 48px; height: 48px; }
.locked h1 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 8px; }
.locked p { color: var(--muted); margin: 0 0 18px; }

/* Toast, skeleton */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 500; font-size: 13.5px; box-shadow: var(--shadow-lg); opacity: 0; transition: all .2s; z-index: 70; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.skel { display: grid; gap: 14px; }
.skel div { height: 92px; border-radius: var(--r); background: linear-gradient(90deg, #ECECE8, #F6F6F3, #ECECE8); background-size: 200% 100%; animation: sh 1.2s infinite linear; }
@keyframes sh { to { background-position: -200% 0; } }
.fade { animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
