:root {
  --bg: #04060b;
  --ink: #edf0f6;
  --ink2: #a8b0c2;
  --ink3: #687287;
  --line: rgba(255, 255, 255, .075);
  --line2: rgba(255, 255, 255, .14);
  --panel: #090c13;
  --panel2: #0f131c;
  --panel3: #151a25;
  --warm: #ffe7bd;
  --f-d: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --f-t: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-m: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --panel-w: 432px;
  --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14.5px/1.55 var(--f-t); -webkit-font-smoothing: antialiased; overflow: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { display: block; }
a { color: inherit; }
::selection { background: rgba(255, 231, 189, .25); }

/* ---------- shared */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 500; font-size: 14px;
  border: 1px solid var(--line2); background: var(--panel2); transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { background: var(--panel3); border-color: rgba(255, 255, 255, .22); }
.btn:active { transform: scale(.98); }
.btn--light { background: var(--warm); color: #17120a; border-color: transparent; font-weight: 600; }
.btn--light:hover { background: #fff1d8; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 2px; }

/* ---------- gate */
.gate { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; overflow: hidden; }
.gate__glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 30% 40%, rgba(180, 155, 255, .16), transparent 70%),
    radial-gradient(35% 30% at 70% 60%, rgba(92, 225, 230, .12), transparent 70%),
    radial-gradient(30% 30% at 50% 50%, rgba(255, 231, 189, .10), transparent 70%);
  filter: blur(10px); animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, -2%, 0) scale(1.06); } }
