/* AI Employees Dashboard. Brand from AIEmployeesPlaybook.com: dark first, gold owner, RGB team bar.
   Sign-in screens follow Rick's standard look (navy page, green-glow card, dots for the code). */
:root {
  color-scheme: dark;
  --bg: #0a0a0c; --alt: #111115; --card: #16161b; --card2: #1b1b22; --line: #26262d;
  --fg: #e9e9ee; --muted: #a3a3ae; --dim: #8a8a96;
  --red: #e5261f; --green: #00c853; --blue: #2962ff; --link: #6aa8ff;
  --gold: #c9a227; --goldh: #dcb63f; --ok: #3ddc84; --warn: #f5c542;
  --display: "Space Grotesk", Inter, system-ui, Arial, sans-serif;
  --body: Inter, system-ui, -apple-system, Arial, sans-serif;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
a { color: var(--link); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--goldh); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); color: #fff; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.15; }
h2 { font-size: 1.3rem; line-height: 1.2; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
[hidden] { display: none !important; }
.loading { color: var(--muted); text-align: center; padding: 30vh 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- RGB bar (from the site header) ---------- */
.rgb { display: flex; height: 3px; position: relative; overflow: hidden; }
.rgb i { flex: 1; }
.rgb i:nth-child(1) { background: var(--red); } .rgb i:nth-child(2) { background: var(--green); } .rgb i:nth-child(3) { background: var(--blue); }
.rgb::after { content: ""; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: sweep 6s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(440%); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-weight: 700; text-decoration: none;
  border-radius: 12px; padding: 11px 18px; font-size: .95rem; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; background: none; }
.btn.red { background: var(--red); color: #fff; } .btn.red:hover { background: #c81e17; }
.btn.gold { background: var(--gold); color: #141414; } .btn.gold:hover { background: var(--goldh); }
.btn.ghost { border-color: var(--line); color: #fff; } .btn.ghost:hover { border-color: var(--gold); }
.btn.sm { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.on { border-color: var(--ok); color: var(--ok); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-decoration: underline; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- app shell ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(10,10,12,.94); backdrop-filter: blur(10px); }
.top-in { display: flex; align-items: center; gap: 14px; padding: 10px max(16px, env(safe-area-inset-left)); min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; flex: none; }
.brand b { font-family: var(--display); color: #fff; font-size: 1.05rem; line-height: 1; display: block; letter-spacing: -.02em; white-space: nowrap; }
.brand small { font-family: var(--display); color: var(--gold); font-size: .58rem; letter-spacing: .3em; font-weight: 600; text-transform: uppercase; }
.biz { color: var(--muted); font-size: .9rem; margin-left: 6px; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.savestate { margin-left: auto; font-size: .82rem; color: var(--dim); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.savestate::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.savestate[data-state=saving]::before { background: var(--warn); }
.savestate[data-state=error]::before { background: var(--red); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px; color: #fff; cursor: pointer; }

.scrim { display: none; }
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 63px); }
.side { border-right: 1px solid var(--line); background: var(--alt); padding: 18px 12px 30px; position: sticky; top: 63px; height: calc(100vh - 63px); overflow-y: auto; }
.side nav { display: grid; gap: 2px; }
.side a { display: flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 500; font-size: .95rem; }
.side a:hover { color: #fff; background: var(--card); }
.side a[aria-current=page] { color: #fff; background: var(--card2); box-shadow: inset 3px 0 0 var(--gold); }
.side .group-label { color: var(--dim); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; padding: 16px 12px 6px; }
.side .sub a { padding: 7px 12px 7px 14px; font-size: .9rem; }
.side .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.side .tick { margin-left: auto; color: var(--ok); font-size: .8rem; }

main#main { padding: 28px clamp(16px, 4vw, 44px) 40px; max-width: 1100px; width: 100%; outline: none; }
.foot { color: var(--dim); font-size: .82rem; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 16px; max-width: 75ch; }

.eyebrow { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.lede { color: var(--muted); margin-top: 8px; max-width: 70ch; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .9rem; margin-bottom: 14px; }
.back:hover { color: #fff; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stack { display: grid; gap: 16px; margin-top: 22px; }
.note { border: 1px solid #3a3320; background: #1a1710; color: #e8d9a8; border-radius: 12px; padding: 12px 14px; font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.note.info { border-color: #22324d; background: #0f1626; color: #c7d7f5; }
.note.ok { border-color: #1f4a30; background: #0e1a13; color: #bfeccd; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }

/* progress */
.bar { height: 8px; background: #23232b; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--p, 0%); background: var(--c, var(--gold)); border-radius: 99px; transition: width .25s; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.stat { display: grid; gap: 8px; text-decoration: none; color: inherit; }
.stat:hover { border-color: #3a3a44; }
.stat .k { color: var(--muted); font-size: .88rem; font-weight: 500; }
.stat .v { font-family: var(--display); color: #fff; font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat .v small { font-size: 1rem; color: var(--dim); font-weight: 500; }

.next-step { margin-top: 18px; border: 1.5px solid var(--gold); background: linear-gradient(135deg, #1c1808, #16161b 60%); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.next-step .txt { flex: 1 1 300px; }
.next-step h2 { font-size: 1.15rem; margin-bottom: 4px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.12); color: #fff; white-space: nowrap; }
.chip.none { background: rgba(0,0,0,.35); color: #e6e6ea; }
.chip.answering { background: #3a3012; color: #ffe08a; }
.chip.ready { background: #0f2f4d; color: #a9d4ff; }
.chip.deployed { background: #0e3a22; color: #8ff0b6; }
.tag { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; border: 1px dashed #6c6c78; color: var(--muted); vertical-align: middle; }
.tag.need { border-style: solid; border-color: #5a4a14; color: #f5d77a; }

/* team tree */
.tree-org { display: flex; flex-direction: column; align-items: center; margin-top: 26px; }
.node { border-radius: 14px; padding: 12px 22px; text-align: center; }
.node b { font-family: var(--display); color: #fff; display: block; font-size: 1.05rem; }
.node small { color: var(--muted); font-size: .8rem; }
.owner { background: #0a0a0c; border: 2px solid var(--gold); box-shadow: 0 0 30px rgba(201,162,39,.25); }
.vline { width: 2px; height: 20px; background: #4a4a55; }
a.tile { text-decoration: none; color: #fff; border-radius: 12px; padding: 12px 10px; display: grid; gap: 4px; justify-items: center; text-align: center;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); border: 1px solid rgba(255,255,255,.08); transition: transform .12s, box-shadow .12s; }
a.tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.4); }
a.tile b { font-family: var(--display); font-size: 1.02rem; }
a.tile small { font-size: .76rem; opacity: .95; }
a.tile .specs { font-size: .72rem; opacity: .85; }
a.tile.jordan { min-width: 240px; padding: 14px 24px; }
.heads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; width: 100%; border-top: 2px solid #4a4a55; padding-top: 14px; }

/* checklist */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.count { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.items { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 8px; border-radius: 10px; }
.item:hover { background: #1c1c23; }
.item input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); cursor: pointer; }
.item label { cursor: pointer; font-weight: 500; color: #fff; }
.item .help { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.item .guide { font-size: .74rem; color: var(--gold); font-weight: 600; margin-top: 4px; letter-spacing: .02em; }
.item.done label { color: var(--muted); text-decoration: line-through; text-decoration-color: #555; }
.complete { margin-top: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
details.archive > summary, details.spec > summary, details.arch-sec > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.archive { margin-top: 30px; }
details.archive > summary { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; padding: 12px 4px; border-top: 1px solid var(--line); }
details.archive > summary::before, details.arch-sec > summary::before, details.spec > summary .chev::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 1.2rem; line-height: 1; }
details[open].archive > summary::before, details[open].arch-sec > summary::before, details[open].spec > summary .chev::before { transform: rotate(90deg); }
details.arch-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 10px; }
details.arch-sec > summary { display: flex; gap: 10px; align-items: center; font-weight: 600; color: #fff; }

/* head page */
.head-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; border-left: 5px solid var(--c); }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.6rem; color: #fff;
  background: linear-gradient(180deg, var(--c), color-mix(in srgb, var(--c) 55%, #000)); }
.head-hero .meta { display: grid; gap: 8px; }
.head-hero .sub { color: var(--muted); }
.deploy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--line); }
.deploy-row .why { color: var(--muted); font-size: .88rem; }
.group h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.group .group-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 6px; }
.q { padding: 14px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.q label { display: block; font-weight: 600; color: #fff; margin-bottom: 8px; }
.q textarea { width: 100%; min-height: 76px; resize: vertical; background: #0e0e12; border: 1px solid #30303a; border-radius: 10px; padding: 10px 12px; color: var(--fg); line-height: 1.5; }
.q textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,162,39,.18); }
.q-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 6px; flex-wrap: wrap; }
.q-state { font-size: .8rem; color: var(--dim); min-height: 1.2em; }
.q-state.saved { color: var(--ok); }
.q-state.err { color: #ff8a80; }
.q-right { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.chars { font-size: .76rem; color: var(--dim); }
.skip { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 4px 10px; font-size: .8rem; cursor: pointer; }
.skip:hover:not(:disabled) { color: #fff; border-color: #55555f; }
.skip:disabled { opacity: .45; cursor: not-allowed; }
.q.skipped textarea { display: none; }
.skipped-note { display: none; color: var(--muted); font-style: italic; font-size: .92rem; background: #121216; border: 1px dashed #3a3a44; border-radius: 10px; padding: 10px 12px; }
.q.skipped .skipped-note { display: block; }
details.spec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
details.spec > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px 18px; }
details.spec > summary .chev { color: var(--muted); width: 14px; }
details.spec > summary b { font-family: var(--display); color: #fff; font-size: 1.02rem; }
details.spec > summary .does { color: var(--muted); font-size: .85rem; }
details.spec .spec-progress { display: grid; gap: 6px; justify-items: end; min-width: 96px; }
details.spec .spec-progress .bar { width: 96px; }
details.spec .spec-body { padding: 0 18px 18px; display: grid; gap: 14px; }
details.spec.off > summary b { color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; color: var(--muted); }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: #3a3a44; position: relative; cursor: pointer; margin: 0; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { left: 21px; }
.subgroup { background: #121217; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }

/* deploy page */
.steps { margin: 12px 0 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.steps > li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #141414; font-weight: 700; display: grid; place-items: center; font-family: var(--display); }
.steps > li b { color: #fff; }
.jobfile { width: 100%; min-height: 340px; max-height: 60vh; resize: vertical; background: #0e0e12; color: #dcdce2; border: 1px solid #30303a; border-radius: 10px; padding: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .84rem; line-height: 1.5; white-space: pre-wrap; }
.tools { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.tools li { margin: 2px 0; }

/* connectors */
.conn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.conn { display: grid; gap: 8px; align-content: start; }
.conn .where { font-size: .84rem; color: var(--gold); }
.conn.on { border-color: #1f5a37; }
.addr { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin-top: 10px; }
.addr code { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; background: #0e0e12; border: 1px solid #30303a; border-radius: 10px; padding: 11px 12px; font-size: .86rem; color: #fff; }
.dept-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.dept-list li { display: grid; grid-template-columns: 12px 190px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.dept-list .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.dept-list b { color: #fff; }
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.opt { background: #121217; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .9rem; color: var(--muted); }
.opt b { color: #fff; display: block; margin-bottom: 4px; }

/* vault */
.vtree, .vtree ul { list-style: none; margin: 0; padding: 0; }
.vtree ul { margin-left: 13px; padding-left: 16px; border-left: 1px dashed #3a3a44; }
.vtree li { padding: 3px 0; }
.vtree .f { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); }
.vtree .f .icon { color: var(--gold); width: 18px; height: 18px; }
.vtree .f.emp b { color: #fff; }
.vtree .f .sw { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.vtree .root > .f { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.legend span { background: #121217; border: 1px solid var(--line); border-radius: 8px; padding: 3px 9px; font-size: .82rem; color: var(--muted); }

/* forms */
.field { display: grid; gap: 6px; max-width: 460px; }
.field label { font-weight: 600; color: #fff; }
.field input { background: #0e0e12; border: 1px solid #30303a; border-radius: 10px; padding: 11px 12px; color: #fff; }
.field input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,162,39,.18); }
.err { color: #ff8a80; font-size: .9rem; }

/* dialogs and toast */
dialog { background: var(--card); color: var(--fg); border: 1px solid #34343e; border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog .dlg { padding: 22px; display: grid; gap: 14px; }
dialog .dlg p { color: var(--muted); }
dialog .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: #26262d; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: calc(100vw - 32px); font-size: .92rem; }
.toast.error { background: #4a1412; }

/* welcome */
main#main.welcome { max-width: 600px; margin: 8vh auto 0; padding: 0 20px 40px; }
.welcome form { display: grid; gap: 16px; margin-top: 22px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 63px; left: 0; bottom: 0; height: auto; width: min(290px, 86vw); z-index: 30; transform: translateX(-105%); transition: transform .2s; box-shadow: 12px 0 30px rgba(0,0,0,.5); }
  .side { visibility: hidden; transition: transform .2s, visibility .2s; }
  body.nav-open .side { transform: none; visibility: visible; }
  body.nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 63px 0 0; background: rgba(0,0,0,.5); z-index: 25; }
  .biz { display: none; }
  .heads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conn-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  main#main { padding: 20px 14px 32px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat .v { font-size: 1.6rem; }
  .brand small { display: none; }
  .savestate span { display: none; }
  .head-hero { grid-template-columns: minmax(0, 1fr); }
  .avatar { width: 52px; height: 52px; font-size: 1.3rem; }
  details.spec > summary { grid-template-columns: auto minmax(0, 1fr); }
  details.spec .spec-progress { grid-column: 2; justify-items: start; }
  .opts { grid-template-columns: minmax(0, 1fr); }
  .dept-list li { grid-template-columns: 12px minmax(0, 1fr); }
  .dept-list li span:last-child { grid-column: 2; }
  a.tile.jordan { min-width: 0; width: 100%; }
  .card { padding: 16px; }
}

/* ---------- sign-in: Rick's standard look (dark navy, green glow, dots) ---------- */
body.gate-page { background: linear-gradient(180deg, #0b0f1a 0%, #111827 100%) fixed; }
.gate {
  --g-text: #f8fafc; --g-muted: #94a3b8; --g-card: #0a0e1a; --g-field: #070b14; --g-line: #2a3140;
  --g-green: #76f03b; --g-green-2: #58c84a; --g-ring: #4c9a2a; --g-border: #3f8f2a; --g-red: #f87171;
  min-height: 100vh; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; color: var(--g-text);
}
.gate :focus-visible { outline-color: var(--g-green); }
.gate-card {
  width: 100%; max-width: 440px; background: var(--g-card); border: 1px solid var(--g-border); border-radius: 24px;
  padding: 36px 32px 32px; text-align: center;
  box-shadow: 0 0 0 1px rgb(118 240 59 / 4%), 0 0 40px rgb(118 240 59 / 12%), 0 24px 60px rgb(0 0 0 / 45%);
}
.gate-logo {
  width: 150px; height: 150px; margin: 0 auto 22px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  border: 4px solid var(--g-ring); box-shadow: 0 0 0 6px rgb(76 154 42 / 12%), 0 0 34px rgb(118 240 59 / 35%);
}
.gate-logo img { width: 62%; height: 62%; display: block; }
.gate-title { font-family: Inter, system-ui, sans-serif; font-size: 38px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 10px; color: #fff; }
.gate-sub { color: var(--g-muted); font-size: 16px; margin: 0 0 28px; }
.gate-form { display: grid; gap: 14px; text-align: left; }
.gate-label { font-weight: 600; font-size: 15px; margin: 4px 0 -4px; color: #fff; }
.gate-label.center { text-align: center; margin-top: 6px; }
.gate-field { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 14px 0 16px; background: var(--g-field); border: 1px solid var(--g-line); border-radius: 12px; }
.gate-field:focus-within { border-color: var(--g-green); box-shadow: 0 0 0 3px rgb(118 240 59 / 15%); }
.gate-field > .icon { color: var(--g-muted); width: 22px; height: 22px; }
.gate-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--g-text); font-size: 17px; padding: 0; outline: none; }
.gate-input::placeholder { color: #64748b; }
.gate-button {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 56px; margin-top: 6px;
  border: 0; border-radius: 12px; font-size: 18px; font-weight: 800; color: #0b0f19; cursor: pointer;
  background: linear-gradient(100deg, var(--g-green) 0%, var(--g-green-2) 100%); box-shadow: 0 8px 28px rgb(118 240 59 / 22%);
}
.gate-button:hover { filter: brightness(1.05); }
.gate-button:disabled { opacity: .6; cursor: default; }
.gate-button .icon { width: 22px; height: 22px; stroke-width: 2.2; }
.gate-banner { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px 16px; border-radius: 12px; text-align: left; font-size: 15px; }
.gate-banner.ok { color: var(--g-green); background: rgb(118 240 59 / 7%); border: 1px solid rgb(118 240 59 / 30%); }
.gate-banner.error { color: var(--g-red); background: rgb(248 113 113 / 8%); border: 1px solid rgb(248 113 113 / 30%); }
.gate-banner .icon { margin-top: 1px; }
.gate-dev { margin: 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; text-align: center; color: #fde68a; background: rgb(250 204 21 / 10%); border: 1px solid rgb(250 204 21 / 35%); }
.gate-sent { color: var(--g-muted); text-align: center; margin: 4px 0 0; font-size: 16px; overflow-wrap: anywhere; }
.gate-sent strong { color: #fff; }
.dots-box { position: relative; display: block; height: 100px; border-radius: 14px; background: var(--g-field); cursor: text; border: 3px solid var(--g-green); box-shadow: 0 0 22px rgb(118 240 59 / 28%); }
.dots-box.busy { opacity: .6; }
.dots-real { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; color: transparent; caret-color: transparent; background: transparent; z-index: 1; }
.dots { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 30px; }
.dot6 { width: 15px; height: 15px; border-radius: 50%; background: var(--g-green); box-shadow: 0 0 8px rgb(118 240 59 / 45%); display: grid; place-items: center; transition: all .12s; }
.dot6.digit { width: auto; height: auto; min-width: 22px; background: none; box-shadow: none; color: var(--g-green); font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dots-box:focus-within .dot6.next { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.gate-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.gate-link { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 0; color: var(--g-muted); font-size: 15px; cursor: pointer; }
.gate-link:hover { color: #fff; }
.gate-link.green { color: var(--g-green); }
.gate-link .icon { width: 18px; height: 18px; }
@media (max-width: 480px) {
  .gate-card { padding: 28px 20px 24px; border-radius: 20px; }
  .gate-logo { width: 120px; height: 120px; }
  .gate-title { font-size: 30px; }
  .gate-sub { font-size: 15px; margin-bottom: 22px; }
  .gate-button { font-size: 16px; }
  .dots { gap: 18px; }
  .dot6.digit { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .rgb::after { animation: none; display: none; }
  .dots-box:focus-within .dot6.next { animation: none; }
  * { transition: none !important; }
}

/* ---------- self-install additions ---------- */
.gate-steps { margin: 0; padding-left: 22px; color: var(--g-muted); display: grid; gap: 8px; font-size: 15px; }
.gate-steps b { color: #fff; }
.gate-note { color: #64748b; text-align: center; font-size: 13px; margin: 2px 0 0; }
.tag.new { border-style: solid; border-color: #1f4a6b; color: #9fd0ff; }
.card.notice { margin-top: 14px; border: 1.5px solid #2c5a8a; background: linear-gradient(135deg, #0f1a2a, #16161b 60%); }
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.compare h3 { margin-bottom: 6px; }
.compare .jobfile { min-height: 300px; }
.jobfile.editing { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.18); color: #fff; }
.side-btn { background: none; border: 0; color: var(--muted); text-align: left; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.side-btn:hover { color: #fff; background: var(--card); }
.people { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.person { display: grid; gap: 10px; background: #121217; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.person b { color: #fff; }
.add-person { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.picker { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; }
.picker legend { color: #fff; font-weight: 600; padding: 0 6px; }
.picker label { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--fg); cursor: pointer; }
.picker input { accent-color: var(--gold); width: 16px; height: 16px; }
.picker .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
@media (max-width: 760px) {
  .compare, .two { grid-template-columns: minmax(0, 1fr); }
  .picker { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- tasks, voice settings, Talk to Jordan ---------- */
.tasks { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.task { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.task-main { display: flex; gap: 10px; align-items: flex-start; flex: 1 1 260px; color: var(--fg); }
.task-main input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); }
.task.done .task-main span { text-decoration: line-through; color: var(--dim); }
.task-meta { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-left: 28px; }
.task-form { display: grid; gap: 10px; }
.task-form .row .field { flex: 1 1 200px; }
.steps { margin: 10px 0 0; padding-left: 20px; color: var(--muted); display: grid; gap: 4px; }
code.secret { display: block; word-break: break-all; background: #0a0f0b; border: 1px solid #1f4a30; border-radius: 8px; padding: 8px 10px; color: #fff; font-size: .85rem; user-select: all; }
.talk-btn { margin-left: auto; }
.talk-btn + .savestate { margin-left: 0; }
.talk { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 32px)); z-index: 40; display: grid; gap: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.6); border-color: #1f4a30; }
.talk[hidden] { display: none; }
.talk-state { font-weight: 600; color: #fff; margin: 0; }
.captions { max-height: 180px; min-height: 48px; overflow: auto; background: var(--alt); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.captions p { margin: 0 0 6px; }
.captions:empty::before { content: "Live captions appear here."; color: var(--dim); }

/* ---------- read-only visitor demo ---------- */
.gate-demo { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(148, 163, 184, .18); display: grid; justify-items: center; gap: 4px; }
.demo-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 10px 20px; background: #0f1626; border-bottom: 1px solid #22324d; color: #c7d7f5; font-size: .92rem; }
.demo-bar .icon { width: 18px; height: 18px; flex: none; }
.demo-bar span { flex: 1 1 320px; }
.demo-bar a { color: #76f03b; font-weight: 700; }
.demo-bar b { color: #ff4f47; }
.sample-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; border-color: #1f4a30; }
.sample-card h2 { margin: 0 0 4px; }
.sample-card p { margin: 0; }
.sample-captions { max-height: 240px; }
.sample-captions:empty::before { content: "Captions appear here as the call plays."; }
.sample-task { display: flex; gap: 8px; align-items: flex-start; color: #bfeccd; background: #0e1a13; border: 1px solid #1f4a30; border-radius: 8px; padding: 6px 8px; }
.sample-task .icon { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* ---------- demo lockdown: trimmed parts are blurred, nothing can be copied ---------- */
body.demo main { user-select: none; -webkit-user-select: none; }
.demo-blur, .demo-locked > .q, .demo-locked > ul.items { filter: blur(5px); pointer-events: none; user-select: none; }
pre.demo-blur { white-space: pre-wrap; margin: 10px 0; overflow: hidden; }
.lock-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; padding: 8px 12px; border: 1px solid #1f4a30; background: #0e1a13; color: #bfeccd; border-radius: 10px; font-size: .9rem; }
.lock-note .icon { width: 16px; height: 16px; flex: none; margin-top: 3px; }
.lock-note a { color: #76f03b; font-weight: 700; }
