/* Deal Room app prototype.
   Loads after assets/styles.css and uses its tokens and atoms (.btn .av .blob .pill .ic .fld .label).
   The product-UI rules below are forked from demo/demo.css, with three renames applied so nothing
   collides with the site stylesheet:
     .ask -> .askbar   (styles.css:486 styles .ask as an agent-card bullet row)
     .ck  -> .ock      (styles.css:543 styles .ck at a different size)
     .cite is NOT in styles.css, so it is carried over here in full.
   Reserved by styles.css — never use bare: .ask .ck .bar .hl .dark .nav .logo .msg .st .num .note */

/* ============================================================ app shell */
html[data-app] { scroll-behavior: auto; }            /* smooth scrolling feels laggy in a dense UI */
html[data-app], body.dr-app { height: 100%; overflow: hidden; background: #fff; }
/* styles.css sets body to 18px, which the film neutralised inside its stage. Re-establish it
   here or every inherited size in the forked rules below is ~20% too large. */
#app-root { height: 100%; font-size: 15px; display: flex; flex-direction: column; }
#app-root :focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }
.phase { display: none; height: 100%; min-height: 0; }
.phase.on { display: flex; flex-direction: column; }

/* ============================================================ sign in */
.si { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.si-form { display: flex; flex-direction: column; justify-content: center; padding: 0 clamp(40px, 7vw, 120px); }
.si-form .logo { font-size: 26px; margin-bottom: 52px; }
.si h1 { font-size: 40px; letter-spacing: -0.035em; margin-bottom: 10px; }
.si-lede { color: var(--muted); font-size: 17px; margin-bottom: 34px; }
.si form { max-width: 400px; }
.si .fld input { height: 54px; font-size: 16px; }
.si .btn { width: 100%; margin-top: 6px; }
.si-or { display: flex; align-items: center; gap: 14px; color: var(--muted-2); font-size: 14px; margin: 22px 0; max-width: 400px; }
.si-or::before, .si-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.si-sso { display: grid; gap: 10px; max-width: 400px; }
.si-sso button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border: 1.5px solid var(--line-2); border-radius: 999px; background: #fff; font-size: 16px; font-weight: 500; transition: border-color .2s, background .2s; }
.si-sso button:hover { border-color: var(--ink); background: var(--soft); }
.si-sso .ic { width: 20px; height: 20px; }
.si-note { font-size: 13.5px; color: var(--muted); margin-top: 26px; max-width: 400px; line-height: 1.5; }
.si-note b { font-weight: 600; color: var(--ink); }
.si-art { background: #faf8fb; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 0 clamp(36px, 5vw, 80px); }
.si-quote { font-size: 27px; line-height: 1.28; letter-spacing: -0.03em; }
.si-art .cite { align-self: flex-start; }
.si-logos { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.si-logos .ic-bub { width: 40px; height: 40px; }
.si-logos .ic-bub .ic { width: 21px; height: 21px; }

/* ============================================================ onboarding */
.ob { flex: 1; display: grid; grid-template-columns: 292px 1fr; min-height: 0; }
.ob-rail { background: #fbfaf9; border-right: 1px solid var(--line); padding: 26px 22px; display: flex; flex-direction: column; }
.ob-rail .logo { font-size: 22px; margin-bottom: 38px; }
.ob-steps { display: flex; flex-direction: column; gap: 2px; }
.ob-step { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 10px; font-size: 14.5px; color: #6f7072; }
.ob-step i { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #cfcfcf; display: grid; place-items: center; font-size: 12px; font-style: normal; font-weight: 600; color: #9a9a9a; flex: none; transition: all .3s; }
.ob-step.on { background: #efecea; color: var(--ink); font-weight: 500; }
.ob-step.on i { border-color: var(--ink); color: var(--ink); }
.ob-step.done i { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.ob-rail-foot { margin-top: auto; font-size: 13px; color: var(--muted-2); line-height: 1.5; }
.ob-main { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ob-body { flex: 1; overflow-y: auto; padding: 52px clamp(34px, 5vw, 76px) 30px; }
.ob-inner { max-width: 760px; }
.ob-inner.wide { max-width: 980px; }
.ob-eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.ob-body h1 { font-size: 35px; letter-spacing: -0.035em; margin-bottom: 8px; }
.ob-lede { color: var(--muted); font-size: 17px; line-height: 1.5; margin-bottom: 32px; max-width: 620px; }
.ob-foot { flex: none; border-top: 1px solid var(--line); padding: 16px clamp(34px, 5vw, 76px); display: flex; align-items: center; gap: 14px; background: #fff; }
.ob-foot .grow { flex: 1; }
.ob-err { color: var(--bad); font-size: 14.5px; }
.ob-err.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* step 1 — workspace */
.ob-slug { font-size: 14px; color: var(--muted); margin: -6px 0 26px; }
.ob-slug b { color: var(--ink); font-weight: 500; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.opt { text-align: left; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 16px 18px; background: #fff; transition: border-color .2s, box-shadow .2s, transform .2s; }
.opt:hover { border-color: #b3b3b3; }
.opt.on { border-color: var(--ink); box-shadow: 0 10px 26px -14px rgba(0,0,0,.4); }
.opt b { display: block; font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.opt small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* step 2 — tools */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tile-t { display: flex; align-items: center; gap: 13px; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 15px 16px; background: #fff; text-align: left; transition: border-color .2s, box-shadow .2s; position: relative; overflow: hidden; }
.tile-t:hover { border-color: #b3b3b3; }
.tile-t .ic { width: 26px; height: 26px; }
.tile-t b { display: block; font-size: 15.5px; font-weight: 600; }
.tile-t small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.tile-t .tick { margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #cfcfcf; flex: none; display: grid; place-items: center; transition: all .3s; }
.tile-t.done { border-color: #bfe4cd; background: #fbfefc; }
.tile-t.done .tick { background: #1f9d55; border-color: #1f9d55; }
.tile-t.done .tick::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.tile-t.busy { border-color: #cdb8ff; }
.tile-t.busy small { color: var(--violet); }
.tile-t .shim { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--violet); transition: width .5s linear; }
.tile-t.busy .shim { width: 100%; }
.ob-hint { font-size: 14px; color: var(--muted); margin-top: 18px; display: flex; align-items: center; gap: 8px; }
.ob-hint svg { width: 17px; height: 17px; stroke: var(--violet); fill: none; stroke-width: 1.8; flex: none; }

/* step 3 — deal scan */
.scan { border: 1px solid var(--line); border-radius: 16px; padding: 6px; background: #fff; }
.scan-row { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 12px; font-size: 15px; opacity: 0; transform: translateY(-6px); animation: rowIn .45s both; }
@keyframes rowIn { to { opacity: 1; transform: none; } }
.scan-row + .scan-row { border-top: 1px solid #f4f4f4; }
.scan-row .ic { width: 18px; height: 18px; }
.scan-row .grow { flex: 1; }
.scan-row small { color: var(--muted); font-size: 13px; }
.deals { display: grid; gap: 10px; }
.deal-pick { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 15px 18px; background: #fff; text-align: left; width: 100%; transition: border-color .2s, box-shadow .2s; }
.deal-pick:hover { border-color: #b3b3b3; }
.deal-pick.on { border-color: var(--ink); box-shadow: 0 10px 26px -14px rgba(0,0,0,.4); }
.deal-pick .rh-logo { width: 38px; height: 38px; font-size: 17px; border-radius: 10px; }
.deal-pick b { display: block; font-size: 16px; font-weight: 600; }
.deal-pick small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.deal-pick .amt { margin-left: auto; text-align: right; }
.deal-pick .amt b { font-size: 16px; }

/* step 4 — invites */
.inv { display: grid; gap: 8px; }
.inv-row { display: flex; align-items: center; gap: 13px; border: 1.5px solid var(--line-2); border-radius: 14px; padding: 12px 16px; background: #fff; transition: border-color .2s; }
.inv-row.on { border-color: var(--ink); }
.inv-row b { display: block; font-size: 15.5px; font-weight: 600; }
.inv-row small { display: block; font-size: 13px; color: var(--muted); }
.inv-row .cite { margin-left: auto; }
.sw { display: inline-block; width: 44px; height: 26px; border-radius: 99px; background: #dcdcdc; position: relative; flex: none; transition: background .25s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw.on { background: #1f9d55; }
.sw.on::after { transform: translateX(18px); }

/* step 5 — agents */
.agrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.acard { display: flex; gap: 14px; align-items: flex-start; border: 1.5px solid var(--line-2); border-radius: 16px; padding: 16px 18px; background: #fff; text-align: left; transition: border-color .2s, box-shadow .2s; }
.acard.on { border-color: var(--ink); box-shadow: 0 10px 26px -14px rgba(0,0,0,.35); }
.acard b { display: block; font-size: 16px; font-weight: 600; }
.acard small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.acard .sw { margin-left: auto; }

/* step 6 — rules */
.rule { display: flex; align-items: flex-start; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 15px 18px; margin-bottom: 10px; background: #fff; }
.rule b { display: block; font-size: 15.5px; font-weight: 600; }
.rule small { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.rule .who { font-size: 13px; color: var(--violet); font-weight: 500; margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; }
.rule .sw { margin-left: auto; margin-top: 3px; }
.rule.fixed { background: #fbfafc; }
.rule.fixed .sw { opacity: .5; }
.ob-split { display: grid; grid-template-columns: 1fr 430px; gap: 26px; align-items: start; }
.ob-prev { border: 1px solid #e6dcff; background: #fbf9ff; border-radius: 16px; padding: 18px; position: sticky; top: 0; }
.ob-prev .ap { border: 0; padding: 0; max-width: none; }
.ob-prev .ap-h b { font-size: 16px; }
.ob-prev .ap-msg { font-size: 14.5px; }
.ob-prev .ap-meta { grid-template-columns: 32px auto; gap: 4px 8px; font-size: 13px; margin: 12px 0 10px; }
.ob-prev .ap-meta b { margin-right: 0; }
.ob-prev .ap-why, .ob-prev .ap-src { font-size: 13px; }
.ob-prev h4 { font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--violet); margin-bottom: 12px; }

/* building moment */
.build { flex: 1; display: grid; place-items: center; }
.build-in { width: 480px; text-align: center; }
.build-in .logo { justify-content: center; margin-bottom: 30px; }
.build-in h2 { font-size: 28px; letter-spacing: -0.03em; margin-bottom: 26px; }
.build-bar { height: 6px; border-radius: 99px; background: #eee; overflow: hidden; margin-bottom: 26px; }
.build-bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .7s cubic-bezier(.3,.7,.2,1); }
.build-list { display: grid; gap: 9px; text-align: left; }
.build-list div { display: flex; align-items: center; gap: 11px; font-size: 15px; color: #bbb; transition: color .4s; }
.build-list div.on { color: var(--ink); }
.build-list i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #ddd; flex: none; transition: all .4s; }
.build-list div.on i { background: #1f9d55; border-color: #1f9d55; }
.build-skip { margin-top: 26px; font-size: 13.5px; color: var(--muted-2); }

/* ============================================================ product shell */
.prod { flex: 1; display: flex; min-height: 0; min-width: 1180px; }

.side { width: 238px; flex: none; background: #fbfaf9; border-right: 1px solid #eee; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side-logo { display: flex; align-items: center; gap: 8px; font-size: 21px; letter-spacing: -0.04em; padding: 2px 8px 16px; }
.side-logo b { font-weight: 600; margin-right: -8px; }
.side-logo .logo-mark { width: 28px; height: 20px; }
.side-logo .logo-mark i { width: 16px; height: 16px; top: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; font-size: 15px; color: #333; position: relative; transition: background .2s; cursor: pointer; }
.side-nav a svg { width: 18px; height: 18px; fill: none; stroke: #555; stroke-width: 1.8; stroke-linejoin: round; }
.side-nav a:hover { background: #f1eeeb; }
.side-nav a.on { background: #efecea; font-weight: 500; color: var(--ink); }
.side-nav a.on svg { stroke: var(--ink); }
.badge { margin-left: auto; min-width: 20px; height: 20px; border-radius: 99px; background: var(--coral); color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center; padding: 0 6px; transform: scale(0); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.badge.on { transform: scale(1); }
.side-h { margin: 20px 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #999; }
.side-rooms a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: #444; cursor: pointer; transition: background .2s; }
.side-rooms a:hover { background: #f1eeeb; }
.side-rooms a i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.side-rooms a.on { background: #f1eeeb; color: var(--ink); font-weight: 500; }
.side-rooms a em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--bad); }
.side-agents div { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: 13.5px; color: #444; }
.side-agents em { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #d8d8d8; }
.side-agents em.live { background: #2fb36b; box-shadow: 0 0 0 3px rgba(47,179,107,.15); }
.side-foot { margin-top: auto; padding-top: 14px; }
.side-foot button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; color: #777; transition: background .2s; }
.side-foot button:hover { background: #f1eeeb; color: var(--ink); }
.side-foot svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
/* The inline shield glyph is reused in several contexts; it must never inherit an unbounded size. */
.rule .who svg, .ob-hint svg, .ap-why svg, .ap-btns .waiting svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ap-why svg { width: 20px; height: 20px; stroke: var(--violet); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; flex: none; display: flex; align-items: center; gap: 16px; padding: 0 22px; border-bottom: 1px solid #efefef; }
.askbar { flex: 1; max-width: 640px; height: 40px; border: 1px solid #e3e3e3; border-radius: 10px; display: flex; align-items: center; gap: 10px; padding: 0 12px; color: #999; font-size: 15px; background: #fafafa; transition: border-color .25s, box-shadow .25s, background .25s; }
.askbar svg { width: 17px; height: 17px; fill: none; stroke: #999; stroke-width: 2; flex: none; }
.askbar input { flex: 1; border: 0; background: none; font: inherit; color: var(--ink); outline: none; min-width: 0; }
.askbar input::placeholder { color: #999; }
.askbar kbd { font: 12px var(--font); color: #999; border: 1px solid #e3e3e3; border-radius: 5px; padding: 1px 6px; background: #fff; flex: none; }
.askbar:focus-within { border-color: #b9a5f7; box-shadow: 0 0 0 4px rgba(163,92,242,.12); background: #fff; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-left: auto; flex: none; }
.bell svg { width: 20px; height: 20px; fill: none; stroke: #555; stroke-width: 1.8; stroke-linejoin: round; }
.bell .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); }
.viewas { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border: 1px solid #ececec; border-radius: 99px; transition: box-shadow .3s, border-color .3s; flex: none; cursor: pointer; }
.viewas:hover { border-color: #cfcfcf; }
.viewas .av { --s: 30px; font-size: 11px; }
.viewas small { display: block; font-size: 10.5px; color: #999; line-height: 1.1; text-align: left; }
.viewas b { display: block; font-size: 13.5px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.viewas svg { width: 11px; height: 11px; stroke: #999; fill: none; stroke-width: 2; }
.viewas.flash { border-color: #b9a5f7; box-shadow: 0 0 0 5px rgba(163,92,242,.15); }
.vmenu { position: absolute; top: 56px; right: 22px; width: 296px; background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); padding: 8px; z-index: 40; display: none; }
.vmenu.on { display: block; }
.vmenu p { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #999; padding: 8px 10px 6px; margin: 0; }
.vmenu button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; transition: background .2s; }
.vmenu button:hover { background: #f5f2f0; }
.vmenu button.on { background: #f5f0ff; }
.vmenu b { display: block; font-size: 14.5px; font-weight: 500; }
.vmenu small { display: block; font-size: 12.5px; color: #888; }
.vmenu .note { padding: 10px; font-size: 12.5px; color: #999; line-height: 1.45; border-top: 1px solid #f2f2f2; margin-top: 6px; }

.views { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; padding: 22px 26px; opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .4s; pointer-events: none; overflow-y: auto; }
.view.on { opacity: 1; transform: none; pointer-events: auto; }

/* ============================================================ deal room */
.rh { display: flex; align-items: center; gap: 16px; }
.rh-logo { width: 46px; height: 46px; border-radius: 12px; color: #fff; font-weight: 600; font-size: 22px; display: grid; place-items: center; flex: none; }
.rh-t h2 { font-size: 25px; letter-spacing: -0.03em; }
.rh-t p { font-size: 14px; color: #666; margin-top: 2px; }
.rh-t p b { font-weight: 500; color: var(--ink); }
.health { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-size: 14px; transition: background .5s, color .5s, transform .3s; flex: none; }
.health i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.health b { font-weight: 600; }
.health.ok { background: var(--ok-bg); color: var(--ok); }
.health.risk { background: var(--bad-bg); color: var(--bad); }
.health.flip { animation: pulseRisk 1.6s ease-in-out 2; }
@keyframes pulseRisk { 50% { transform: scale(1.08); } }
.rh .av-stack .av { --s: 30px; font-size: 11px; }
.rtabs { display: flex; gap: 22px; border-bottom: 1px solid #eee; margin: 18px 0 18px; font-size: 14px; color: #777; }
.rtabs span { padding-bottom: 10px; cursor: pointer; transition: color .2s; }
.rtabs span:hover { color: var(--ink); }
.rtabs span.on { color: var(--ink); border-bottom: 2px solid var(--ink); font-weight: 500; }
.rgrid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; align-items: start; }
.rcol { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.card { border: 1px solid #ececec; border-radius: 14px; padding: 16px 18px; background: #fff; min-height: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 15px; }
.card-h b { font-weight: 600; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #c9372c; text-transform: uppercase; letter-spacing: .05em; }
.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; animation: blink 1.4s infinite; }
.dtl { display: flex; flex-direction: column; gap: 4px; }
.dtl-item { display: flex; gap: 12px; padding: 10px; border-radius: 12px; transition: background 1.2s, opacity .5s; }
.dtl-item > .av, .dtl-item > .blob { flex: none; margin-top: 2px; }
.dtl-item .av { --s: 28px; font-size: 10px; }
.dtl-item.old { opacity: .55; }
.dtl-item.new { animation: tlIn .6s cubic-bezier(.2,.8,.2,1) both; background: #fdf1fb; }
.dtl-item.new.settled { background: transparent; }
.dtl-item.risk { background: #fff3f1; }
.dtl-item.good.new { background: #effaf3; }
@keyframes tlIn { from { opacity: 0; transform: translateY(-14px); max-height: 0; } to { opacity: 1; transform: none; max-height: 200px; } }
.dtl-meta { font-size: 12.5px; color: #888; }
.dtl-meta b { color: #333; font-weight: 500; }
.dtl-text { font-size: 15.5px; margin: 2px 0 6px; line-height: 1.4; }
.dtl-text b { font-weight: 600; }
.dtl-item.risk .dtl-text b { color: var(--bad); }
.dtl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cite { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #555; background: #f3f3f3; border-radius: 99px; padding: 3px 10px 3px 7px; white-space: nowrap; transition: background .2s, box-shadow .2s; }
.cite .ic { width: 13px; height: 13px; }
button.cite { cursor: pointer; }
button.cite:hover, .cite.hover { background: #ece4ff; box-shadow: 0 0 0 2px #cdb8ff; }

.oi { padding: 8px 0; border-top: 1px solid #f2f2f2; }
.oi:first-of-type { border-top: 0; padding-top: 0; }
.oi-h { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #999; margin: 0 0 6px; }
.oi-h span { background: #f0f0f0; color: #666; border-radius: 99px; padding: 0 7px; margin-left: 4px; }
.oi-empty { font-size: 13.5px; color: #bbb; margin: 0; }
.oi-row { display: flex; align-items: center; gap: 9px; font-size: 14px; padding: 5px 0; }
.oi-row.new { animation: tlIn .5s both; }
.oi-row.bad { color: var(--bad); }
.oi-row.done { color: #9a9a9a; text-decoration: line-through; }
.oi-r { margin-left: auto; font-size: 12.5px; color: #888; text-decoration: none; flex: none; }
/* `display` matters: as an inline span outside a flex parent the width and height are ignored. */
.ock { display: block; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #bbb; flex: none; transition: background .3s, border-color .3s; }
.oi-row.done .ock { background: #3fae63; border-color: #3fae63; }
.hc-big { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; color: var(--ok); transition: color .5s; }
.hc-bar { height: 8px; border-radius: 99px; background: #eee; overflow: hidden; margin: 10px 0 8px; }
.hc-bar i { display: block; height: 100%; background: #2fb36b; border-radius: 99px; transition: width 1s cubic-bezier(.3,.7,.2,1), background .6s; }
.hc.risk .hc-big { color: var(--bad); }
.hc.risk .hc-bar i { background: var(--bad); }
.hc-note { font-size: 13.5px; color: #666; margin: 0; }

/* ============================================================ inbox */
.ib { display: grid; grid-template-columns: 330px 1fr; gap: 20px; height: 100%; }
.ib-list { border-right: 1px solid #f0f0f0; padding-right: 16px; overflow-y: auto; }
.ib-h { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 14px; }
.ib-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; margin-bottom: 4px; width: 100%; text-align: left; cursor: pointer; transition: background .2s; }
.ib-item:hover { background: #faf8f6; }
.ib-item .av { --s: 26px; font-size: 10px; }
.ib-item b { display: block; font-weight: 500; font-size: 14.5px; }
.ib-item small { display: block; font-size: 13px; color: #888; }
.ib-item em { margin-left: auto; font-style: normal; font-size: 12px; color: #999; flex: none; }
.ib-item.on { background: #f5f0ff; box-shadow: inset 3px 0 0 var(--violet); }
.ib-item.did b { color: #999; font-weight: 400; }
.ap { border: 1px solid #ececec; border-radius: 16px; padding: 22px 24px; max-width: 860px; }
.ap-h { display: flex; gap: 14px; align-items: center; }
.ap-h b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.ap-h small { display: block; font-size: 13px; color: #888; margin-top: 2px; }
.ap-state { margin-left: auto; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 99px; background: var(--warn-bg); color: var(--warn); transition: all .4s; flex: none; }
.ap-state.ok { background: var(--ok-bg); color: var(--ok); }
.ap-meta { display: grid; grid-template-columns: 40px auto 40px auto; gap: 6px 10px; justify-content: start; align-items: center; margin: 18px 0 14px; font-size: 14px; }
.ap-meta span { color: #999; }
.ap-meta b { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; margin-right: 24px; }
.ap-meta .ic { width: 15px; height: 15px; }
.ap-msg { background: #f8f8fa; border: 1px solid #efeff2; border-radius: 12px; padding: 14px 16px; font-size: 15.5px; line-height: 1.55; transition: box-shadow .3s; }
.ap-msg p { margin: 0 0 6px; }
.ap-msg p:last-child { margin: 0; }
.ap-msg b { font-weight: 600; }
.ap-why { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; color: #555; line-height: 1.45; }
.ap-why svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--violet); stroke-width: 1.8; }
.ap-why b { color: var(--ink); font-weight: 600; }
.ap-src { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: #999; flex-wrap: wrap; }
.ap-btns { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; }
.ap-btns .btn { height: 42px; font-size: 15px; }
.ap-btns .waiting { margin-right: auto; font-size: 14px; color: var(--warn); display: inline-flex; align-items: center; gap: 8px; }
.ap-go { transition: transform .15s, background .3s; }
.ap-go:active { transform: scale(.94); }
.ap-go.sent { background: #1f9d55; }

/* ============================================================ executive */
.ex-hi { font-size: 28px; letter-spacing: -0.03em; margin: 2px 0 16px; }
.kpis3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.kpis3 div { border: 1px solid #ececec; border-radius: 14px; padding: 14px 16px; }
.kpis3 small { display: block; font-size: 12.5px; color: #888; }
.kpis3 b { display: block; font-size: 28px; font-weight: 500; letter-spacing: -0.02em; margin-top: 4px; }
.kpis3 b.hot { color: var(--bad); }
.ans { border: 1px solid #ececec; border-radius: 16px; padding: 16px 18px; }
.ans-h { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.ans-h b { display: block; font-size: 17px; font-weight: 600; }
.ans-h small { display: block; font-size: 12.5px; color: #888; }
.ans-row { display: grid; grid-template-columns: 180px 76px 1fr 92px 160px; gap: 14px; align-items: center; padding: 12px 10px; border-top: 1px solid #f2f2f2; font-size: 14.5px; border-radius: 10px; width: 100%; text-align: left; cursor: pointer; transition: background .25s; animation: rowIn .45s both; }
.ans-row:hover, .ans-row.on { background: #f6f1ff; }
.ans-row b { font-weight: 600; }
.ans-row .amt { color: #666; }
.ans-row .why { color: #444; }
.ans-row .pill { justify-self: start; font-size: 12px; }
.xdrill { margin-top: 14px; border: 1px solid #e6dcff; background: #fbf9ff; border-radius: 16px; padding: 14px 18px; animation: rowIn .5s both; }
.crumbs2 { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #999; margin-bottom: 12px; flex-wrap: wrap; }
.crumbs2 span { background: #fff; border: 1px solid #ece6ff; color: #444; padding: 3px 10px; border-radius: 6px; }
.crumbs2 span.cur { background: var(--ink); color: #fff; border-color: var(--ink); }
.mailb { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 12px 14px; }
.mailb-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.mailb-h .ic { width: 16px; height: 16px; }
.mailb-h b { font-weight: 500; }
.mailb-h small { color: #999; margin-left: auto; font-size: 12.5px; }
.mailb p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; }
.mailb mark { background: #ffe3a3; padding: 0 3px; border-radius: 3px; }
.drill-next { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; color: #555; }
.locked { border: 1px dashed #ddd; border-radius: 16px; padding: 30px; text-align: center; color: var(--muted); }
.locked b { display: block; color: var(--ink); font-size: 17px; font-weight: 600; margin-bottom: 6px; }

/* answer card in the ask bar results */
.qa { max-width: 900px; }
.qa-q { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.qa-q b { color: var(--ink); font-weight: 500; }
.qa-sugs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.qa-sugs button { font-size: 13.5px; border: 1px solid var(--line-2); border-radius: 99px; padding: 7px 14px; background: #fff; transition: border-color .2s, background .2s; }
.qa-sugs button:hover { border-color: var(--ink); background: var(--soft); }
.qa-rows { display: grid; gap: 2px; }
.qa-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; padding: 11px 10px; border-top: 1px solid #f2f2f2; font-size: 14.5px; }
.qa-row b { font-weight: 600; }
.quote-c { display: flex; gap: 14px; align-items: flex-start; }
.quote-c .q { font-size: 19px; line-height: 1.4; letter-spacing: -0.015em; }
.quote-c .who { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* ============================================================ agents view */
.ag-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 26px; }
.ag-card { border: 1px solid #ececec; border-radius: 16px; padding: 18px 20px; background: #fff; }
.ag-card .top { display: flex; gap: 14px; align-items: flex-start; }
.ag-card b { display: block; font-size: 16.5px; font-weight: 600; }
.ag-card small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.ag-card .sw { margin-left: auto; flex: none; }
.ag-did { margin-top: 14px; padding-top: 12px; border-top: 1px solid #f4f4f4; font-size: 13.5px; color: #555; display: flex; align-items: center; gap: 8px; }
.ag-did .ic { width: 15px; height: 15px; }
.sec-h { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 4px; }
.sec-s { font-size: 14.5px; color: var(--muted); margin: 0 0 16px; }
.audit { border: 1px solid #ececec; border-radius: 14px; overflow: hidden; }
.audit-row { display: grid; grid-template-columns: 120px 190px 1fr 130px; gap: 14px; align-items: center; padding: 12px 16px; font-size: 14px; border-top: 1px solid #f4f4f4; }
.audit-row:first-child { border-top: 0; background: #fbfafa; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #999; }
.audit-row .who { display: flex; align-items: center; gap: 8px; }
.audit-row .av { --s: 24px; font-size: 9px; }
.audit-row .where { color: var(--muted); }

/* ============================================================ popover + toast */
.pop { position: fixed; width: 420px; background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); padding: 14px 16px; z-index: 60; display: none; }
.pop.on { display: block; animation: rowIn .25s both; }
.pop-h { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #888; margin-bottom: 10px; }
.pop-h .ic { width: 16px; height: 16px; }
.pop-h b { color: var(--ink); font-weight: 500; }
.pop-h small { margin-left: auto; }
.pop-q { display: flex; gap: 12px; align-items: flex-start; }
.pop-q .q { font-size: 16px; line-height: 1.45; }
.pop-q b { display: block; font-size: 13px; color: #666; font-weight: 500; margin-top: 8px; }
.pop-f { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f2f2f2; font-size: 13px; color: var(--violet); }
.pop-f .ok { color: var(--ok); margin-left: auto; }

.toast { position: fixed; right: 26px; bottom: 24px; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14.5px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); opacity: 0; transform: translateY(12px); transition: opacity .35s, transform .35s; z-index: 70; pointer-events: none; }
.toast.on { opacity: 1; transform: none; }
.toast .check-dot { width: 24px; height: 24px; }
.toast .check-dot svg { width: 13px; height: 13px; }

/* ============================================================ phone fallback */
.phone-only { display: none; }
@media (max-width: 900px) {
  html[data-app], body.dr-app { overflow: auto; height: auto; background: #faf8fb; }
  #app-root { height: auto; }
  .phase { display: none !important; }
  .phone-only { display: block; padding: 28px 16px 48px; max-width: 560px; margin: 0 auto; text-align: center; }
  .phone-only .logo { justify-content: center; margin-bottom: 26px; }
  .phone-only h1 { font-size: 30px; line-height: 1.12; letter-spacing: -0.035em; margin-bottom: 10px; }
  .phone-only > p { color: var(--muted); font-size: 17px; line-height: 1.45; margin-bottom: 20px; }
  .phone-only video { width: 100%; aspect-ratio: 16/9; border-radius: 14px; background: #000; display: block; }
  .phone-only .note { font-size: 14px; margin: 16px 0 22px; }
  .phone-only .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #app-root *, #app-root *::before, #app-root *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
  }
}

/* sign-in error line */
.si-err { color: var(--bad); font-size: 14px; min-height: 20px; margin: -6px 0 8px; }

/* ============================================================ working controls
   Everything below makes a previously decorative control real: the bell, the account
   menu, the tab panels, the timeline composer, the agent drawer and search results. */

/* Sidebar agents are buttons now, so they need the row styling the divs had. */
.side-agents button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border-radius: 9px; font-size: 13.5px; color: #444; text-align: left; transition: background .18s; }
.side-agents button:hover { background: #f1eeeb; color: var(--ink); }
.side-agents em { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #d8d8d8; flex: none; }
.side-agents em.live { background: #2fb36b; box-shadow: 0 0 0 3px rgba(47,179,107,.15); }
.side-agents em.live.off { background: #d8d8d8; box-shadow: none; }

/* Account menu ------------------------------------------------------------- */
.side-foot { position: relative; }
.acct { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; transition: background .2s; }
.acct:hover { background: #f1eeeb; }
.acct .av { --s: 28px; font-size: 10.5px; flex: none; }
.acct span span, .acct > span:nth-child(2) { flex: 1; min-width: 0; text-align: left; }
.acct b { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct small { display: block; font-size: 11.5px; color: #8b8b8b; }
.acct svg { width: 15px; height: 15px; flex: none; fill: none; stroke: #999; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.amenu { position: absolute; bottom: 58px; left: 8px; right: 8px; background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); padding: 8px; z-index: 45; display: none; }
.amenu.on { display: block; }
.amenu p { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #999; padding: 8px 10px 6px; margin: 0; overflow: hidden; text-overflow: ellipsis; }
.amenu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: var(--ink); text-align: left; transition: background .18s; }
.amenu button:hover { background: #f5f2f0; }
.amenu button.danger:hover { background: var(--bad-bg); color: var(--bad); }
.amenu .ic, .amenu svg { width: 15px; height: 15px; flex: none; }
.amenu svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.amenu .note { border-top: 1px solid #f2f2f2; margin-top: 6px; text-transform: none; letter-spacing: 0; font-weight: 400; color: #a0a0a0; font-size: 12px; }

/* Notifications ------------------------------------------------------------ */
.bell { transition: background .2s; }
.bell:hover, .bell.open { background: #f3f0ee; }
.bell .dot { display: none; }
.bell .dot.on { display: block; animation: bellPop .4s both; }
@keyframes bellPop { from { transform: scale(0); } to { transform: scale(1); } }
.notif { position: absolute; top: 56px; right: 96px; width: 380px; max-height: 70vh; overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05); padding: 8px; z-index: 40; display: none; }
.notif.on { display: block; animation: popIn .18s both; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.notif-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.notif-h b { font-size: 14.5px; font-weight: 600; }
.notif-i { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; text-align: left; transition: background .18s; }
.notif-i:hover { background: #f7f5f3; }
.notif-i b { display: block; font-size: 13.8px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.notif-i small { display: block; font-size: 12px; color: #999; margin-top: 3px; }
.notif-i .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.notif-i.read b { color: #8a8a8a; font-weight: 400; }
.notif-i.read .notif-d { background: transparent; }
.notif-d { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 6px; }
.notif-d.bad { background: var(--bad); } .notif-d.warn { background: #e0a000; } .notif-d.ok { background: #2fb36b; }

/* Open items are buttons now ------------------------------------------------ */
.oi-row { width: 100%; text-align: left; border-radius: 8px; transition: background .16s; }
button.oi-row { padding: 5px 6px; margin-left: -6px; }
button.oi-row:hover { background: #f7f5f3; }
button.oi-row:hover .ock { border-color: #3fae63; }
.oi-t { flex: 1; min-width: 0; }
.oi-row.static { cursor: default; }

/* Timeline composer --------------------------------------------------------- */
.composer { display: flex; align-items: center; gap: 10px; padding: 0 0 14px; border-bottom: 1px solid #f2f2f2; margin-bottom: 14px; }
.composer .av { flex: none; }
.composer input { flex: 1; height: 38px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 13px; font: inherit; font-size: 14px; background: #fcfbfb; transition: border-color .2s, background .2s; }
.composer input:focus { outline: none; border-color: var(--ink); background: #fff; }
.composer .btn { flex: none; }

/* Tab panels ---------------------------------------------------------------- */
.pan { display: flex; flex-direction: column; gap: 18px; }
.pan-h b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.pan-h small { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { border: 1px solid #ececec; border-radius: 14px; padding: 15px 16px; background: #fff; }
.stat small { display: block; font-size: 12.5px; color: var(--muted); }
.stat b { display: block; font-size: 27px; font-weight: 600; letter-spacing: -0.03em; margin: 5px 0 3px; }
.stat b.ok { color: var(--ok); } .stat b.warn { color: var(--warn); } .stat b.bad { color: var(--bad); }
.stat em { font-size: 12px; color: #9a9a9a; font-style: normal; }

.spark { border: 1px solid #ececec; border-radius: 14px; padding: 16px 18px; background: #fff; }
.spark-h { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: #666; margin: 0 0 10px; }
.spark-h span { font-weight: 400; color: #a0a0a0; }
.spark svg { width: 100%; height: auto; display: block; overflow: visible; }
.spark .pt { fill: var(--violet); r: 5; opacity: 0; animation: fadeIn .3s both; }
.spark .dot { stroke: #fff; stroke-width: 3; }
.spark-f span { float: right; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 2px 10px; }
.spark-f span.ok { color: var(--ok); background: var(--ok-bg); }
.spark-f span.off { color: var(--warn); background: var(--warn-bg); }
.spark-f b.good { color: var(--ok); } .spark-f b.bad { color: var(--bad); }
.spark .stroke { fill: none; stroke: var(--violet); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.1s .1s ease-out forwards; }
.spark .fill { fill: rgba(163,92,242,.10); stroke: none; opacity: 0; animation: fadeIn .6s .7s both; }
.spark .tgt { stroke: #d8d8d8; stroke-width: 1; stroke-dasharray: 4 4; }
.spark .dot { fill: var(--violet); opacity: 0; animation: dotIn .5s 1.0s both; }
@keyframes dotIn { from { opacity: 0; r: 4; } to { opacity: 1; r: 7; } }
.spark-f { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.spark-f b { color: var(--ink); font-weight: 600; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .spark .stroke { animation: none; stroke-dashoffset: 0; }
  .spark .fill, .spark .dot { animation: none; opacity: 1; }
}

.ptab { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptab th { text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #999; padding: 0 12px 9px 0; border-bottom: 1px solid #f0f0f0; }
.ptab td { padding: 11px 12px 11px 0; border-bottom: 1px solid #f6f6f6; color: #555; }
.ptab tr:last-child td { border-bottom: 0; }
.ptab td.k { color: var(--ink); font-weight: 500; }

/* Sources tab --------------------------------------------------------------- */
.src-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.src-card { display: flex; align-items: center; gap: 14px; border: 1px solid #ececec; border-radius: 14px; padding: 15px 17px; background: #fff; text-align: left; transition: border-color .2s, transform .2s; }
.src-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.src-i { width: 38px; height: 38px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; flex: none; }
.src-i .ic { width: 19px; height: 19px; }
.src-t { flex: 1; min-width: 0; }
.src-t b { display: block; font-size: 15px; font-weight: 600; }
.src-t small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.src-m { text-align: right; flex: none; }
.src-m b { display: block; font-size: 13.5px; font-weight: 600; }
.src-m small { display: block; font-size: 11.5px; color: #a0a0a0; }

/* People tab ---------------------------------------------------------------- */
.sec-h.sm { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #999; margin: 6px 0 10px; }
.ppl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 8px; }
.ppl-card { display: flex; align-items: flex-start; gap: 13px; border: 1px solid #ececec; border-radius: 14px; padding: 15px 17px; background: #fff; text-align: left; }
button.ppl-card { transition: border-color .2s, transform .2s; }
button.ppl-card:hover { border-color: var(--line-2); transform: translateY(-1px); }
.ppl-card > span:nth-child(2) { flex: 1; min-width: 0; }
.ppl-card b { display: block; font-size: 15px; font-weight: 600; }
.ppl-card small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ppl-card em { display: block; font-size: 12.5px; color: #8a8a8a; font-style: normal; margin-top: 7px; line-height: 1.45; }
.ppl-card .pill { flex: none; align-self: center; }
.ppl-card .av { flex: none; }
/* The step-6 preview column is narrow, so its approval header stacks rather than squeezing. */
.ob-prev .ap-h { flex-wrap: wrap; }
.ob-prev .ap-state { order: 3; margin-top: 4px; }

/* Agent cards and drawer ---------------------------------------------------- */
.ag-card { position: relative; }
.ag-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.ag-card .top { width: 100%; text-align: left; }
.ag-sw { position: absolute; top: 18px; right: 20px; }
.ag-card .ag-did { width: 100%; text-align: left; }
.ag-drawer { border: 1px solid var(--ink); border-radius: 18px; padding: 22px 24px; background: #fcfbfd; margin: -12px 0 26px; animation: popIn .22s both; }
.agd-h { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.agd-h > span:nth-child(2) { flex: 1; }
.agd-h b { display: block; font-size: 18px; font-weight: 600; }
.agd-h small { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.agd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 20px; }
.agd-k { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #999; margin: 0 0 9px; }
.agd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.agd-did { border: 1px solid #ececec; border-radius: 12px; background: #fff; }
.agd-row { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 14px; border-top: 1px solid #f5f5f5; }
.agd-row:first-child { border-top: 0; }
.agd-row .ic { width: 15px; height: 15px; flex: none; }
.agd-row span { flex: 1; color: #555; }
.agd-row em { font-size: 12.5px; color: #a0a0a0; font-style: normal; flex: none; }

/* Audit filters ------------------------------------------------------------- */
.audit-f { display: flex; gap: 8px; margin-bottom: 12px; }
.audit-f button { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; color: #666; background: #fff; transition: all .18s; }
.audit-f button:hover { border-color: var(--ink); color: var(--ink); }
.audit-f button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.audit-f em { font-style: normal; font-size: 11.5px; opacity: .7; }
.audit-row .blob { flex: none; }

/* Approval editing ---------------------------------------------------------- */
.ap-edit textarea { width: 100%; border: 1.5px solid var(--ink); border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 14.5px; line-height: 1.6; resize: vertical; background: #fff; }
.ap-edit textarea:focus { outline: none; }
.ap-edit-f { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ap-edit-f span { flex: 1; font-size: 12.5px; color: var(--muted); }
.ap-tag { display: inline-block; margin-top: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 3px 10px; }

/* Search results ------------------------------------------------------------ */
.res { display: flex; flex-direction: column; }
.res-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-top: 1px solid #f3f3f3; text-align: left; width: 100%; transition: background .16s; }
.res-row:hover { background: #faf9f8; }
.res-row.static:hover { background: transparent; }
.res-row .ic { width: 16px; height: 16px; flex: none; }
.res-row > span:nth-child(2) { flex: 1; min-width: 0; }
.res-row b { display: block; font-size: 14.5px; font-weight: 500; }
.res-row small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.res-k { flex: none; font-size: 11.5px; color: #999; background: var(--soft); border-radius: 999px; padding: 3px 10px; }

/* Wider laptops get four stat columns; below that, two. */
@media (max-width: 1400px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .agd-grid { grid-template-columns: 1fr 1fr; }
}
/* A rule that cannot be turned off shows the switch, but not as something to press. */
.locked-sw { opacity: .45; cursor: not-allowed; }

/* Invite by email, on onboarding step 4 ------------------------------------- */
.inv-add { display: flex; gap: 10px; margin-top: 12px; max-width: 480px; }
.inv-add input { flex: 1; height: 44px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 15px; font: inherit; font-size: 15px; background: #fff; transition: border-color .2s; }
.inv-add input:focus { outline: none; border-color: var(--ink); }
.inv-add .btn { flex: none; height: 44px; }
.inv-x { margin-left: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; line-height: 1; color: #999; flex: none; transition: background .18s, color .18s; }
.inv-x:hover { background: var(--bad-bg); color: var(--bad); }
/* A finished step in the rail is a way back to it. */
button.ob-step { width: 100%; text-align: left; transition: background .18s; }
button.ob-step:hover { background: #efecea; color: var(--ink); }

/* Commitments tab ----------------------------------------------------------- */
.com-h { font-size: 13.5px; color: var(--muted); }
.com-h b { color: var(--ink); font-weight: 600; }
.coms { display: flex; flex-direction: column; gap: 10px; }
.com { display: flex; align-items: flex-start; gap: 13px; border: 1px solid #ececec; border-radius: 14px; padding: 16px 18px; background: #fff; }
.com.done { background: #fbfdfb; border-color: #e3efe7; }
.com-tick { flex: none; padding: 3px 0 0; }
.com-tick:hover .ock { border-color: #3fae63; }
.com.done .ock { background: #3fae63; border-color: #3fae63; }
.com-b { flex: 1; min-width: 0; }
.com-b > b { display: block; font-size: 15.5px; font-weight: 600; }
.com.done .com-b > b { color: #8f8f8f; text-decoration: line-through; }
.com-q { font-size: 14.5px; color: #555; line-height: 1.5; margin: 7px 0 0; font-style: italic; }
.com-w { display: flex; align-items: center; gap: 9px; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.com-w > span b { font-weight: 600; color: var(--ink); }
.com-due { flex: none; font-size: 12.5px; color: #888; padding-top: 2px; }
.com.done .com-due { color: var(--ok); font-weight: 600; }

/* ============================================================ sign up */
.si-link { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.si-link:hover { color: var(--violet); }
.pw-hints { display: flex; gap: 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted-2); }
.pw-hints span { display: flex; align-items: center; gap: 6px; transition: color .2s; }
.pw-hints span::before { content: ""; width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; transition: all .2s; }
.pw-hints span.met { color: var(--ok); }
.pw-hints span.met::before { background: var(--ok); border-color: var(--ok); }
.su-roles { display: grid; gap: 9px; margin-bottom: 4px; }
.su-roles .opt { padding: 13px 16px; }
.su-roles .opt b { font-size: 15px; margin-bottom: 2px; }
.su-roles .opt small { font-size: 13px; }
.su-roles.shake { animation: shake .4s; }
/* The sign-up pane is taller than the sign-in one, so it scrolls rather than clipping. */
.si-form { overflow-y: auto; padding-top: 40px; padding-bottom: 40px; }
/* The sign-up pane carries more fields than sign-in, so it is tightened to fit one screen. */
.si-up .si-form .logo { margin-bottom: 20px; font-size: 23px; }
.si-up h1 { font-size: 33px; }
.si-up .si-lede { margin-bottom: 20px; font-size: 16px; }
.si-up .fld { margin-bottom: 14px; }
.si-up .si-form .fld input { height: 46px; font-size: 15px; }
.si-up .su-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.si-up .pw-hints { margin: 2px 0 0; }
.si-up .su-roles .opt { padding: 11px 15px; }
.si-up .su-roles .opt small { line-height: 1.4; }
.si-up .si-note { margin-top: 14px; }
.si-up .si-form { padding-top: 32px; padding-bottom: 32px; }
