/* AINET Crew — a dark, quiet workspace modelled on the Grok Bot desktop app: a dock of faces and chats on
   the left, the conversation in the middle, the agent's details on the right. */
:root {
  --bg: #0d0d0e; --dock: #0d0d0e; --panel: #151517; --bubble: #1f1f22; --bubble-me: #2b2b2f; --hover: #1a1a1d; --active: #232327;
  --line: rgba(255, 255, 255, 0.07); --line-2: rgba(255, 255, 255, 0.12);
  --text: #ececee; --dim: #a1a1aa; --dimmer: #6e6e76; --blue: #2f7cf6; --green: #22c55e; --amber: #f59e0b; --red: #ef4444;
  --font: "Inter", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", "Zain", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --dock-w: 300px; --insp-w: 340px; --radius: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }
[hidden] { display: none !important; }

#app { display: grid; grid-template-columns: var(--dock-w) minmax(0, 1fr) var(--insp-w); height: 100%; }
#app.insp-off { grid-template-columns: var(--dock-w) minmax(0, 1fr) 0; }
#app.insp-off #inspector { display: none; }
#app.rail { --dock-w: 68px; }

.ibtn { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ibtn:hover { background: var(--hover); color: var(--text); }
.ibtn svg { width: 17px; height: 17px; }

/* ---- avatars ---- */
.av { position: relative; display: inline-block; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: color-mix(in srgb, var(--c) 35%, #111); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.gen { overflow: visible; background: transparent; }
.av.gen svg { width: 100%; height: 100%; }
.dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--dock); background: var(--green); }
.dot.busy { background: var(--amber); animation: pulse 1s ease-in-out infinite; }
.dot.mail { background: var(--blue); }
@keyframes pulse { 50% { transform: scale(1.3); } }

/* ---- dock ---- */
#dock { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--dock); }
.dock-top { display: flex; align-items: center; gap: 4px; padding: 12px 10px 6px 14px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; letter-spacing: .01em; min-width: 0; }
.brand-mark { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(135deg, #c21e3a, #7c1d2c); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp { flex: 1; }
.search { margin: 4px 12px 6px; display: flex; align-items: center; gap: 8px; background: var(--hover); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; }
.pinned { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px 10px 8px; }
.pin { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 0; border-radius: 14px; background: transparent; min-width: 0; }
.pin:hover { background: var(--hover); } .pin.on { background: var(--active); }
.pin-name { font-size: 11.5px; color: var(--dim); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin.on .pin-name { color: var(--text); }
.dock-sep { height: 1px; background: var(--line); margin: 2px 14px 6px; }
#chats { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.row { width: 100%; display: flex; align-items: center; gap: 11px; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; }
.row:hover { background: var(--hover); } .row.on { background: var(--active); }
.row-main { min-width: 0; flex: 1; }
.row-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-title span { overflow: hidden; text-overflow: ellipsis; }
.row-prev { color: var(--dimmer); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread { min-width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex-shrink: 0; }
.group-av { position: relative; display: inline-block; width: 40px; height: 40px; flex-shrink: 0; }
.group-av .av { position: absolute; border: 2px solid var(--dock); }
.group-av .av:nth-child(1) { left: 0; top: 0; } .group-av .av:nth-child(2) { right: 0; top: 6px; } .group-av .av:nth-child(3) { left: 7px; bottom: 0; }
.dock-foot { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px 14px; border-top: 1px solid var(--line); }
.me-name { flex: 1; min-width: 0; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* rail (collapsed dock) */
#app.rail .brand-name, #app.rail .sp, #app.rail .search, #app.rail .pin-name, #app.rail .row-main, #app.rail .me-name, #app.rail .dock-sep { display: none; }
#app.rail .dock-top { flex-direction: column; padding: 12px 0 6px; gap: 6px; }
#app.rail .pinned { grid-template-columns: 1fr; padding: 4px 6px; gap: 2px; }
#app.rail .pin { padding: 6px 0; }
#app.rail #chats { padding: 0 6px; }
#app.rail .row { justify-content: center; padding: 6px 0; }
#app.rail .dock-foot { flex-direction: column; padding: 10px 0; gap: 6px; }

/* ---- stage ---- */
#stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stage-head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 10px 12px; pointer-events: none; background: linear-gradient(var(--bg) 40%, transparent); }
.stage-head > * { pointer-events: auto; }
.head-pill { display: inline-flex; align-items: center; gap: 8px; max-width: min(520px, 70%); padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(21,21,23,.9); backdrop-filter: blur(10px); font-weight: 600; font-size: 13px; }
.head-pill span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-pill:hover { border-color: var(--line-2); }
.head-left, .head-right { position: absolute; top: 10px; display: flex; gap: 4px; align-items: center; }
.head-left { left: 10px; } .head-right { right: 10px; }
.live { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(34,197,94,.4); background: rgba(34,197,94,.1); color: #4ade80; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.4s infinite; }
.live.off { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.1); color: #fbbf24; }
.banner { margin: 56px auto 0; width: min(760px, calc(100% - 32px)); padding: 10px 14px; border: 1px solid var(--line-2); background: var(--panel); border-radius: 12px; display: flex; gap: 10px; align-items: center; color: var(--dim); font-size: 13px; }
.banner input { flex: 1; min-width: 0; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg); }
.banner button { padding: 7px 12px; border: 0; border-radius: 8px; background: var(--text); color: var(--bg); font-weight: 700; }

#stream { flex: 1; overflow-y: auto; padding: 64px 20px 12px; }
#stream > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.day { text-align: center; color: var(--dimmer); font-size: 11.5px; margin: 18px auto 10px; }
.m { display: flex; gap: 10px; margin: 3px auto; position: relative; }
.m.me { justify-content: flex-end; }
.m.first { margin-top: 14px; }
.m .av { margin-top: 2px; }
.m .av-gap { width: 30px; flex-shrink: 0; }
.col { min-width: 0; max-width: 78%; display: flex; flex-direction: column; align-items: flex-start; }
.m.me .col { align-items: flex-end; }
.who { font-size: 12px; font-weight: 700; margin: 0 0 3px 4px; }
.who small { color: var(--dimmer); font-weight: 500; }
.bub { background: var(--bubble); border-radius: var(--radius); padding: 9px 14px; font-size: 14.5px; line-height: 1.55; word-break: break-word; unicode-bidi: plaintext; position: relative; }
.m.me .bub { background: var(--bubble-me); }
.bub p { margin: 0 0 7px; } .bub p:last-child { margin-bottom: 0; }
.bub ul, .bub ol { margin: 4px 0 6px; padding-inline-start: 20px; }
.bub a { color: #7cb3ff; }
.bub code { font-family: var(--mono); font-size: .88em; background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 5px; }
.bub .codeblock { background: #0a0a0b; border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; overflow: hidden; direction: ltr; }
.bub .codebar { display: flex; justify-content: space-between; align-items: center; padding: 5px 10px; background: #141416; color: var(--dim); font: 500 11.5px var(--mono); }
.bub .codebar-actions { display: flex; gap: 6px; }
.bub .copy-btn { border: 1px solid var(--line-2); background: transparent; color: var(--dim); border-radius: 6px; padding: 1px 8px; font-size: 11px; }
.bub .canvas-btn { display: none; }
.bub pre { margin: 0; padding: 10px 12px; overflow-x: auto; } .bub pre code { background: none; padding: 0; font-size: 12.5px; }
.bub table { border-collapse: collapse; margin: 6px 0; font-size: 13px; } .bub td, .bub th { border: 1px solid var(--line-2); padding: 4px 8px; }
.m.err .bub { color: #fca5a5; background: rgba(239,68,68,.08); }
.cursor::after { content: "▍"; color: var(--dim); animation: blink 1s steps(2) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }
.handoff { text-align: center; font-size: 11.5px; color: var(--dimmer); margin: 10px auto 2px; }
.reacts { position: absolute; right: -6px; bottom: -10px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; padding: 0 6px; line-height: 20px; }
.m.me .reacts { right: auto; left: -6px; }
.reply-ref { font-size: 12px; color: var(--dimmer); border-left: 2px solid var(--line-2); padding-left: 8px; margin: 0 0 4px 4px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { position: absolute; top: -14px; display: none; gap: 2px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; z-index: 3; }
.m:not(.me) .tools { right: 0; } .m.me .tools { left: 0; }
.m:hover .tools { display: flex; }
.tools button { border: 0; background: transparent; color: var(--dim); border-radius: 7px; width: 26px; height: 24px; font-size: 13px; }
.tools button:hover { background: var(--hover); color: var(--text); }
/* images */
.gallery { display: grid; gap: 4px; margin-top: 4px; border-radius: 14px; overflow: hidden; max-width: 420px; }
.gallery.n1 { grid-template-columns: 1fr; } .gallery.n2 { grid-template-columns: 1fr 1fr; } .gallery.n3 { grid-template-columns: 1fr 1fr 1fr; }
.gallery button { position: relative; border: 0; padding: 0; background: #000; aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .more { position: absolute; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
/* inter-agent pills */
.event { display: flex; justify-content: center; margin: 10px auto; }
.event button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--dimmer); font-size: 12px; padding: 4px 8px; border-radius: 999px; }
.event button:hover { background: var(--hover); color: var(--dim); }
.event .stack { display: inline-flex; } .event .stack .av { margin-left: -5px; border: 1.5px solid var(--bg); } .event .stack .av:first-child { margin-left: 0; }
.event-body { max-width: 640px; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; background: var(--panel); }
.event-body .ev { display: flex; gap: 8px; padding: 6px 0; font-size: 13px; color: var(--dim); }
.event-body .ev b { color: var(--text); font-weight: 600; }
/* cards */
.card { margin-top: 6px; background: var(--bubble); border-radius: var(--radius); padding: 12px 14px; min-width: 260px; max-width: 420px; }
.card-title { font-weight: 600; font-size: 13.5px; } .card-sub { color: var(--dimmer); font-size: 12px; margin-top: 1px; }
.opts { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.opt { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; border-radius: 10px; padding: 7px 6px; text-align: left; font-size: 13.5px; }
.opt:hover:not(:disabled) { background: rgba(255,255,255,.05); }
.opt .key { width: 22px; height: 22px; border-radius: 6px; background: rgba(47,124,246,.2); color: #7cb3ff; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; flex-shrink: 0; }
.opt.on .key { background: var(--blue); color: #fff; }
.opt:disabled { cursor: default; opacity: .55; } .opt.on:disabled { opacity: 1; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.btn { border: 0; border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13px; background: var(--text); color: var(--bg); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.line { background: transparent; color: var(--dim); border: 1px solid var(--line-2); } .btn.line:hover { color: var(--text); background: var(--hover); }
.btn.danger { background: transparent; color: #f87171; border: 1px solid rgba(248,113,113,.4); }
.state { color: var(--dimmer); font-size: 12.5px; } .state.ok { color: #4ade80; }
.prop-head { display: flex; align-items: center; gap: 10px; } .prop-head b { display: block; } .prop-head small { color: var(--dimmer); }
.prop-body { color: var(--dim); font-size: 13px; margin: 8px 0 4px; }
/* empty */
.empty { text-align: center; padding: 14vh 20px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty h2 { margin: 12px 0 0; font-size: 22px; font-weight: 700; } .empty p { margin: 0; color: var(--dimmer); max-width: 420px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--dim); border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.chip:hover { background: var(--hover); color: var(--text); }

/* ---- composer ---- */
.status { max-width: 780px; margin: 0 auto; width: calc(100% - 40px); display: flex; align-items: center; gap: 8px; color: var(--dimmer); font-size: 12.5px; min-height: 24px; padding: 0 4px; }
.dots { display: inline-flex; gap: 3px; padding: 4px 7px; background: var(--bubble); border-radius: 999px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--dim); animation: dot 1s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
#composer { padding: 4px 20px calc(14px + env(safe-area-inset-bottom)); }
.cbox { max-width: 780px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 26px; padding: 6px 6px 6px 8px; }
.cbox:focus-within { border-color: rgba(255,255,255,.22); }
.crow { display: flex; align-items: flex-end; gap: 4px; }
#input { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; padding: 7px 4px; max-height: 220px; font-size: 14.5px; line-height: 1.5; }
#input::placeholder { color: var(--dimmer); }
.send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.send svg { width: 16px; height: 16px; }
.send.talking { background: var(--red); color: #fff; }
.attach { display: flex; gap: 6px; padding: 4px 6px 6px; flex-wrap: wrap; }
.attach span { position: relative; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; }
.attach img { width: 100%; height: 100%; object-fit: cover; }
.attach button { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; font-size: 11px; line-height: 1; }
.replying { display: flex; align-items: center; gap: 8px; padding: 4px 10px 6px; color: var(--dimmer); font-size: 12.5px; }
.replying span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-note { text-align: center; color: var(--dimmer); font-size: 13px; padding: 12px; }

/* ---- inspector ---- */
#inspector { border-left: 1px solid var(--line); background: var(--dock); overflow-y: auto; }
.insp-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 18px 12px; gap: 4px; }
.insp-hero .av { margin-bottom: 10px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 30%, transparent); }
.insp-name { font-size: 19px; font-weight: 700; }
.insp-badge { color: var(--dim); font-size: 13px; }
.insp-ar { color: var(--dimmer); font-size: 14px; font-family: "Zain", var(--font); }
.insp-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.tabs { display: flex; gap: 4px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; color: var(--dimmer); border-radius: 8px; padding: 6px 12px; font-weight: 600; font-size: 13px; }
.tab.on { background: var(--active); color: var(--text); }
.sec { padding: 6px 16px 16px; }
.sec h4 { margin: 16px 0 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dimmer); font-weight: 700; }
.about { color: var(--dim); font-size: 13.5px; line-height: 1.55; }
.skills { display: flex; flex-wrap: wrap; gap: 6px; }
.skills span { border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--dim); }
.field { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); }
.routine { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.routine-main { flex: 1; min-width: 0; } .routine-name { font-weight: 600; font-size: 13.5px; } .routine-when { color: var(--dimmer); font-size: 12px; }
.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #3a3a40; transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--green); } .switch input:checked + span::after { transform: translateX(16px); }
.note { color: var(--dimmer); font-size: 12px; line-height: 1.5; margin-top: 8px; }
.lib-group { margin-top: 12px; }
.lib-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; text-decoration: none; color: var(--text); background: transparent; border: 0; width: 100%; text-align: left; }
.lib-item:hover { background: var(--hover); }
.lib-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--active); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; font-size: 15px; }
.lib-icon img { width: 100%; height: 100%; object-fit: cover; }
.lib-text { min-width: 0; } .lib-text b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .lib-text small { color: var(--dimmer); font-size: 11.5px; }
.member { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.member-main { flex: 1; min-width: 0; } .member-main b { font-size: 13.5px; } .member-main small { display: block; color: var(--dimmer); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead { font-size: 10px; font-weight: 700; color: var(--dim); background: var(--active); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.invite { display: flex; gap: 6px; } .invite input { flex: 1; min-width: 0; }
.x { border: 0; background: transparent; color: var(--dimmer); width: 26px; height: 26px; border-radius: 8px; } .x:hover { background: var(--hover); color: #f87171; }

/* ---- popovers, dialogs, toast ---- */
.menu { position: fixed; z-index: 60; min-width: 200px; background: #1b1b1e; border: 1px solid var(--line-2); border-radius: 12px; padding: 5px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; text-align: left; font-size: 13.5px; }
.menu button:hover, .menu button.sel { background: var(--active); }
.menu small { color: var(--dimmer); }
.dlg { border: 1px solid var(--line-2); background: #141416; color: var(--text); border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.dlg::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.dlg form { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 34px); overflow-y: auto; }
.dlg-head { display: flex; gap: 14px; align-items: center; } .dlg-head h3 { margin: 0; font-size: 18px; } .dlg-head p { margin: 2px 0 0; color: var(--dimmer); font-size: 13px; }
.fld { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--dim); }
.fld input, .fld textarea, .fld select { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); font-weight: 400; font-size: 13.5px; outline: 0; }
.fld textarea { resize: vertical; line-height: 1.5; }
.fld input:focus, .fld textarea:focus { border-color: rgba(255,255,255,.25); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; } .sw { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; } .sw.on { border-color: #fff; }
.mem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 300px; overflow-y: auto; }
.mem { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; padding: 6px 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); }
.mem.on { border-color: rgba(255,255,255,.35); background: var(--active); } .mem input { display: none; }
.mem small { display: block; color: var(--dimmer); font-weight: 500; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.err { color: #f87171; font-size: 13px; margin: 0; }
.dlg-actions { display: flex; gap: 8px; align-items: center; }
.photo-pick { display: flex; align-items: center; gap: 12px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 90; background: #f4f4f5; color: #111; padding: 9px 16px; border-radius: 12px; font-weight: 600; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: calc(100vw - 32px); text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.gate { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; text-align: center; }
.gate .faces { display: flex; justify-content: center; margin-bottom: 16px; } .gate .faces .av { margin-left: -10px; border: 3px solid var(--bg); } .gate .faces .av:first-child { margin-left: 0; }
.gate h1 { margin: 0 0 6px; font-size: 26px; } .gate p { margin: 0 0 18px; color: var(--dimmer); }
.gate a, .gate button { display: inline-block; padding: 10px 22px; border-radius: 999px; background: var(--text); color: var(--bg); text-decoration: none; font-weight: 700; border: 0; }

/* ---- responsive ---- */
.only-m { display: none !important; }
@media (max-width: 1180px) { #app { grid-template-columns: var(--dock-w) minmax(0, 1fr); } #inspector { display: none; } #app.insp-sheet #inspector { display: block; position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 92vw); z-index: 40; box-shadow: -20px 0 60px rgba(0,0,0,.6); } }
@media (max-width: 760px) {
  #app, #app.rail { grid-template-columns: minmax(0, 1fr); --dock-w: 100%; }
  #app.v-chat #dock { display: none; } #app.v-list #stage { display: none; }
  .only-m { display: inline-flex !important; } .only-d { display: none !important; }
  #stream { padding: 60px 12px 10px; } #composer { padding: 4px 10px calc(10px + env(safe-area-inset-bottom)); }
  .col { max-width: 88%; } .pinned { grid-template-columns: repeat(4, 1fr); }
  #app.insp-sheet #inspector { width: 100vw; }
}

/* ======================================================================
   Grok Bot fidelity pass: sizes, surfaces and spacing measured against
   the reference screenshots. Later rules win over the base above.
   ====================================================================== */
:root { --bg: #0b0b0c; --dock: #0b0b0c; --panel: #161618; --bubble: #1d1d20; --bubble-me: #2a2a2d; --hover: #17171a; --active: #1f1f22; --dock-w: 264px; --insp-w: 330px; --radius: 20px; }
#dock { border-right: 0; }
#inspector { border-left: 1px solid rgba(255,255,255,.05); }

/* top of the dock: just the mark, search and new (round, filled) */
.dock-top { padding: 14px 12px 8px 14px; }
.brand-name { display: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; font-size: 15px; }
.dock-top .ibtn { width: 36px; height: 36px; border-radius: 50%; background: #1c1c1f; color: #d4d4d8; }
.dock-top .ibtn:hover { background: #26262a; }
.search { border-radius: 999px; background: #161618; border-color: transparent; padding: 8px 14px; }

/* pinned faces: big, centred, one-line labels */
.pinned { gap: 2px; padding: 4px 10px 10px; }
.pin { padding: 10px 2px 9px; gap: 7px; border-radius: 16px; }
.pin .av { width: 58px !important; height: 58px !important; }
.pin-name { font-size: 12.5px; color: #b8b8bf; font-weight: 500; }
.pin.on { background: #1c1c1f; }
.dot { width: 12px; height: 12px; border-color: var(--dock); right: 0; bottom: 0; }
.dock-sep { display: none; }

/* chat rows */
#chats { padding: 0 8px 8px; }
.row { gap: 12px; padding: 8px 10px; border-radius: 14px; }
.row > span:first-child .av, .row .group-av { width: 36px !important; height: 36px !important; }
.row-title { font-size: 14px; font-weight: 600; color: #f4f4f5; }
.row-prev { font-size: 13px; color: #85858c; margin-top: 1px; }
.row.on { background: #1c1c1f; }
.unread { width: 8px; height: 8px; background: #3b82f6; }

/* bottom: you */
.dock-foot { border-top: 0; padding: 12px 12px 14px 16px; }
.me-name { font-size: 14px; }
.dock-foot .ibtn { width: 34px; height: 34px; border-radius: 10px; background: #1c1c1f; }

/* conversation */
.stage-head { padding: 12px; background: linear-gradient(var(--bg) 55%, transparent); }
.head-pill { background: #1c1c1f; border: 0; padding: 4px 14px 4px 4px; font-size: 14px; gap: 9px; }
.head-pill .av { width: 26px !important; height: 26px !important; }
#stream { padding: 70px 24px 16px; }
#stream > * { max-width: 800px; }
.m { margin: 4px auto; }
.m.first { margin-top: 16px; }
.col { max-width: 74%; }
.bub { padding: 10px 15px; font-size: 15px; line-height: 1.5; border-radius: 20px; color: #ececee; }
.m.me .bub { border-radius: 20px; }
.who { font-size: 12.5px; margin-left: 6px; }
.day { font-size: 12px; color: #6f6f76; margin: 22px auto 12px; }
.event { margin: 12px auto; }
.event button { font-size: 12.5px; color: #8b8b92; gap: 7px; }
.event .lbl b { color: #b9b9c0; font-weight: 500; }
.card { background: #1d1d20; border-radius: 22px; padding: 14px 16px; }
.card-title { font-size: 14.5px; color: #c7c7cd; }
.opt { padding: 9px 6px; font-size: 14.5px; }
.opt .key { width: 24px; height: 24px; border-radius: 7px; background: #2563eb; color: #fff; }
.gallery { border-radius: 16px; gap: 6px; max-width: 560px; }
.gallery button { border-radius: 14px; overflow: hidden; }
.reacts { top: -12px; bottom: auto; right: -8px; border: 0; background: #2a2a2d; border-radius: 999px; padding: 1px 6px; font-size: 13px; }
.tools { top: -16px; border-radius: 12px; background: #1c1c1f; border-color: rgba(255,255,255,.08); }
.empty { padding-top: 16vh; }
.empty > .av { width: 104px !important; height: 104px !important; }
.empty > .group-av { width: 112px !important; height: 112px !important; margin-bottom: 4px; }
.empty > .group-av .av { width: 62px !important; height: 62px !important; border-width: 3px; border-color: var(--bg); }
.empty h2 { font-size: 24px; letter-spacing: -0.01em; }
.chip { border-color: rgba(255,255,255,.1); background: #161618; }

/* composer: one rounded bar, + on the left, mic + voice/send on the right */
#composer { padding: 6px 24px calc(16px + env(safe-area-inset-bottom)); }
.cbox { background: #1c1c1f; border: 0; border-radius: 28px; padding: 6px 6px 6px 6px; max-width: 800px; }
.cbox:focus-within { box-shadow: 0 0 0 1px rgba(255,255,255,.12); border: 0; }
#btn-attach { width: 34px; height: 34px; border-radius: 50%; background: #2a2a2d; color: #d4d4d8; }
#input { padding: 7px 8px; font-size: 15px; }
.send { width: 36px; height: 36px; background: #f4f4f5; color: #0b0b0c; }
.send.voice svg { width: 18px; height: 18px; }
.status { max-width: 800px; width: calc(100% - 48px); }

/* inspector */
.insp-hero .av { width: 96px !important; height: 96px !important; }
.tabs { border-bottom-color: rgba(255,255,255,.05); }
.tab.on { background: #1f1f22; }

@media (max-width: 760px) {
  .pinned { grid-template-columns: repeat(4, 1fr); }
  .pin .av { width: 56px !important; height: 56px !important; }
  #stream { padding: 64px 12px 10px; }
  #composer { padding: 4px 10px calc(10px + env(safe-area-inset-bottom)); }
  .col { max-width: 86%; }
}

/* ======================================================================
   Refinement pass: crisper edges, calmer motion, the signature voice button.
   ====================================================================== */
html { text-rendering: optimizeLegibility; }
body { font-feature-settings: "cv11", "ss01", "ss03"; letter-spacing: -0.006em; }
#chats { overflow-x: hidden; }
.row, .pin { transition: background .15s ease; }

/* photos: a hairline edge so faces sit cleanly on the dark background, never shrunk below their slot */
.av:not(.gen)::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); pointer-events: none; }
.av img { image-rendering: auto; }
.pin.on .av:not(.gen)::after { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); }

/* surfaces */
.head-pill { box-shadow: 0 6px 24px rgba(0,0,0,.35); transition: background .15s; }
.head-pill:hover { background: #232327; }
.bub { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.cbox { box-shadow: 0 10px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.05); }
.card { box-shadow: 0 1px 0 rgba(255,255,255,.03) inset; }
.menu, .dlg { backdrop-filter: blur(16px); }

/* new messages ease in (only new ones; history renders still) */
.m.fresh, .event.fresh { animation: rise .28s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .m.fresh, .event.fresh { animation: none; } }



/* face labels: name, then the badge, both kept inside the tile */
.pin { gap: 6px; }
.pin-name { font-size: 13px; font-weight: 600; color: #e4e4e7; line-height: 1.15; margin-top: 2px; }
.pin-tag { font-size: 11.5px; color: #7c7c84; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; margin-top: -3px; }
.pin.on .pin-tag { color: #a1a1aa; }
#app.rail .pin-tag { display: none; }
/* chat rows: both lines end in an ellipsis inside the dock */
.row-main { overflow: hidden; }
.row-prev { display: block; }
.empty-tag { color: #9a9aa2 !important; font-size: 14px; }
.empty-tag span { color: #55555c; margin: 0 4px; }
.event .lbl { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.event .lbl .av { width: 18px !important; height: 18px !important; vertical-align: middle; }

/* ======================================================================
   Calm & premium: one neutral palette, no stray blues, flat surfaces with
   fine hairlines, and a restrained voice button.
   ====================================================================== */
:root { --ink: #ededef; --ink-2: #a8a8b0; --ink-3: #6e6e76; --hair: rgba(255,255,255,.07); --hair-2: rgba(255,255,255,.12); --accent: #ededef; }

/* text & links */
.bub { color: var(--ink); }
.bub a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; }
.bub a:hover { text-decoration-color: rgba(255,255,255,.7); }
.m.me .bub b { color: #fff !important; background: rgba(255,255,255,.08); border-radius: 6px; padding: 0 4px; }

/* dots: quiet whites instead of blue */
.unread { background: #ededef; width: 7px; height: 7px; }
.dot.mail { background: #ededef; box-shadow: 0 0 0 2px var(--dock); }
.dot.busy { background: #f2b44a; }

/* choice card */
.card { background: #161618; border: 1px solid var(--hair); border-radius: 18px; padding: 16px 16px 12px; box-shadow: none; min-width: 300px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.card-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.opts { gap: 4px; margin-top: 12px; }
.opt { padding: 10px 10px; border-radius: 12px; font-size: 14px; color: var(--ink); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.opt:hover:not(:disabled) { background: rgba(255,255,255,.04); border-color: var(--hair); }
.opt .key { width: 24px; height: 24px; border-radius: 8px; background: transparent; border: 1px solid var(--hair-2); color: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.opt.on { background: rgba(255,255,255,.06); border-color: var(--hair-2); }
.opt.on .key { background: var(--ink); border-color: var(--ink); color: #0b0b0c; }
.opt:disabled:not(.on) { opacity: .4; }
.card-actions { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hair); }

/* proposal card */
.prop-head { gap: 12px; }
.prop-head .av { width: 44px !important; height: 44px !important; }
.prop-head b { font-size: 14.5px; color: var(--ink); }
.prop-head small { font-size: 12px; color: var(--ink-3); }
.prop-body { color: var(--ink-2); font-size: 13.5px; line-height: 1.55; margin: 12px 0 2px; }
.state.ok { color: var(--ink-2); } .state.ok::before { content: "✓ "; color: #6ee7a8; }

/* buttons */
.btn { background: var(--ink); color: #0b0b0c; font-weight: 600; padding: 8px 16px; letter-spacing: -0.005em; transition: opacity .15s, background .15s; }
.btn:hover:not(:disabled) { background: #fff; }
.btn.line { border: 1px solid var(--hair-2); color: var(--ink-2); background: transparent; }
.btn.line:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.btn.danger { border-color: rgba(248,113,113,.35); }

/* the voice button: solid, quiet, alive only when listening */
.send.voice { background: var(--ink); color: #0b0b0c; box-shadow: none; animation: none; }
.send.voice:hover { background: #fff; }
.send.talking { background: var(--ink); color: #0b0b0c; animation: none; box-shadow: 0 0 0 4px rgba(237,237,239,.10); }
.send.talking::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(216,255,61,.4); animation: listen 1.8s ease-out infinite; }
.send { position: relative; }
@keyframes listen { from { transform: scale(1); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.send .bars { display: inline-flex; align-items: center; gap: 2px; height: 14px; }
.send .bars i { width: 2.5px; border-radius: 2px; background: currentColor; animation: bar 0.9s ease-in-out infinite; }
.send .bars i:nth-child(1) { height: 6px; animation-delay: -.3s; } .send .bars i:nth-child(2) { height: 12px; animation-delay: -.15s; }
.send .bars i:nth-child(3) { height: 8px; } .send .bars i:nth-child(4) { height: 11px; animation-delay: -.45s; }
@keyframes bar { 50% { transform: scaleY(.45); } }
@media (prefers-reduced-motion: reduce) { .send.talking::before, .send .bars i { animation: none; } }
#btn-attach { background: transparent; border: 1px solid var(--hair-2); color: var(--ink-2); }
#btn-attach:hover { background: rgba(255,255,255,.05); color: var(--ink); }
#btn-mic { color: var(--ink-3); } #btn-mic:hover { color: var(--ink); background: transparent; }

/* small things */
.reacts { background: #222225; box-shadow: 0 0 0 2px var(--bg); }
.chip { background: transparent; border-color: var(--hair-2); color: var(--ink-2); }
.chip:hover { color: var(--ink); background: rgba(255,255,255,.04); }
.event button { color: var(--ink-3); } .event .lbl b { color: var(--ink-2); }

/* ======================================================================
   Identity: the AINET Crew mark (you at the centre of your crew), a thin
   letterspaced wordmark, and a live bar that lights one segment per agent at work.
   ====================================================================== */
.brand { gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: none; display: block; flex-shrink: 0; }
.wordmark { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wordmark b { font-weight: 300; letter-spacing: .3em; font-size: 11.5px; color: var(--ink); white-space: nowrap; }
.wordmark b span { font-weight: 700; }
.pulse { display: flex; gap: 2px; }
.pulse i { width: 13px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.1); transition: background .5s ease; }
.pulse i.on:nth-child(3n+1) { background: #22c3d4; } .pulse i.on:nth-child(3n+2) { background: #8a6dff; } .pulse i.on:nth-child(3n) { background: #ff8a3d; }
#app.rail .wordmark { display: none; }
.gate .mark { width: 72px; height: 72px; margin-bottom: 18px; }
.gate .wm { font-weight: 300; letter-spacing: .3em; font-size: 14px; color: var(--ink-2); margin-bottom: 26px; } .gate .wm span { font-weight: 700; color: var(--ink); }

/* AINETAI brand: the "consider it done" mark. Night Volt in the dark app, Volt as the app icon.
   The sidebar mark is alive: it bobs while agents work and draws its check when they finish. */
:root { --volt: #d8ff3d; }
.brand-mark { position: relative; width: 30px; height: 30px; border-radius: 23.5%; background: #111113; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); display: block; flex-shrink: 0; }
.brand-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.brand-mark .st { fill: none; stroke: var(--volt); stroke-width: 7.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark .hd { fill: var(--volt); }
.brand-mark .arm, .brand-mark .hd { transform-box: view-box; }
.brand-mark .arm { transform-origin: 30px 43px; } .brand-mark .hd { transform-origin: 19.5px 20.5px; }
.brand-mark.work .hd { animation: bm-bob .5s ease-in-out infinite; } .brand-mark.work .arm { animation: bm-pump .5s ease-in-out infinite; }
@keyframes bm-bob { 50% { transform: translateY(-3px); } } @keyframes bm-pump { 50% { transform: rotate(-6deg); } }
.brand-mark.done .body { stroke-dasharray: 15; animation: bm-body 1.4s cubic-bezier(.6,0,.3,1) both; }
.brand-mark.done .arm { stroke-dasharray: 29; animation: bm-arm 1.4s cubic-bezier(.5,0,.2,1) both; }
.brand-mark.done .hd { animation: bm-head 1.4s cubic-bezier(.3,1.8,.5,1) both; }
@keyframes bm-body { 0% { stroke-dashoffset: 15; } 30%, 100% { stroke-dashoffset: 0; } }
@keyframes bm-arm { 0%, 26% { stroke-dashoffset: 29; } 70%, 100% { stroke-dashoffset: 0; } }
@keyframes bm-head { 0%, 66% { transform: scale(0); } 92%, 100% { transform: scale(1); } }
.brand:hover .brand-mark .arm { animation: bm-wave 1.1s ease-in-out infinite; }
@keyframes bm-wave { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.wordmark b span { color: var(--volt); }
.pulse i.on:nth-child(n) { background: var(--volt); }
.gate .wm span { color: var(--volt); }
.gate .mark, .dlg-head img { border-radius: 23.5%; }

/* polish pass: short names, section labels, Volt on the main action, the live mark as the "working" sign */
.head-pill small { font-weight: 500; font-size: 12.5px; color: var(--dimmer); white-space: nowrap; }
.head-pill small::before { content: "·"; margin-right: 8px; color: var(--line-2); }
.dock-label { padding: 14px 20px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--dimmer); }
#app.rail .dock-label { display: none; }
.send, .send.voice, .send.voice:hover, .send.talking { background: var(--volt); color: #0b0b0c; transition: transform .15s ease, filter .15s ease; }
.send:hover { filter: brightness(1.06); transform: scale(1.04); }
.send:active { transform: scale(.94); }
.chip { transition: border-color .15s, color .15s, background .15s; }
.chip:hover { border-color: rgba(216,255,61,.45); color: var(--text); background: rgba(216,255,61,.06); }
#chats { scrollbar-color: transparent transparent; } #chats:hover { scrollbar-color: rgba(255,255,255,.1) transparent; }
#chats::-webkit-scrollbar-thumb { background: transparent; } #chats:hover::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }
.mini-mark { position: relative; display: inline-block; width: 16px; height: 16px; border-radius: 23.5%; background: #111113; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); flex-shrink: 0; vertical-align: middle; }
.mini-mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.mini-mark .st { fill: none; stroke: var(--volt); stroke-width: 7.2; stroke-linecap: round; stroke-linejoin: round; }
.mini-mark .hd { fill: var(--volt); }
.mini-mark .arm, .mini-mark .hd { transform-box: view-box; }
.mini-mark .arm { transform-origin: 30px 43px; } .mini-mark .hd { transform-origin: 19.5px 20.5px; }
.mini-mark.work .hd { animation: bm-bob .5s ease-in-out infinite; } .mini-mark.work .arm { animation: bm-pump .5s ease-in-out infinite; }
.btn:not(.line):not(.ghost):not(.danger) { background: var(--volt); color: #0b0b0c; }
.btn:not(.line):not(.ghost):not(.danger):hover { filter: brightness(1.06); }
/* sender line: name you can read, badge whispered; a finished task gets the mark */
.who { color: var(--text); font-weight: 600; display: flex; align-items: baseline; gap: 7px; }
.who small { font-size: 11.5px; font-weight: 500; color: var(--dimmer); }
.done-bub { display: flex; align-items: flex-start; gap: 9px; box-shadow: inset 0 0 0 1px rgba(216,255,61,.22); }
.done-bub > .mini-mark { width: 18px; height: 18px; margin-top: 2px; }
.mini-mark.done .body { stroke-dasharray: 15; animation: bm-body 1.4s cubic-bezier(.6,0,.3,1) both; }
.mini-mark.done .arm { stroke-dasharray: 29; animation: bm-arm 1.4s cubic-bezier(.5,0,.2,1) both; }
.mini-mark.done .hd { animation: bm-head 1.4s cubic-bezier(.3,1.8,.5,1) both; }
@media (prefers-reduced-motion: reduce) { .mini-mark *, .brand-mark * { animation: none !important; } }
/* profile panel: plain engine names, the detail underneath; selects never spill */
select.field { text-overflow: ellipsis; }
.engine-hint { font-size: 12px; color: var(--dimmer); margin: 6px 2px 0; }
#app:not(.insp-off) .empty-about { display: none; } /* the panel already shows it */

/* ---------------------------------------------------------------- sign-in screen (AINETAI)
   Dark, one accent, a hint of Cairo: the eight-point star lattice drifts slowly at the edges.
   Everything that moves is transform/opacity on its own layer, so the compositor does the work. */
.gate { overflow: hidden; background: #0b0b0c; }
.gate-bg { position: absolute; inset: -56px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2256%22%20height%3D%2256%22%3E%3Cpolygon%20points%3D%2228.0%2C7.3%2034.1%2C13.3%2042.7%2C13.3%2042.7%2C21.9%2048.7%2C28.0%2042.7%2C34.1%2042.7%2C42.7%2034.1%2C42.7%2028.0%2C48.7%2021.9%2C42.7%2013.3%2C42.7%2013.3%2C34.1%207.3%2C28.0%2013.3%2C21.9%2013.3%2C13.3%2021.9%2C13.3%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.7%22/%3E%3Cpolygon%20points%3D%220.0%2C-9.5%202.8%2C-6.7%206.7%2C-6.7%206.7%2C-2.8%209.5%2C0.0%206.7%2C2.8%206.7%2C6.7%202.8%2C6.7%200.0%2C9.5%20-2.8%2C6.7%20-6.7%2C6.7%20-6.7%2C2.8%20-9.5%2C0.0%20-6.7%2C-2.8%20-6.7%2C-6.7%20-2.8%2C-6.7%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.7%22/%3E%3Cpolygon%20points%3D%2256.0%2C-9.5%2058.8%2C-6.7%2062.7%2C-6.7%2062.7%2C-2.8%2065.5%2C0.0%2062.7%2C2.8%2062.7%2C6.7%2058.8%2C6.7%2056.0%2C9.5%2053.2%2C6.7%2049.3%2C6.7%2049.3%2C2.8%2046.5%2C0.0%2049.3%2C-2.8%2049.3%2C-6.7%2053.2%2C-6.7%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.7%22/%3E%3Cpolygon%20points%3D%220.0%2C46.5%202.8%2C49.3%206.7%2C49.3%206.7%2C53.2%209.5%2C56.0%206.7%2C58.8%206.7%2C62.7%202.8%2C62.7%200.0%2C65.5%20-2.8%2C62.7%20-6.7%2C62.7%20-6.7%2C58.8%20-9.5%2C56.0%20-6.7%2C53.2%20-6.7%2C49.3%20-2.8%2C49.3%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.7%22/%3E%3Cpolygon%20points%3D%2256.0%2C46.5%2058.8%2C49.3%2062.7%2C49.3%2062.7%2C53.2%2065.5%2C56.0%2062.7%2C58.8%2062.7%2C62.7%2058.8%2C62.7%2056.0%2C65.5%2053.2%2C62.7%2049.3%2C62.7%2049.3%2C58.8%2046.5%2C56.0%2049.3%2C53.2%2049.3%2C49.3%2053.2%2C49.3%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.7%22/%3E%3Cpath%20d%3D%22M28.0%200V7.3M28.0%2056V48.7M0%2028.0H7.3M56%2028.0H48.7%22%20fill%3D%22none%22%20stroke%3D%22%23fff%22%20stroke-width%3D%22.7%22/%3E%3C/svg%3E") 0 0 / 56px 56px; opacity: .09;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, transparent 30%, #000 100%); mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, transparent 30%, #000 100%);
  animation: gate-drift 40s linear infinite; will-change: transform; }
@keyframes gate-drift { to { transform: translate3d(56px, 56px, 0); } }
.gate-glow { position: absolute; left: 50%; top: 32%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(216,255,61,.10), rgba(216,255,61,0) 62%); animation: gate-breathe 6s ease-in-out infinite; will-change: opacity, transform; pointer-events: none; }
@keyframes gate-breathe { 50% { opacity: .45; transform: scale(.92); } }
.gate-in { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 600px; }
.gate-in > * { animation: gate-rise .9s cubic-bezier(.2,.8,.2,1) both; }
.gate-in > :nth-child(2) { animation-delay: .25s; } .gate-in > :nth-child(3) { animation-delay: .35s; } .gate-in > :nth-child(4) { animation-delay: .5s; }
.gate-in > :nth-child(5) { animation-delay: .6s; } .gate-in > :nth-child(6) { animation-delay: .75s; } .gate-in > :nth-child(7), .gate-in > :nth-child(8) { animation-delay: .9s; }
@keyframes gate-rise { from { opacity: 0; transform: translate3d(0, 14px, 0); } }
.gate .gate-mark { width: 76px; height: 76px; margin-bottom: 22px; }
.gate .gate-mark .st { stroke-width: 7.2; }
.gate .wm { margin-bottom: 0; font-size: 15px; color: var(--ink); }
.gate-ar { font-family: Alexandria, var(--font); font-weight: 300; font-size: 17px; color: var(--ink-2); margin-top: 8px; }
.gate h1 { margin: 34px 0 10px; font-size: clamp(28px, 6vw, 40px); font-weight: 700; letter-spacing: -.025em; line-height: 1.08; }
.gate p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; max-width: 340px; }
.gate .faces { margin: 26px 0 26px; }
.gate .faces > span { display: inline-block; margin-left: -10px; animation: gate-face .7s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(.8s + var(--i) * .07s); }
.gate .faces > span:first-child { margin-left: 0; }
.gate .faces .av { border: 3px solid #0b0b0c; margin: 0; }
@keyframes gate-face { from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.8); } }
.gate a, .gate button { background: #ededef; color: #0b0b0c; padding: 13px 28px; font-size: 15px; transition: transform .15s ease; }
.gate a:hover, .gate button:hover { transform: translateY(-1px) scale(1.02); }
.gate small { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .gate-bg, .gate-glow, .gate-in > *, .gate .faces > span { animation: none !important; } }
/* photos: a soft tinted disc that gently pulses while the photo loads, then the photo fades in */
.av:not(.gen) img { opacity: 0; transition: opacity .35s ease; }
.av:not(.gen) img.in { opacity: 1; }
.av:not(.gen):has(img:not(.in)) { animation: av-wait 1.4s ease-in-out infinite; }
@keyframes av-wait { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .av:not(.gen) img { transition: none; } .av:not(.gen) { animation: none !important; } }

/* ---------------------------------------------------------------- team wizard */
.dlg.wiz { width: min(720px, calc(100vw - 24px)); }
.dlg.wiz form { padding: 26px 28px 22px; gap: 0; }
#wz { display: flex; flex-direction: column; gap: 16px; }
.wz-dots { display: flex; gap: 6px; } .wz-dots i { width: 22px; height: 3px; border-radius: 3px; background: var(--line-2); } .wz-dots i.on { background: var(--volt); }
.wz-h { margin: 4px 0 0; font-size: 24px; letter-spacing: -.02em; }
.wz-p { margin: 0; color: var(--dim); font-size: 14px; }
.wz-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wz-size { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; background: #111113; border: 1px solid var(--line); border-radius: 16px; padding: 16px; transition: border-color .15s, transform .15s; }
.wz-size:hover { transform: translateY(-2px); border-color: var(--line-2); }
.wz-size b { font-size: 30px; letter-spacing: -.03em; line-height: 1; } .wz-size span { font-weight: 600; font-size: 14px; } .wz-size small { color: var(--dimmer); font-size: 12px; line-height: 1.4; }
.wz-size.on { border-color: rgba(216,255,61,.55); } .wz-size.on b { color: var(--volt); }
.wz-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.wz-tabs button { border: 1px solid var(--line); background: transparent; color: var(--dim); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; }
.wz-tabs button.on { background: #ededef; color: #0b0b0c; border-color: transparent; }
.wz-tabs em { font-style: normal; font-weight: 500; font-size: 11px; opacity: .65; margin-left: 4px; }
.wz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.wz-hire { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #111113; border: 1px solid var(--line); border-radius: 16px; padding: 14px 8px 12px; transition: border-color .15s, transform .15s; }
.wz-hire:hover { transform: translateY(-2px); }
.wz-hire b { font-size: 13.5px; margin-top: 4px; } .wz-hire small { color: var(--dimmer); font-size: 11px; line-height: 1.3; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wz-hire .av { opacity: .55; transition: opacity .2s; } .wz-hire.on .av { opacity: 1; }
.wz-hire.on { border-color: rgba(216,255,61,.55); }
.wz-tick { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 23.5%; background: #111113; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.5,1); }
.wz-tick svg { width: 100%; height: 100%; } .wz-tick .st { fill: none; stroke: var(--volt); stroke-width: 7.2; stroke-linecap: round; stroke-linejoin: round; } .wz-tick .hd { fill: var(--volt); }
.wz-hire.on .wz-tick { opacity: 1; transform: none; }
.wz-row { display: flex; flex-wrap: wrap; gap: 6px; }
.wz-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #111113; border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 13px; font-weight: 600; }
.wz-chip.on { border-color: rgba(216,255,61,.55); }
.wz-build { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; border: 1px dashed var(--line-2); border-radius: 16px; }
.wz-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 18px 0 6px; }
.wz-done .wz-mark { width: 64px; height: 64px; }
.wz-faces { display: flex; } .wz-faces .av { margin-left: -8px; border: 3px solid #141416; } .wz-faces .av:first-child { margin-left: 0; }
.btn[disabled] { opacity: .4; pointer-events: none; }
@media (max-width: 640px) { .wz-sizes { grid-template-columns: 1fr 1fr; } .wz-h { font-size: 21px; } .dlg.wiz form { padding: 20px 18px 16px; } }