.gate__card { position: relative; width: min(380px, 100%); display: grid; gap: 14px; text-align: left; }
.gate__mark { width: 44px; height: 44px; color: var(--warm); margin-bottom: 6px; }
.gate h1 { margin: 0; font: 700 40px/1 var(--f-d); letter-spacing: -.02em; }
.gate p { margin: 0; color: var(--ink2); }
.gate__field { display: grid; gap: 6px; margin-top: 10px; }
.gate__field span { font: 500 11px var(--f-m); letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.gate__field input {
  height: 48px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(9, 12, 19, .8);
  color: var(--ink); padding: 0 14px; font: 500 16px var(--f-t);
}
.gate__field input:focus { outline: none; border-color: rgba(255, 231, 189, .5); }
.gate .btn { height: 48px; }
.gate__err { color: #ff9a8a !important; font-size: 13.5px; }

/* ---------- app frame */
.app { position: fixed; inset: 0; }
.app::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 45% 50%, rgba(255, 231, 189, .045), transparent 70%),
    radial-gradient(50% 60% at 15% 85%, rgba(120, 100, 255, .07), transparent 70%),
    radial-gradient(45% 45% at 85% 15%, rgba(60, 200, 220, .05), transparent 70%);
}
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.scene.hover { cursor: pointer; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.lb {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity;
  font: 500 11.5px/1 var(--f-t); color: rgba(237, 240, 246, .82); letter-spacing: .005em;
  text-shadow: 0 1px 8px rgba(4, 6, 11, .95), 0 0 2px rgba(4, 6, 11, .9);
}
.lb--hub { font: 650 15px/1 var(--f-d); letter-spacing: -.005em; color: var(--c); }
.lb--hub small { display: block; margin-top: 4px; font: 500 10px/1 var(--f-m); letter-spacing: .1em; color: rgba(237, 240, 246, .45); }
.lb--core { font: 700 19px/1 var(--f-d); color: var(--warm); letter-spacing: -.01em; }
.lb--group { font: 600 12.5px/1 var(--f-t); color: rgba(255, 255, 255, .92); }
.lb--sel { color: #fff; font-weight: 650; }

/* ---------- top bar */
.top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px;
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 11px; text-align: left; flex: none; }
.brand svg { width: 30px; height: 30px; color: var(--warm); }
.brand__t { font: 700 18px/1 var(--f-d); letter-spacing: -.01em; }
.brand__m { display: block; font: 400 11px/1 var(--f-m); color: var(--ink3); margin-top: 5px; letter-spacing: .02em; }
.brand > span:first-of-type { display: block; }
.brand { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 11px; }
.brand svg { grid-row: 1 / 3; align-self: center; }
.search { position: relative; flex: 0 1 440px; margin: 0 auto; display: flex; align-items: center; height: 42px; border-radius: 12px; background: rgba(9, 12, 19, .82); border: 1px solid var(--line2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.search > svg { width: 17px; height: 17px; margin-left: 13px; color: var(--ink3); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; color: var(--ink); font: 400 15px var(--f-t); padding: 0 10px; }
.search input:focus { outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search:focus-within { border-color: rgba(255, 231, 189, .35); }
.search kbd { margin-right: 10px; font: 500 11px var(--f-m); color: var(--ink3); border: 1px solid var(--line2); border-radius: 6px; padding: 3px 6px; }
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: min(60vh, 520px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.res { display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 11px; align-items: baseline; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; }
.res i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); align-self: center; }
.res b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res em { font: 400 10.5px var(--f-m); font-style: normal; color: var(--ink3); text-transform: uppercase; letter-spacing: .08em; }
.res span { grid-column: 2 / 4; font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res:hover, .res.on { background: var(--panel3); }
.results .empty { padding: 12px; color: var(--ink3); font-size: 13px; }
.tools { display: flex; gap: 6px; flex: none; }
.tbtn {
  height: 38px; padding: 0 13px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--ink2);
  border: 1px solid var(--line); background: rgba(9, 12, 19, .6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: color .2s, border-color .2s, background .2s;
}
.tbtn:hover { color: var(--ink); border-color: var(--line2); }
.tbtn[aria-pressed="true"] { color: var(--warm); border-color: rgba(255, 231, 189, .35); }
.tbtn--icon { width: 38px; padding: 0; display: grid; place-items: center; }
.tbtn--icon svg { width: 18px; height: 18px; }

/* ---------- hub rail */
.rail {
  position: absolute; left: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 4;
  display: grid; gap: 1px; width: 220px;
}
.rail button {
  display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px;
  padding: 5px 8px; border-radius: 8px; text-align: left; color: var(--ink2); font-size: 13px;
  transition: color .2s, background .2s;
}
.rail button i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); justify-self: center; transition: transform .2s; }
.rail button b { font: 400 10.5px var(--f-m); color: var(--ink3); }
.rail button:hover, .rail button.on { color: var(--ink); background: rgba(255, 255, 255, .04); }
.rail button.on i { transform: scale(1.5); }
.rail { transition: opacity .4s; }
.rail.quiet { opacity: 0; pointer-events: none; }
.rail h2 { margin: 0 0 6px 8px; font: 500 10.5px var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.hint {
  position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  margin: 0; font: 400 12px var(--f-m); color: var(--ink3); letter-spacing: .02em; transition: opacity .8s; z-index: 3; pointer-events: none;
  white-space: nowrap;
}
.hint.gone { opacity: 0; }

/* ---------- panel */
.panel {
  position: absolute; z-index: 6; top: calc(72px + env(safe-area-inset-top, 0px)); right: 16px; bottom: 16px; width: var(--panel-w);
  display: flex; flex-direction: column; background: rgba(8, 11, 17, .94); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overflow: hidden;
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s;
}
.panel.off { transform: translateX(calc(100% + 24px)); opacity: 0; pointer-events: none; }
.panel__grab { display: none; }
.panel__tabs { display: flex; align-items: center; gap: 2px; padding: 10px 10px 0 14px; border-bottom: 1px solid var(--line); flex: none; }
.panel__tabs [role=tab] { padding: 10px 10px 12px; font-size: 13.5px; font-weight: 550; color: var(--ink3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.panel__tabs [role=tab][aria-selected=true] { color: var(--ink); border-color: var(--warm); }
.panel__x { margin-left: auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--ink3); margin-bottom: 6px; }
.panel__x:hover { color: var(--ink); background: var(--panel3); }
.panel__x svg { width: 17px; height: 17px; }
.panel__body { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 32px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.view--chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }

/* node view */
.kicker { display: flex; align-items: center; gap: 8px; font: 500 10.5px var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.ntitle { margin: 12px 0 0; font: 700 30px/1.08 var(--f-d); letter-spacing: -.02em; text-wrap: balance; }
.ntitle.long { font-size: 23px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin-top: 12px; font-size: 12.5px; color: var(--ink3); }
.crumbs button { color: var(--ink2); }
.crumbs button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs span { opacity: .5; }
.npath { margin-top: 10px; font: 400 11.5px var(--f-m); color: var(--ink3); overflow-wrap: anywhere; }
.nsum { margin: 16px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.nact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.nact .btn { min-height: 36px; padding: 0 13px; font-size: 13px; }
.sect { margin-top: 26px; }
.sect > h3 { margin: 0 0 10px; display: flex; justify-content: space-between; font: 500 10.5px var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.kids { display: grid; gap: 2px; }
.kid { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; }
.kid i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); justify-self: center; }
.kid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.kid em { font: 400 10.5px var(--f-m); font-style: normal; color: var(--ink3); }
.kid:hover { background: var(--panel2); }
.md { margin-top: 22px; font-size: 14px; line-height: 1.62; color: #d5dae5; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--f-d); color: var(--ink); line-height: 1.2; margin: 1.4em 0 .5em; letter-spacing: -.01em; }
.md h1 { font-size: 20px; } .md h2 { font-size: 18px; } .md h3, .md h4 { font-size: 15.5px; }
.md p { margin: .6em 0; }
.md ul, .md ol { padding-left: 1.2em; margin: .6em 0; }
.md li { margin: .25em 0; }
.md strong { color: var(--ink); font-weight: 600; }
.md code { font: 400 12.5px var(--f-m); background: var(--panel3); border-radius: 5px; padding: 1px 5px; }
.md pre { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md table { border-collapse: collapse; font-size: 12.5px; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 6px 10px 6px 0; text-align: left; font-variant-numeric: tabular-nums; }
.md th { color: var(--ink3); font-weight: 500; }
.md a { color: var(--warm); text-decoration: none; border-bottom: 1px solid rgba(255, 231, 189, .3); }
.md a.ref { color: inherit; border-bottom-color: rgba(255, 255, 255, .25); }
.md a:hover { border-bottom-color: currentColor; }
.md blockquote { margin: .8em 0; padding-left: 14px; border-left: 2px solid var(--line2); color: var(--ink2); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.more { margin-top: 8px; font-size: 13px; color: var(--warm); }
.skel { margin-top: 22px; display: grid; gap: 9px; }
.skel i { height: 11px; border-radius: 6px; background: linear-gradient(90deg, var(--panel2), var(--panel3), var(--panel2)); background-size: 200% 100%; animation: sh 1.2s linear infinite; }
.skel i:nth-child(2) { width: 82%; } .skel i:nth-child(3) { width: 64%; }
@keyframes sh { to { background-position: -200% 0; } }

/* home */
.home h2 { margin: 0; font: 750 34px/1.02 var(--f-d); letter-spacing: -.025em; }
.home p.lead { margin: 12px 0 0; color: var(--ink2); font-size: 15px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font: 400 11.5px var(--f-m); color: var(--ink3); }
.stats b { color: var(--ink); font-weight: 500; }
.hubs { display: grid; gap: 2px; margin-top: 8px; }
.hubrow { display: grid; grid-template-columns: 12px 1fr auto; gap: 2px 12px; align-items: baseline; width: 100%; text-align: left; padding: 11px 10px; border-radius: 10px; }
.hubrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); align-self: center; }
.hubrow b { font: 650 15px var(--f-d); }
.hubrow em { font: 400 11px var(--f-m); font-style: normal; color: var(--ink3); }
.hubrow span { grid-column: 2 / 4; font-size: 12.5px; color: var(--ink3); line-height: 1.4; }
.hubrow:hover { background: var(--panel2); }

/* chat */
.msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 12px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.intro h2 { margin: 0; font: 750 28px/1.05 var(--f-d); letter-spacing: -.02em; }
.intro p { margin: 10px 0 0; color: var(--ink2); }
.sugg { display: grid; gap: 6px; margin-top: 18px; }
.sugg button { text-align: left; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); color: var(--ink2); font-size: 13.5px; transition: border-color .2s, color .2s; }
.sugg button:hover { color: var(--ink); border-color: var(--line2); }
.msg.user { align-self: flex-end; max-width: 86%; background: var(--panel3); border: 1px solid var(--line); padding: 10px 14px; border-radius: 14px 14px 4px 14px; font-size: 14px; white-space: pre-wrap; }
.msg.bot { max-width: 100%; }
.msg.bot .md { margin-top: 0; }
.status { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.status span { font: 400 11px var(--f-m); color: var(--ink3); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; animation: fadein .3s; }
@keyframes fadein { from { opacity: 0; transform: translateY(3px); } }
.thinking { display: inline-flex; gap: 5px; align-items: center; color: var(--ink3); font-size: 13px; }
.thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--warm); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .2s; } .thinking i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
a.cite { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; margin: 0 1px; border-radius: 5px; background: rgba(255, 231, 189, .12); color: var(--warm) !important; border: 0 !important; font: 500 10.5px var(--f-m); vertical-align: 2px; text-decoration: none; }
a.cite:hover { background: rgba(255, 231, 189, .25); }
.sources { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sources b { font: 500 10.5px var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.sources ol { margin: 8px 0 0; padding-left: 20px; font-size: 13px; color: var(--ink3); }
.sources li { margin: 3px 0; }
.sources a { color: var(--ink2); text-decoration: none; }
.sources a:hover { color: var(--ink); }
.err { margin-top: 8px; color: #ff9a8a; font-size: 13px; }
.ask { position: relative; display: flex; align-items: flex-end; gap: 8px; margin: 0 16px 16px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); flex: none; }
.ask:focus-within { border-color: rgba(255, 231, 189, .35); }
.ask textarea { flex: 1; resize: none; background: none; border: 0; color: var(--ink); font: 400 15px/1.45 var(--f-t); padding: 7px 0; max-height: 150px; min-height: 22px; }
.ask textarea:focus { outline: none; }
.ask__send { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--warm); color: #17120a; }
.ask__send svg { width: 18px; height: 18px; }
.ask__stop { background: var(--panel3); color: var(--ink); }

.nogl { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); color: var(--ink2); font-size: 14px; max-width: 320px; text-align: center; }

/* ---------- today button */
.tbtn--today { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.tbtn--today i { width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff, 0 0 18px rgba(255, 255, 255, .6); animation: live 2.4s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }

/* ---------- toasts (live CRM events) */
.toasts { position: absolute; z-index: 7; left: 50%; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 12px; align-items: center; text-align: left; width: 100%;
  padding: 11px 14px; border-radius: 12px; background: rgba(12, 15, 23, .96); border: 1px solid var(--line2); box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  animation: toastIn .45s cubic-bezier(.2, .9, .2, 1);
}
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.toast b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast em { font: 400 10.5px var(--f-m); font-style: normal; color: var(--ink3); }
.toast span { grid-column: 2 / 4; font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: opacity .4s, transform .4s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }

/* ---------- timeline */
.tl {
  position: absolute; z-index: 6; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: min(640px, calc(100% - 24px)); display: grid; grid-template-columns: 44px 1fr 34px; gap: 14px; align-items: center;
  padding: 12px 12px 12px 14px; border-radius: 16px; background: rgba(9, 12, 19, .92); border: 1px solid var(--line2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.app.withpanel .tl { left: calc((100% - var(--panel-w) - 32px) / 2); width: min(640px, calc(100% - var(--panel-w) - 72px)); }
.tl__play { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--warm); color: #17120a; }
.tl__play svg { width: 18px; height: 18px; }
.tl__mid { min-width: 0; }
.tl__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tl__row b { font: 700 22px/1 var(--f-d); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.tl__row span { font: 400 11.5px var(--f-m); color: var(--ink3); white-space: nowrap; }
.tl__range { width: 100%; margin: 10px 0 6px; accent-color: var(--warm); height: 18px; }
.tl__tick { font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 17px; }
.tl__tick i { font-style: normal; color: var(--ink3); margin-right: 6px; font: 400 10.5px var(--f-m); }
.tl__x { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--ink3); }
.tl__x:hover { color: var(--ink); background: var(--panel3); }
.tl__x svg { width: 16px; height: 16px; }
.app.timeline .rail, .app.timeline .hint { opacity: 0; pointer-events: none; }

/* ---------- today dashboard */
.today h2 { margin: 12px 0 0; font: 750 32px/1.02 var(--f-d); letter-spacing: -.025em; }
.today .lead { margin: 10px 0 0; color: var(--ink2); font-size: 14.5px; }
.tcount { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.tcount button { text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); transition: border-color .2s; }
.tcount button:hover { border-color: var(--line2); }
.tcount b { display: block; font: 700 26px/1 var(--f-d); color: var(--c); font-variant-numeric: tabular-nums; }
.tcount span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink2); }
.trow { display: grid; grid-template-columns: 10px 1fr auto; gap: 3px 10px; align-items: baseline; width: 100%; text-align: left; padding: 10px; border-radius: 10px; }
.trow i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); align-self: center; }
.trow b { font-weight: 550; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow em { font: 400 11px var(--f-m); font-style: normal; color: var(--ink3); white-space: nowrap; }
.trow em.late { color: #ff9a8a; }
.trow span { grid-column: 2 / 4; font-size: 12.5px; color: var(--ink2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trow:hover { background: var(--panel2); }
.tsum { margin-top: 18px; padding: 14px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); display: grid; gap: 10px; }
.tsum .row { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink2); }
.tsum .row b { color: var(--ink); font-weight: 600; }
.tsum .btn { justify-self: start; min-height: 34px; font-size: 13px; }
.muted { color: var(--ink3); font-size: 13px; }

/* ---------- chat extras */
.panel__ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--ink3); margin-bottom: 6px; }
.panel__ic:hover { color: var(--ink); background: var(--panel3); }
.panel__ic[aria-pressed="true"] { color: var(--warm); }
.panel__ic svg { width: 18px; height: 18px; }
.panel__tabs .panel__ic:first-of-type { margin-left: auto; }
.panel__tabs .panel__ic:first-of-type ~ .panel__x { margin-left: 0; }
.ask__mic { flex: none; width: 36px; height: 36px; margin-left: -6px; border-radius: 10px; display: grid; place-items: center; color: var(--ink2); }
.ask__mic:hover { color: var(--ink); background: var(--panel3); }
.ask__mic svg { width: 19px; height: 19px; }
.ask__mic.rec { color: #fff; background: #e5484d; animation: rec 1.2s ease-in-out infinite; }
@keyframes rec { 50% { box-shadow: 0 0 0 6px rgba(229, 72, 77, .25); } }
.ask__mic.busy { opacity: .5; pointer-events: none; }
.histmark { align-self: center; font: 400 10.5px var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }

/* ---------- CRM actions + drafts */
.livebar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.livebar .btn { min-height: 36px; padding: 0 13px; font-size: 13px; text-decoration: none; }
.actrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--ink3); }
.actrow > span { margin-right: 2px; }
.chip2 { height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--ink2); font-size: 12.5px; }
.chip2:hover { color: var(--ink); border-color: rgba(255, 255, 255, .25); }
.okmsg { margin: 0; color: #6bf0a0; font-size: 13px; }
.errmsg { margin: 6px 0 0; color: #ff9a8a; font-size: 13px; }
.sentf { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); display: grid; gap: 10px; }
.sentf__ch { display: flex; flex-wrap: wrap; gap: 6px; }
.sentf__ch label { cursor: pointer; }
.sentf__ch input { position: absolute; opacity: 0; pointer-events: none; }
.sentf__ch span { display: inline-block; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line2); font-size: 12.5px; color: var(--ink2); }
.sentf__ch input:checked + span { color: #17120a; background: var(--warm); border-color: transparent; }
.sentf textarea { width: 100%; resize: vertical; min-height: 84px; background: var(--bg); color: var(--ink); border: 1px solid var(--line2); border-radius: 9px; padding: 9px 10px; font: 400 15px/1.45 var(--f-t); }
.sentf__a { display: flex; gap: 8px; }
.sentf__a .btn { min-height: 36px; font-size: 13px; }
.actdone { margin-top: 10px; }
.drafts { display: grid; gap: 10px; margin-bottom: 12px; }
.draftc { border: 1px solid rgba(255, 231, 189, .28); background: rgba(255, 231, 189, .04); border-radius: 14px; padding: 12px; }
.draftc__to { font: 500 12px var(--f-m); color: var(--ink2); overflow-wrap: anywhere; }
.draftc__to b { color: var(--warm); font-weight: 500; }
.draftc__subj { margin-top: 6px; font-size: 13px; color: var(--ink2); }
.draftc__text { margin: 10px 0 0; white-space: pre-wrap; font: 400 14.5px/1.5 var(--f-t); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; overflow-wrap: anywhere; }
.draftc__chk { margin-top: 8px; display: grid; gap: 4px; }
.draftc__chk p { margin: 0; font-size: 12px; line-height: 1.45; }
.draftc__chk .bad { color: #ff9a8a; } .draftc__chk .warn { color: #ffc94a; } .draftc__chk .ok { color: var(--ink3); }
.draftc__act { display: flex; gap: 8px; margin-top: 10px; }
.draftc__act .btn { min-height: 36px; font-size: 13px; }

/* ---------- offline, US time, money, health */
.offline { position: absolute; z-index: 7; left: 50%; transform: translateX(-50%); top: calc(64px + env(safe-area-inset-top, 0px)); padding: 6px 12px; border-radius: 999px; background: #3a2a0c; color: #ffd98a; font: 500 12px var(--f-m); border: 1px solid rgba(255, 201, 74, .35); }
.clock { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); display: grid; gap: 6px; }
.clock .row1 { display: flex; flex-wrap: wrap; gap: 4px 16px; font: 500 13px var(--f-m); color: var(--ink2); }
.clock .row1 b { color: var(--ink); font-weight: 500; }
.clock .win { font-size: 13.5px; }
.clock .win.open { color: #6bf0a0; } .clock .win.closed { color: #ffc94a; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; border: 1px solid var(--line2); }
.seg button { padding: 4px 9px; border-radius: 7px; font-size: 12px; color: var(--ink3); }
.seg button[aria-pressed="true"] { background: var(--panel3); color: var(--ink); }
.pushbox { margin-top: 22px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line2); font-size: 13px; color: var(--ink2); display: grid; gap: 8px; }
.pushbox .btn { justify-self: start; min-height: 34px; font-size: 13px; }
.money h2, .health h2 { margin: 12px 0 0; font: 750 32px/1.02 var(--f-d); letter-spacing: -.025em; }
.money .lead, .health .lead { margin: 10px 0 0; color: var(--ink2); font-size: 14px; }
.big { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.big div { padding: 12px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.big b { display: block; font: 700 24px/1.05 var(--f-d); font-variant-numeric: tabular-nums; }
.big span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ink2); }
.chart { margin-top: 10px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink3); font: 400 10px var(--f-m); }
.chart .val { fill: var(--ink2); font: 500 10.5px var(--f-m); }
.bars { display: grid; gap: 8px; margin-top: 10px; }
.bar { display: grid; grid-template-columns: 112px 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; color: var(--ink2); }
.bar i { display: block; height: 8px; border-radius: 4px; background: var(--c, #6aa8ff); min-width: 2px; }
.bar em { font: 400 11px var(--f-m); font-style: normal; color: var(--ink3); white-space: nowrap; }
.tbl { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12.5px; }
.tbl th { text-align: left; font: 500 10.5px var(--f-m); letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); padding: 6px 6px 6px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line); color: var(--ink2); font-variant-numeric: tabular-nums; }
.tbl td:first-child { color: var(--ink); }
.tbl td.r, .tbl th.r { text-align: right; }
.hi { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.hi b { font-size: 13.5px; font-weight: 550; }
.hi p { margin: 0; font-size: 12.5px; color: var(--ink2); white-space: pre-line; overflow-wrap: anywhere; }
.hi .hiact { display: flex; gap: 6px; flex-wrap: wrap; }
.hi .tag { font: 500 10px var(--f-m); letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); }
.hi.approved b::after { content: " · sutvarkysiu naktį"; color: #6bf0a0; font-weight: 400; font-size: 12px; }
.homelinks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.homelinks .btn { min-height: 34px; font-size: 13px; }

/* ---------- laptop with panel: keep space for it */
@media (min-width: 901px) {
  .app.withpanel .hint { left: calc((100% - var(--panel-w) - 32px) / 2); }
}

/* ---------- phone */
@media (max-width: 900px) {
  :root { --panel-w: 100%; }
  .top { padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px; gap: 8px; flex-wrap: wrap; }
  .brand__m { display: none !important; }
  .brand svg { width: 26px; height: 26px; }
  .brand__t { font-size: 17px; }
  .tools { margin-left: auto; }
  .tools #bPanel, .tools #bHome, .tools #bMoney { display: none; }
  .tl { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); grid-template-columns: 40px 1fr 30px; gap: 10px; padding: 10px; }
  .tl__play { width: 40px; height: 40px; }
  .tl__row b { font-size: 19px; }
  .toasts { top: calc(118px + env(safe-area-inset-top, 0px)); }
  .tbtn { height: 34px; padding: 0 11px; font-size: 12.5px; }
  .search { order: 3; flex: 1 1 100%; height: 42px; }
  .search kbd { display: none; }
  .rail { display: none; }
  .hint { bottom: auto; top: calc(142px + env(safe-area-inset-top, 0px)); font-size: 11px; white-space: normal; text-align: center; width: calc(100% - 40px); }
  .panel {
    left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 86svh; border-radius: 20px 20px 0 0;
    border-bottom: 0; transform: translateY(calc(100% - var(--peek, 64px) - env(safe-area-inset-bottom, 0px)));
    transition: transform .42s cubic-bezier(.2, .8, .2, 1);
  }
  .panel.half { transform: translateY(46%); }
  .panel.full { transform: translateY(0); }
  .panel.off { transform: translateY(calc(100% - var(--peek, 64px) - env(safe-area-inset-bottom, 0px))); opacity: 1; pointer-events: auto; }
  .panel__grab { display: block; padding: 8px 0 2px; touch-action: none; cursor: grab; }
  .panel__grab i { display: block; width: 38px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .22); margin: 0 auto; }
  .panel__tabs { padding-top: 0; touch-action: none; }
  .panel__x { display: none; }
  .view { padding: 18px 18px calc(28px + env(safe-area-inset-bottom, 0px)); }
  .ntitle { font-size: 26px; }
  .home h2 { font-size: 30px; }
  .ask { margin: 0 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .ask textarea { font-size: 16px; }
  .msgs { padding: 18px 18px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate__glow { animation: none; }
  .panel { transition: none; }
}
