/* MetaGlobe HQ client board (demo). Same palette as the site. */
:root {
  --bg: #FAF6EE; --bg2: #F2EBDD; --card: #FFFFFF; --ink: #181A2E; --ink2: #4F5167; --line: #E3D9C6;
  --brand: #312E81; --brand2: #4338CA; --gold: #E08A00; --clay: #B4532A; --onbrand: #FFFFFF;
  --floor: #EFE6D4; --tile: #E7DCC6; --room: #FFFDF8; --hall: #E2D4B8; --wall: #CDBC9C;
  --shadow: 0 1px 2px rgba(23,32,28,.06), 0 8px 28px rgba(23,32,28,.08);
  --display: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0B0C1A; --bg2: #13142A; --card: #17182F; --ink: #EEEFF6; --ink2: #B0B2C8; --line: #262842;
  --brand: #8B87FF; --brand2: #A5A2FF; --gold: #FFB547; --clay: #E07B52; --onbrand: #0A0A23;
  --floor: #14152B; --tile: #181930; --room: #1D1F38; --hall: #25273F; --wall: #30334F;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); margin: 0 0 .4em; line-height: 1.15; }
h2 { font-size: 1.45rem; } h3 { font-size: 1.1rem; }
a { color: var(--brand); }
.muted { color: var(--ink2); margin: 0 0 12px; }
.small { font-size: .85rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 18px;
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--brand) 0 28px, var(--gold) 28px 36px, var(--clay) 36px 48px, var(--gold) 48px 56px, #181A2E 56px 64px); }
.brand { flex: none; } .brand svg, .brand img { width: 38px; height: 38px; display: block; border-radius: 10px; }
.brand img { width: auto; max-width: 140px; object-fit: contain; }
.powered { font-size: .72rem; color: var(--ink2); }
.title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; flex: 1; }
.title h1 { font-size: clamp(1.15rem, 2.4vw, 1.6rem); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 22%, transparent); color: var(--ink); }
.bar-tools { display: flex; align-items: center; gap: 10px; }
.size { font-size: .82rem; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
select, input, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.btn { font: 600 .9rem var(--body); border: 0; border-radius: 99px; padding: 9px 16px; background: var(--brand); color: var(--onbrand); cursor: pointer; }
.btn:hover { background: var(--brand2); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.iconbtn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font-size: 1.1rem; }

/* layout */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; padding: 22px 18px 10px; max-width: 1500px; margin: 0 auto; }
.stage { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); }
.stat b { display: block; font: 700 1.5rem var(--display); }
.stat span { font-size: .8rem; color: var(--ink2); }
.stat.warn b { color: var(--clay); }
.views { display: flex; gap: 6px; margin-bottom: 10px; }
.vtab, .ptab { font: 600 .88rem var(--body); border: 1px solid var(--line); background: var(--card); color: var(--ink2); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.vtab.on, .ptab.on { background: var(--brand); color: var(--onbrand); border-color: var(--brand); }

/* office floor */
.floor { --av: 34px; position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
  background: conic-gradient(var(--floor) 25%, var(--tile) 0 50%, var(--floor) 0 75%, var(--tile) 0) 0 0 / 44px 44px; border: 1px solid var(--line); }
.hall { position: absolute; left: 0; right: 0; background: var(--hall); border-top: 2px dashed var(--wall); border-bottom: 2px dashed var(--wall); }
.hall .rug { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 700 .78rem var(--body); letter-spacing: .2em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 45%, transparent); padding: 4px 18px; border-radius: 99px; border: 2px solid color-mix(in srgb, var(--gold) 60%, transparent); white-space: nowrap; }
.room { position: absolute; background: var(--room); border: 3px solid var(--wall); border-radius: 14px; box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--room) 70%, var(--floor)); }
.room .rlabel { position: absolute; left: 8px; top: 6px; right: 8px; display: flex; align-items: center; gap: 6px; font: 700 clamp(.6rem, 1.05vw, .82rem) var(--body); color: var(--ink); white-space: nowrap; overflow: hidden; }
.room .rlabel i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.room .rcount { margin-left: auto; font-weight: 600; color: var(--ink2); }
.room .door { position: absolute; width: 18%; height: 7px; left: 41%; background: var(--hall); }
.room.top .door { bottom: -5px; } .room.bottom .door { top: -5px; }
.desk { position: absolute; width: calc(var(--av) * 1.3); height: calc(var(--av) * .5); transform: translate(-50%, -100%); border-radius: 5px;
  background: color-mix(in srgb, var(--wall) 70%, var(--room)); box-shadow: 0 2px 0 color-mix(in srgb, var(--wall) 90%, #000 10%); }
.desk::after { content: ""; position: absolute; left: 30%; top: -50%; width: 40%; height: 60%; border-radius: 3px; background: #2C2E48; border: 2px solid #4D4F68; }
.plant { position: absolute; width: calc(var(--av) * .55); height: calc(var(--av) * .55); border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 40% 35%, #5DAA6B, #2E7A43); }
.room.ceo { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, var(--room)); }
.ceo-frame { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: calc(var(--av) * 1.6); height: calc(var(--av) * 1.6); border-radius: 50%;
  border: 3px solid var(--gold); background: var(--bg2) center / cover no-repeat; display: grid; place-items: center; font: 700 .8rem var(--body); color: var(--ink2); overflow: hidden; cursor: pointer; }
.ceo-name { position: absolute; left: 0; right: 0; top: calc(22% + var(--av) * 1.75); text-align: center; font: 700 clamp(.6rem, 1vw, .8rem) var(--body); }
.tray { position: absolute; right: 10%; bottom: 14%; padding: 3px 8px; border-radius: 8px; background: var(--card); border: 2px solid var(--gold); font: 700 .72rem var(--body); cursor: pointer; color: var(--ink); }
.tray.pop { animation: pop .5s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }

/* avatars */
.av { position: absolute; width: var(--av); transform: translate(-50%, -100%); z-index: 5; cursor: pointer; transition: opacity .3s; }
.av svg { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 2px 1px rgba(0,0,0,.18)); }
.av.flip svg { transform: scaleX(-1); }
.av .tag { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 1px; font: 700 clamp(.5rem, .85vw, .68rem) var(--body);
  background: var(--card); color: var(--ink); padding: 0 5px; border-radius: 6px; border: 1px solid var(--line); white-space: nowrap; }
.av .bub { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, -2px); font: 700 .7rem var(--body); background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 1px 6px; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.av.working .bub, .av.waiting .bub, .av:hover .bub { opacity: 1; }
.av.waiting .bub { background: var(--clay); color: #fff; border-color: var(--clay); pointer-events: auto; }
.av .leg, .av .arm { transform-box: fill-box; transform-origin: 50% 10%; }
.av.walking .leg.l { animation: swing .42s ease-in-out infinite alternate; }
.av.walking .leg.r { animation: swing .42s ease-in-out infinite alternate-reverse; }
.av.walking .arm.l { animation: swing .42s ease-in-out infinite alternate-reverse; }
.av.walking .arm.r { animation: swing .42s ease-in-out infinite alternate; }
.av.walking svg { animation: bob .21s ease-in-out infinite alternate; }
.av.working .arm { animation: type .22s ease-in-out infinite alternate; }
.av .paper { opacity: 0; transition: opacity .2s; }
.av.carry .paper { opacity: 1; }
@keyframes swing { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes type { from { transform: rotate(-35deg); } to { transform: rotate(-60deg); } }
@keyframes bob { to { transform: translateY(-2px); } }
.av.flip.walking svg { animation-name: bobflip; }
@keyframes bobflip { from { transform: scaleX(-1); } to { transform: scaleX(-1) translateY(-2px); } }

/* org chart */
.org { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.org-top { display: flex; flex-direction: column; align-items: center; gap: 0; }
.ocard { background: var(--bg); border: 2px solid var(--line); border-radius: 16px; padding: 10px 16px; text-align: center; min-width: 180px; }
.ocard.ceo { border-color: var(--gold); display: flex; align-items: center; gap: 12px; text-align: left; }
.ocard .ph { width: 54px; height: 54px; border-radius: 50%; background: var(--bg2) center / cover; border: 3px solid var(--gold); display: grid; place-items: center; font-weight: 700; color: var(--ink2); }
.ocard small { display: block; color: var(--ink2); }
.vline { width: 3px; height: 22px; background: var(--line); }
.org-depts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 0; padding-top: 18px; border-top: 3px solid var(--line); }
.odept { background: var(--bg); border-radius: 14px; border-top: 6px solid; padding: 10px 12px; }
.odept h4 { margin: 0 0 6px; font: 700 .95rem var(--body); }
.omem { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .85rem; }
.omem svg { width: 24px; height: 36px; flex: none; }
.omem em { font-style: normal; color: var(--ink2); font-size: .76rem; display: block; }

/* side panel */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 16px; align-self: start; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.ptabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ptab { padding: 6px 11px; }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: var(--clay); color: #fff; font-size: .7rem; padding: 0 5px; margin-left: 3px; }
.badge.soft { background: var(--gold); color: #181A2E; }
.ask textarea { width: 100%; resize: vertical; }
.ask-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ask-row .btn { margin-left: auto; }
.mic { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--gold); color: #181A2E; cursor: pointer; display: grid; place-items: center; }
.mic svg { width: 22px; height: 22px; fill: currentColor; }
.mic.on { background: var(--clay); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--clay) 25%, transparent); } }
.mic-note { font-size: .78rem; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chips button { font: .78rem var(--body); text-align: left; border: 1px dashed var(--line); background: var(--bg); color: var(--ink); border-radius: 12px; padding: 5px 9px; cursor: pointer; }
.chips button:hover { border-color: var(--brand); }
.feed-h { margin-top: 16px; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feed li { font-size: .84rem; padding: 7px 10px; border-radius: 10px; background: var(--bg); border-left: 4px solid var(--line); animation: slide .35s ease; }
.feed li time { color: var(--ink2); font-size: .74rem; margin-right: 6px; }
@keyframes slide { from { opacity: 0; transform: translateY(-6px); } }
.tgroup h3 { font: 700 .8rem var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); margin: 14px 0 6px; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; background: var(--bg); margin-bottom: 6px; border-left: 4px solid; font-size: .86rem; }
.task div { flex: 1; min-width: 0; }
.task small { display: block; color: var(--ink2); }
.task .btn { padding: 5px 12px; font-size: .78rem; }
.task.done { cursor: pointer; }
.reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.reports li button { width: 100%; text-align: left; font: .86rem var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; cursor: pointer; }
.reports li small { display: block; color: var(--ink2); }
.empty { color: var(--ink2); font-size: .86rem; }

/* dialogs */
.dlg { border: 1px solid var(--line); border-radius: 18px; background: var(--card); color: var(--ink); max-width: min(560px, 92vw); padding: 20px; box-shadow: var(--shadow); }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg pre { white-space: pre-wrap; font: .9rem/1.55 var(--body); background: var(--bg); border-radius: 12px; padding: 12px; max-height: 50vh; overflow: auto; }
.dlg-who { font-size: .8rem; color: var(--ink2); margin: 0 0 4px; }
.dlg label { display: grid; gap: 4px; font-size: .86rem; font-weight: 600; margin-bottom: 10px; }
.dlg-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.foot { max-width: 1500px; margin: 0 auto; padding: 8px 18px 28px; font-size: .78rem; color: var(--ink2); }
.foot p { margin: 4px 0; }

@media (max-width: 1020px) {
  .app { grid-template-columns: 1fr; }
  .panel { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .bar { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  .title { order: 2; flex-basis: 100%; }
  .bar-tools { margin-left: auto; }
  .size { font-size: 0; gap: 0; }
  .size select { font-size: .85rem; }
  #setup-btn { padding: 7px 11px; font-size: .8rem; }
  .app { padding: 16px 10px 8px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .floor { aspect-ratio: 4 / 5; }
  .hall .rug { font-size: .6rem; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
  .av.walking .leg, .av.walking .arm, .av.working .arm, .av.walking svg, .feed li, .tray.pop, .mic.on { animation: none !important; }
}

/* filters */
.filters { display: flex; gap: 6px; margin-bottom: 8px; }
.filters input { flex: 1; min-width: 0; }
.filters select { max-width: 48%; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.fchips button { font: 600 .76rem var(--body); border: 1px solid var(--line); background: var(--bg); color: var(--ink2); border-radius: 99px; padding: 4px 10px; cursor: pointer; }
.fchips button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* social */
.socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.soc { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); font-size: .8rem; min-width: 0; color: var(--ink); text-decoration: none; }
.soc b { display: block; font-size: .8rem; }
.soc span { display: block; color: var(--ink2); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soc div { min-width: 0; }
.soc.off { opacity: .6; border-style: dashed; cursor: pointer; }
.pf { width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center; color: #fff; font: 800 .66rem var(--body); }
.pf.ig { background: linear-gradient(135deg, #F58529, #DD2A7B 55%, #8134AF); } .pf.tt { background: #111; box-shadow: inset -2px 0 #25F4EE, inset 2px 0 #FE2C55; }
.pf.fb { background: #1877F2; } .pf.li { background: #0A66C2; } .pf.yt { background: #FF0000; } .pf.web { background: var(--brand); color: var(--onbrand); }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.post { display: flex; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); animation: slide .35s ease; }
.post .thumb { width: 54px; height: 54px; flex: none; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--gold)); display: grid; place-items: center; color: #fff; font-size: 1.2rem; }
.post div { min-width: 0; flex: 1; font-size: .82rem; }
.post p { margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post small { color: var(--ink2); }
.post a { font-weight: 600; font-size: .78rem; }
.post .tagsample { font-size: .66rem; font-weight: 700; color: var(--ink2); border: 1px solid var(--line); border-radius: 6px; padding: 0 4px; margin-left: 4px; }

/* setup dialog */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg input[type=color] { height: 40px; padding: 3px; width: 100%; }
.fsoc { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px 2px; margin: 4px 0 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.fsoc legend { font-size: .8rem; font-weight: 700; padding: 0 4px; }
.dlg-row .left { margin-right: auto; }
#out-link a { font-weight: 700; }
@media (max-width: 640px) { .powered { display: none; } .frow, .fsoc { grid-template-columns: 1fr; } }
.pf.mini { display: inline-grid; width: 18px; height: 18px; font-size: .55rem; border-radius: 5px; vertical-align: middle; }

/* embedded in the homepage hero on phones: show the animated office first (Samuel, 16 Nov 2026) */
@media (max-width: 640px) {
  .embed .bar .title .pill, .embed .bar .powered, .embed .brand { display: none; }
  .embed .stats { display: none; }
  .embed .bar { padding-top: 8px; padding-bottom: 8px; }
}
