/* O demo do herói: uma mini versão do Luna (canvas e chat) que o visitante usa de verdade.
   Mesmos tokens da landing (landing.css). Prefixo d-. Raios: 4 · 8 · 12 · 20 · pílula. */

.demo { position: relative; max-width: 1240px; margin: 0 auto; scroll-margin-top: 80px; }
.demo-win { position: relative; height: clamp(540px, min(60vw, 100svh - 136px), 760px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-md); box-shadow: var(--shadow-float); overflow: hidden; }
.demo.is-full { position: fixed; inset: 0; z-index: 80; max-width: none; margin: 0; padding: 10px; background: #0a0a0b66; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.demo.is-full .demo-win { height: 100%; }
.demo.is-full .demo-hint { display: none; }
html.d-lock, html.d-lock body { overflow: hidden; }

/* barra da janela */
.d-bar { height: 46px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 14px; background: var(--raised); border-bottom: 1px solid var(--line); position: relative; z-index: 6; }
.d-bar .lights { flex: none; }
.d-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; font-weight: 750; color: var(--ink2); }
.d-title img { width: 22px; height: 22px; border-radius: 6px; }
.d-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-seg { position: absolute; left: 50%; translate: -50% 0; display: flex; padding: 3px; border-radius: var(--r-pill); background: var(--recess); border: 1px solid var(--line); }
.d-seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; font: 750 12.5px var(--sans); color: var(--ink2); cursor: pointer; }
.d-seg button .ic { width: 14px; height: 14px; }
.d-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px #29222c1f, 0 0 0 1px var(--line); }
.d-bar-r { margin-left: auto; display: flex; gap: 4px; }
.d-ib { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); display: grid; place-items: center; cursor: pointer; }
.d-ib:hover { background: var(--surface); color: var(--ink); }
.d-ib:disabled { opacity: .4; cursor: default; }
.d-ib .ic { width: 16px; height: 16px; }
.d-body { position: relative; flex: 1; min-height: 0; }

/* ---------- canvas ---------- */
.cvx { position: absolute; inset: 0; overflow: hidden; background: var(--bg); touch-action: pan-y; outline: none; cursor: default; user-select: none; -webkit-user-select: none; }
.demo.is-full .cvx { touch-action: none; }
.cvx.t-hand, .cvx.is-space { cursor: grab; }
.cvx.is-panning { cursor: grabbing; }
.cvx.t-rect, .cvx.t-ellipse, .cvx.t-arrow, .cvx.t-text, .cvx.t-sticky { cursor: crosshair; touch-action: none; }
.cvx.t-hand, .cvx.t-hand * { touch-action: none; }
.d-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.d-grid { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.d-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.d-edge { fill: none; stroke: #A9A6AE; stroke-width: 2; }
.d-edge.is-flow { stroke: var(--pink); }
.d-edge.is-live { stroke: var(--pink); stroke-dasharray: 7 6; animation: d-dash 1.2s linear infinite; }
@keyframes d-dash { to { stroke-dashoffset: -26; } }
.d-edge-dot { fill: var(--surface); stroke: #A9A6AE; stroke-width: 2; }

/* card */
.nd { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-md); box-shadow: inset 0 1px 0 #fff, 0 1px 2px #29222c12, 0 10px 28px #29222c0f; transition: box-shadow .2s; contain: layout style; }
.nd.is-sel { box-shadow: 0 0 0 2px var(--pink), 0 14px 34px #29222c1f; }
.nd.is-drag { box-shadow: 0 0 0 2px var(--pink), 0 24px 50px #29222c33; z-index: 5; }
.nd.is-held { box-shadow: 0 0 0 2px var(--pink), 0 0 0 6px #fc3b7f26, 0 10px 28px #29222c0f; }
.nd.is-new { animation: d-pop .32s var(--ease); }
@keyframes d-pop { from { opacity: 0; scale: .96; } }
.nd-h { height: 42px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); background: var(--raised); border-radius: 19px 19px 0 0; cursor: grab; touch-action: none; font-size: 13px; }
.nd-h:active { cursor: grabbing; }
.nd-h > .ic { color: var(--ink2); }
.nd-h strong { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nd-h .d-av { width: 24px; height: 24px; border-radius: 50%; flex: none; }
.nd-h-r { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.nd-b { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.nd-f { height: 30px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--raised); border-radius: 0 0 19px 19px; font-size: 11px; font-weight: 700; color: var(--ink3); }
.nd-f .is-work { display: inline-flex; align-items: center; gap: 6px; color: var(--pink-ink); }
.nd-rz { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; touch-action: none; z-index: 2; }
.nd-rz::after { content: ''; position: absolute; right: 6px; bottom: 6px; width: 8px; height: 8px; border-right: 2px solid var(--line2); border-bottom: 2px solid var(--line2); border-radius: 0 0 3px 0; }
.nd.is-sel .nd-rz::after { border-color: var(--pink); }
.d-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 11px; font-weight: 750; color: var(--ink2); white-space: nowrap; }
.d-chip .ic { width: 12px; height: 12px; }
.d-chip .p-claude { color: #D97757; }
.d-chip.is-ok { color: var(--ok-ink); background: var(--ok-soft); border-color: #c4e3cf; }
.d-chip.is-pink { color: var(--pink-ink); background: var(--pink-soft); border-color: #FFB8D0; }
.d-chip.is-warn { color: var(--warn); background: var(--warn-soft); border-color: #ecd9ac; }
.d-chip .spin { width: 6px; height: 6px; }
.d-more { width: 26px; height: 26px; border: 0; background: transparent; border-radius: 8px; color: var(--ink3); display: grid; place-items: center; cursor: pointer; }
.d-more:hover { background: var(--surface); color: var(--ink); }

/* conversa (agente, canal e modo chat) */
.d-feed { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 12px; font-size: 13px; line-height: 1.5; scrollbar-width: thin; user-select: text; -webkit-user-select: text; }
.d-day { align-self: center; padding: 2px 10px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); font-size: 11px; font-weight: 700; color: var(--ink3); }
.d-me { align-self: flex-end; max-width: 86%; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; animation: d-in .28s var(--ease); }
.d-me p { padding: 8px 12px; border-radius: 12px 12px 4px 12px; background: var(--ink); color: #fff; font-weight: 600; }
.d-me .d-who { color: var(--ink3); }
.d-ag { display: flex; gap: 9px; animation: d-in .28s var(--ease); }
.d-ag > img { width: 26px; height: 26px; border-radius: 50%; flex: none; margin-top: 1px; }
.d-ag > div { flex: 1; min-width: 0; }
.d-ag p { margin-top: 2px; color: #2A292C; font-weight: 550; }
.d-ag p + p { margin-top: 6px; }
.d-who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; }
.d-who time { font-weight: 650; color: var(--ink3); font-size: 11px; }
.d-who .lead { font-size: 10px; }
.d-feed code { font: 400 11.5px var(--mono); color: #4A2E7A; background: #F1EDF8; padding: 1px 5px; border-radius: 4px; }
.d-me code { background: #ffffff26; color: #fff; }
.d-at { color: var(--pink-ink); font-weight: 800; }
.d-hand { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); font-size: 11.5px; font-weight: 650; color: var(--ink2); animation: d-in .28s var(--ease); }
.d-hand .ic { width: 14px; height: 14px; color: var(--pink); }
.d-typing { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; color: var(--pink-ink); }
.d-typing img { width: 20px; height: 20px; border-radius: 50%; }
@keyframes d-in { from { opacity: 0; transform: translateY(6px); } }

.d-steps { margin-top: 7px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: 3px 5px 5px; }
.d-steps-h { display: flex; align-items: center; gap: 8px; padding: 7px 7px 5px; font-size: 12px; font-weight: 800; }
.d-steps-h time { margin-left: auto; font-size: 11px; color: var(--ink3); font-weight: 650; }
.d-steps-h .ic { width: 14px; height: 14px; color: #fff; background: var(--pink); border-radius: 4px; padding: 2px; }
.d-steps li { display: flex; align-items: center; gap: 8px; min-height: 28px; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 650; color: var(--ink3); border: 1px solid transparent; }
.d-steps li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.d-steps li time { margin-left: auto; font-size: 10.5px; flex: none; }
.d-steps li .ic { width: 14px; height: 14px; flex: none; color: #fff; background: var(--pink); border-radius: 4px; padding: 2px; }
.d-steps li .d-todo { width: 14px; height: 14px; flex: none; border-radius: 4px; border: 1.5px solid var(--line2); }
.d-steps li.is-now { background: var(--pink-soft); border-color: #FFB8D0; color: var(--ink); font-weight: 800; }
.d-steps li.is-now .spin { margin: 0 3px; }
.d-steps li.is-now em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--pink-ink); flex: none; }
.d-steps li.is-todo { color: var(--ink2); }
.d-steps li.is-bad { color: var(--bad); }
.d-steps li.is-bad .ic { background: var(--bad); }
.d-steps li code { font-size: 10.5px; padding: 0 4px; }
.d-bars { display: flex; gap: 3px; padding: 6px 7px 2px; }
.d-bars i { width: 12px; height: 4px; border-radius: 2px; background: var(--line2); }
.d-bars i.on { background: var(--pink); }

.d-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 0; }
.d-chips button { height: 28px; padding: 0 11px; border-radius: var(--r-pill); border: 1px solid #FFB8D0; background: var(--pink-soft); color: var(--pink-ink); font: 750 11.5px var(--sans); cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.d-chips button:hover { background: #FFCFE0; }
.d-comp { display: flex; align-items: flex-end; gap: 8px; margin: 8px 12px 12px; padding: 7px 7px 7px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--stroke); box-shadow: inset 0 1px 2px #29222c0a; }
.d-comp:focus-within { border-color: var(--pink); box-shadow: 0 0 0 3px #fc3b7f1f; }
.d-comp textarea { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; font: 600 13px/1.45 var(--sans); color: var(--ink); padding: 4px 0; max-height: 84px; user-select: text; -webkit-user-select: text; }
.d-comp textarea::placeholder { color: var(--ink3); }
.d-send { width: 28px; height: 28px; flex: none; border: 0; border-radius: 8px; background: var(--pink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.d-send .ic { width: 15px; height: 15px; }
.d-send.is-stop { background: var(--raised); color: var(--ink); border: 1px solid var(--line); }
.d-send.is-stop::after { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--ink); }
.d-send.is-stop .ic { display: none; }

/* quadro */
.d-bb { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--ink2); }
.d-bb .d-ck { display: inline-flex; align-items: center; gap: 5px; }
.d-bb .d-ck i { width: 14px; height: 14px; border-radius: 4px; background: var(--pink); display: grid; place-items: center; }
.d-bb .d-ck i::after { content: ''; width: 6px; height: 3px; border: 2px solid #fff; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; }
.d-bb .d-sum { margin-left: auto; color: var(--ink3); }
.d-addt { height: 26px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--pink); color: #fff; font: 800 11.5px var(--sans); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.d-addt .ic { width: 12px; height: 12px; }
.d-cols { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 10px; }
.d-col { min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 8px; border-radius: 12px; background: var(--raised); border: 1px solid transparent; overflow-y: auto; scrollbar-width: none; transition: background .15s, border-color .15s; }
.d-col.is-over { background: var(--pink-soft); border-color: #FFB8D0; }
.d-col-h { display: flex; align-items: center; gap: 6px; padding: 2px 3px; font-size: 11.5px; font-weight: 800; }
.d-col-h span { color: var(--ink3); font-weight: 700; }
.d-tk { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 9px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px #29222c0d; cursor: grab; touch-action: none; font-size: 11.5px; }
.d-tk:hover { border-color: var(--line2); }
.d-tk.is-new { animation: d-in .4s var(--ease); }
.d-tk.is-moved { animation: d-flash 1s var(--ease); }
@keyframes d-flash { 0% { box-shadow: 0 0 0 2px var(--pink); } 100% { box-shadow: 0 1px 2px #29222c0d; } }
.d-tk.is-ghost { position: fixed; z-index: 90; pointer-events: none; box-shadow: 0 18px 40px #29222c33; rotate: 2deg; cursor: grabbing; }
.d-tk.is-lift { opacity: .35; }
.d-tk-top { display: flex; align-items: center; gap: 6px; }
.d-tk-id { font-size: 10.5px; font-weight: 800; color: var(--pink-ink); }
.d-tk-area { font-size: 10.5px; font-weight: 650; color: var(--ink3); }
.d-tk-top img { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; }
.d-tk strong { font-size: 12px; font-weight: 800; line-height: 1.3; }
.d-tk .badge { font-size: 10px; padding: 2px 7px; }
.d-tk-br { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; font: 400 10.5px var(--mono); color: var(--ink2); }
.d-tk-br .ic { width: 11px; height: 11px; }
.d-tk-note { font-size: 10.5px; font-weight: 750; color: var(--warn); }
.d-tk-ok { font-size: 10.5px; font-weight: 750; color: var(--ok-ink); }
.d-newt { display: flex; gap: 6px; }
.d-newt input { flex: 1; min-width: 0; height: 30px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--pink); font: 650 12px var(--sans); outline: 0; }

/* navegador */
.d-brbar { display: flex; align-items: center; gap: 4px; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.d-brbar .d-ib { width: 28px; height: 28px; }
.d-brbar .d-ib .ic { width: 15px; height: 15px; }
.d-url { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-pill); background: var(--raised); border: 1px solid var(--line); }
.d-url .ic { width: 12px; height: 12px; color: var(--ink3); }
.d-url input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 650 12px var(--sans); color: var(--ink2); user-select: text; -webkit-user-select: text; }
.d-held { display: none; align-items: center; gap: 7px; padding: 6px 12px; background: var(--pink-soft); color: var(--pink-ink); font-size: 11.5px; font-weight: 800; }
.d-held img { width: 18px; height: 18px; border-radius: 50%; }
.is-held .d-held { display: flex; }
.d-page { position: relative; flex: 1; min-height: 0; background: #fff; overflow: hidden; border-radius: 0 0 19px 19px; }
.d-page iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.d-page-wait { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink3); }
.d-load { position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--pink); z-index: 2; transition: width .5s var(--ease), opacity .3s .2s; }

/* computador */
.d-scr { position: relative; flex: 1; min-height: 0; margin: 10px 10px 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(160deg, #BED6F9, #D8E5FB 55%, #B2C0F4); }
.d-menu { height: 18px; display: flex; align-items: center; gap: 12px; padding: 0 10px; background: #ffffffa6; font-size: 9.5px; font-weight: 700; color: #333; }
.d-menu b { font-weight: 800; }
.d-menu span:last-child { margin-left: auto; }
.d-term { position: absolute; left: 6%; top: 15%; width: 70%; bottom: 8%; display: flex; flex-direction: column; border-radius: 9px; background: #1E1D22; box-shadow: 0 14px 34px #1b2a5a4d; overflow: hidden; }
.d-term-h { height: 22px; flex: none; display: flex; align-items: center; gap: 5px; padding: 0 8px; background: #2B2A30; font-size: 9.5px; font-weight: 700; color: #a9a7b0; }
.d-term-h i { width: 7px; height: 7px; border-radius: 50%; background: #4a4950; }
.d-term-h span { margin: 0 auto; }
.d-term pre { flex: 1; margin: 0; padding: 8px 10px; overflow: hidden; font: 400 10.5px/1.55 var(--mono); color: #E9E7EE; white-space: pre-wrap; display: flex; flex-direction: column; justify-content: flex-end; }
.d-term .g { color: #7EDB9A; } .d-term .r { color: #FF8A80; } .d-term .m { color: #a9a7b0; } .d-term .p { color: #FF86B2; }
.d-sim { position: absolute; right: 5%; top: 11%; width: 20%; aspect-ratio: 9 / 19; border-radius: 14px; background: #0b0b0c; padding: 3px; box-shadow: 0 14px 30px #1b2a5a4d; }
.d-sim > div { width: 100%; height: 100%; border-radius: 11px; background: #fff; overflow: hidden; }
.d-sim img { width: 100%; height: 100%; object-fit: cover; }
.d-ptr { position: absolute; left: 40%; top: 60%; display: flex; gap: 2px; transition: left .9s var(--ease), top .9s var(--ease); filter: drop-shadow(0 2px 3px #0003); pointer-events: none; z-index: 3; }
.d-ptr span { margin-top: 14px; display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 2px; border-radius: var(--r-pill); background: #D01A5C; color: #fff; font-size: 10px; font-weight: 800; }
.d-ptr span img { width: 14px; height: 14px; border-radius: 50%; }
.d-cbar { display: flex; align-items: center; gap: 8px; padding: 9px 10px; }
.d-cbar img { width: 26px; height: 26px; border-radius: 50%; }
.d-cbar > span { flex: 1; min-width: 0; }
.d-cbar strong { display: block; font-size: 12px; font-weight: 800; }
.d-cbar small { display: block; font-size: 11px; font-weight: 600; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-btn { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--stroke); background: linear-gradient(180deg, #fff, #F4F4F1); font: 750 11.5px var(--sans); color: var(--ink); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.d-btn .ic { width: 13px; height: 13px; }
.d-btn.is-pink { background: linear-gradient(180deg, #FF4F8D, #F5357A); border-color: #FF86B2; color: #fff; }
.d-btn:hover { filter: brightness(1.03); }
.d-btn:disabled { opacity: .5; cursor: default; }
.nd.is-you .d-scr, .nd.is-you .d-phone { box-shadow: 0 0 0 3px var(--pink); }

/* emulador */
.d-devf { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; }
.d-devf .d-sel { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 4px 10px; border-radius: 8px; background: var(--raised); border: 1px solid var(--line); font-size: 12px; font-weight: 750; }
.d-devf small { font-size: 10px; font-weight: 650; color: var(--ink3); }
.d-phone { position: relative; flex: 1; min-height: 0; margin: 10px auto 0; aspect-ratio: 402 / 874; max-width: calc(100% - 20px); border-radius: 34px; padding: 7px; background: #0b0b0c; box-shadow: 0 0 0 1px #8d8c88, 0 10px 26px #1b2a5a33; }
.d-phone::after { content: ''; position: absolute; left: 50%; top: 15px; width: 30%; height: 17px; translate: -50% 0; border-radius: 99px; background: #000; z-index: 3; }
.d-app { position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden; background: #F3E3C3; }

/* nota, todo */
.d-note { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; background: #FFF6D6; border-radius: 0 0 19px 19px; font-size: 13px; line-height: 1.55; outline: none; user-select: text; -webkit-user-select: text; cursor: text; }
.d-note h4 { margin: 0 0 6px; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.d-note ul { margin: 6px 0 8px 18px; list-style: disc; font-weight: 600; }
.d-note p { font-weight: 600; margin: 0 0 6px; }
.d-note:focus { box-shadow: inset 0 0 0 2px #FFD36B; }
.d-todo-l { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.d-todo-l label { display: flex; align-items: center; gap: 9px; padding: 6px 6px; border-radius: 8px; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.d-todo-l label:hover { background: var(--raised); }
.d-todo-l input { appearance: none; width: 16px; height: 16px; flex: none; margin: 0; border-radius: 4px; border: 1.5px solid var(--line2); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.d-todo-l input:checked { background: var(--pink); border-color: var(--pink); }
.d-todo-l input:checked::after { content: ''; width: 7px; height: 3px; border: 2px solid #fff; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; }
.d-todo-l input:checked + span { color: var(--ink3); text-decoration: line-through; }
.d-todo-add { display: flex; gap: 6px; padding: 0 10px 10px; }
.d-todo-add input { flex: 1; min-width: 0; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--stroke); font: 600 12px var(--sans); outline: 0; background: var(--surface); user-select: text; -webkit-user-select: text; }
.d-todo-add input:focus { border-color: var(--pink); }

/* gatilho de rotina, worktree, cards de trilha */
.d-kv { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.d-kv > div { display: flex; align-items: center; gap: 8px; }
.d-kv small { font-size: 10.5px; font-weight: 700; color: var(--ink3); min-width: 58px; }
.d-kv b { font-weight: 800; }
.d-kv code { font: 400 11px var(--mono); color: var(--ink2); }
.d-runs { display: flex; gap: 3px; }
.d-runs i { width: 7px; height: 16px; border-radius: 2px; background: var(--ok); }
.d-runs i.bad { background: var(--bad); }
.d-runs i.run { background: var(--pink); animation: pulse 1.1s infinite; }
.d-acts { display: flex; gap: 6px; padding: 0 12px 12px; margin-top: auto; flex-wrap: wrap; }
.d-diff { font: 400 11px var(--mono); }
.d-diff .add { color: var(--ok-ink); } .d-diff .del { color: var(--bad); }
.d-files { display: flex; flex-direction: column; gap: 3px; font: 400 10.5px var(--mono); color: var(--ink2); }
.d-field { width: 100%; min-height: 30px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--stroke); background: var(--surface); font: 600 12px var(--sans); color: var(--ink); outline: 0; resize: none; user-select: text; -webkit-user-select: text; }
.d-field.is-mono { font: 400 12px var(--mono); }
.d-field:focus { border-color: var(--pink); }

/* formas (estilo Miro) */
.sh { position: absolute; left: 0; top: 0; }
.sh-rect, .sh-ellipse { border: 2.5px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-radius: 8px; }
.sh-ellipse { border-radius: 50%; }
.sh-sticky { background: var(--c); border-radius: 4px; box-shadow: 0 1px 1px #0000000f, 0 10px 20px -8px #29222c40; padding: 14px; font: 700 16px/1.35 var(--sans); color: #2A292C; }
.sh-text { font: 750 20px/1.3 var(--sans); color: var(--c); padding: 4px 6px; }
.sh-text[data-c="white"] { --c: var(--ink) !important; }
.sh [contenteditable] { outline: none; min-height: 1.3em; width: 100%; height: 100%; overflow: hidden; word-break: break-word; user-select: text; -webkit-user-select: text; }
.sh-label { display: grid; place-items: center; text-align: center; height: 100%; padding: 8px; font: 750 14px/1.3 var(--sans); color: #2A292C; }
.sh-arrow { overflow: visible; }
.sh-arrow line { stroke: var(--c); stroke-width: 3; stroke-linecap: round; }
.sh-arrow .hit { stroke: transparent; stroke-width: 18; }
.sh.is-sel { outline: 2px solid var(--pink); outline-offset: 3px; }
.sh-arrow.is-sel { outline: 0; }
.sh-arrow.is-sel line:not(.hit) { filter: drop-shadow(0 0 0 var(--pink)) drop-shadow(0 0 2px #fc3b7f); }
.sh .nd-rz { right: -10px; bottom: -10px; }
.sh .nd-rz::after { border-color: var(--pink); }
.sh:not(.is-sel) .nd-rz { display: none; }

/* cromo do canvas: ferramentas, dock, zoom, barra de forma */
.d-tools, .d-dock, .d-zoom, .d-shbar, .d-menu-more { position: absolute; z-index: 4; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 1px 2px #29222c14, 0 10px 26px #29222c1a; }
.d-tools { left: 12px; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; gap: 2px; padding: 4px; border-radius: 12px; }
.d-tools hr { width: 70%; height: 1px; margin: 3px auto; border: 0; background: var(--line); }
.d-tb { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); display: grid; place-items: center; cursor: pointer; position: relative; }
.d-tb .ic { width: 17px; height: 17px; }
.d-tb:hover { background: var(--raised); color: var(--ink); }
.d-tb[aria-pressed="true"] { background: var(--pink-soft); color: var(--pink-ink); }
.d-tb:disabled { opacity: .35; cursor: default; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: calc(100% + 8px); top: 50%; translate: 0 -50%; padding: 4px 8px; border-radius: 8px; background: var(--ink); color: #fff; font: 700 11px var(--sans); white-space: nowrap; pointer-events: none; z-index: 9; }
.d-dock [data-tip]:hover::after, .d-zoom [data-tip]:hover::after { left: 50%; top: auto; bottom: calc(100% + 8px); translate: -50% 0; }
.d-dock { left: 50%; bottom: 14px; translate: -50% 0; display: flex; align-items: center; gap: 3px; padding: 6px; border-radius: 20px; }
.d-dock .d-tb { width: 38px; height: 38px; border-radius: 12px; }
.d-dock .d-tb .ic { width: 16px; height: 16px; }
.d-dock .sep { width: 1px; height: 24px; margin: 0 4px; background: var(--line); }
.d-zoom { right: 12px; bottom: 14px; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px; }
.d-zoom output { min-width: 50px; height: 32px; display: grid; place-items: center; border-radius: 8px; font: 750 12px var(--sans); color: var(--ink2); cursor: pointer; }
.d-zoom output:hover { background: var(--raised); }
.d-shbar { left: 50%; top: 12px; translate: -50% 0; display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 12px; }
.d-shbar[hidden], .d-menu-more[hidden] { display: none; }
.d-sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line2); background: var(--c); cursor: pointer; padding: 0; }
.d-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--pink); }
.d-shbar .sep { width: 1px; height: 20px; margin: 0 3px; background: var(--line); }
.d-menu-more { bottom: 70px; left: 50%; width: 236px; padding: 5px; border-radius: 12px; display: flex; flex-direction: column; }
.d-menu-more button { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font: 700 12.5px var(--sans); color: var(--ink); cursor: pointer; text-align: left; }
.d-menu-more button:hover { background: var(--raised); }
.d-menu-more .ic { color: var(--ink2); }
.d-toast { position: absolute; left: 50%; top: 14px; translate: -50% 0; z-index: 7; max-width: min(460px, calc(100% - 24px)); padding: 8px 14px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; box-shadow: 0 10px 24px #0003; opacity: 0; transition: opacity .25s; pointer-events: none; text-align: center; }
.d-toast.is-on { opacity: 1; }
.d-wheel { position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 7; padding: 10px 16px; border-radius: 12px; background: #222124e6; color: #fff; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .2s; pointer-events: none; }
.d-wheel.is-on { opacity: 1; }

/* ---------- modo chat: em css/chat.css ---------- */

@media (max-width: 720px) {
  .demo-win { height: 600px; border-radius: var(--r-md); }
  .demo.is-full .demo-win { border-radius: 14px; }
  .demo.is-full { padding: 0; }
  .d-bar { padding: 0 6px 0 10px; gap: 6px; }
  .d-bar .lights, .d-title span { display: none; }
  .d-seg { position: static; translate: none; }
  .d-seg button { padding: 0 11px; }
  .d-tools { top: 10px; translate: none; left: 8px; flex-direction: row; flex-wrap: nowrap; max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
  .d-tools::-webkit-scrollbar { display: none; }
  .d-tools hr { display: none; }
  .d-tools .d-tb { width: 30px; height: 32px; flex: none; }
  .d-dock { max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; bottom: 10px; }
  .d-dock .d-tb { width: 36px; height: 36px; flex: none; }
  .d-zoom { display: none; }
  .d-shbar { top: auto; bottom: 10px; max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
  .d-shbar:not([hidden]) ~ .d-dock { visibility: hidden; }
  .d-toast { top: 56px; }
  .d-menu-more { bottom: 62px; }
  [data-tip]:hover::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .d-edge.is-live { animation: none; }
}

/* a tela de plantão do Prumo no iPhone */
.p-app { position: relative; width: 100%; height: 100%; background: #fff; display: flex; flex-direction: column; font-family: -apple-system, BlinkMacSystemFont, 'Inter', var(--sans); color: #17171B; }
.p-status { height: 9%; min-height: 30px; display: flex; align-items: flex-end; padding: 0 22px 4px; font-size: 11px; }
.p-status b { font-weight: 650; }
.p-body { flex: 1; min-height: 0; overflow: hidden; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.p-h { font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.p-sub { display: flex; align-items: center; gap: 5px; margin-top: -4px; font-size: 11px; font-weight: 500; color: #82828C; }
.p-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #15803D; }
.p-dot.is-bad { background: #C2261C; } .p-dot.is-rev { background: #A1A1AA; }
.p-card { position: relative; border: 1px solid #E7E7EA; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.p-card small { font-size: 10px; font-weight: 550; color: #82828C; }
.p-card b { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.p-card span { font-size: 10.5px; color: #52525B; line-height: 1.35; }
.p-card svg { width: 100%; height: 34px; margin-top: 4px; }
.p-card.is-warn { background: #FFF7E6; border-color: #F5DFB0; }
.p-card.is-warn small { color: #B45309; }
.p-mk { position: relative; height: 12px; }
.p-mk em { position: absolute; top: 0; transform: translateX(-50%); font: 600 8.5px var(--mono); font-style: normal; color: #C2185B; }
.p-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.p-list { border: 1px solid #E7E7EA; border-radius: 10px; }
.p-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.p-row + .p-row { border-top: 1px solid #EFEFF1; }
.p-row span { min-width: 0; }
.p-row b { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-row small { font-size: 10px; color: #82828C; }
.p-row code { font: 500 9.5px var(--mono); }
.p-tabs { display: flex; justify-content: space-around; border-top: 1px solid #EFEFF1; padding: 6px 6px 14px; background: #FAFAFA; }
.p-tabs span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9.5px; font-weight: 600; color: #A1A1AA; padding: 2px 8px; border-radius: 8px; cursor: pointer; }
.p-tabs span.is-on { color: #17171B; }
.p-tabs span:focus-visible { outline: 2px solid var(--pink); }
.p-tabs .ic { width: 16px; height: 16px; }
.p-app.is-mini { font-size: 50%; }
.p-app.is-mini .p-status { min-height: 0; height: 7%; padding: 0 8px 1px; font-size: 5px; }
.p-app.is-mini .p-body { padding: 4px 5px; gap: 3px; }
.p-app.is-mini .p-h { font-size: 8px; }
.p-app.is-mini .p-sub, .p-app.is-mini .p-card small, .p-app.is-mini .p-card span, .p-app.is-mini .p-mk em { font-size: 4.5px; }
.p-app.is-mini .p-card { padding: 3px 4px; border-radius: 4px; }
.p-app.is-mini .p-card b { font-size: 6.5px; }
.p-app.is-mini .p-card svg { height: 14px; margin-top: 1px; }
.p-app.is-mini .p-mk { height: 5px; }
.p-app.is-mini .p-dot { width: 3px; height: 3px; }
.p-app.is-mini .p-two { gap: 3px; }
.p-app.is-mini .p-tabs { padding: 2px 2px 5px; }
.p-app.is-mini .p-tabs span { font-size: 4px; padding: 1px 2px; }
.p-app.is-mini .p-tabs .ic { width: 7px; height: 7px; }

/* arquivos no canvas: PDF com páginas folheáveis e imagem */
.d-fv { position: relative; flex: 1; min-height: 0; margin: 10px 10px 0; border-radius: 12px; background: var(--raised) radial-gradient(circle, #d6d4ce 1px, transparent 1.3px) 0 0 / 14px 14px; display: grid; place-items: center; padding: 12px; overflow: hidden; cursor: zoom-in; }
.d-fv.is-img { padding: 8px; }
.d-fv.is-img img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 1px 2px #29222c1f, 0 8px 18px -8px #29222c40; pointer-events: none; }
.d-fmeta { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; min-width: 0; }
.d-fmeta > span { flex: 1; min-width: 0; }
.d-fmeta strong { display: block; font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-fmeta small { display: block; font-size: 11px; font-weight: 650; color: var(--ink3); }
.d-facts { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px 12px; }
.d-facts .d-btn { margin-left: auto; }
.d-ib.is-box { width: 30px; height: 28px; border: 1px solid var(--line); background: var(--surface); }
.d-pgn { min-width: 44px; text-align: center; font-size: 11.5px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.nd.is-compare { box-shadow: 0 0 0 2px var(--pink), 0 0 0 6px #fc3b7f26, 0 10px 28px #29222c0f; }

/* a página do PDF: A4 em HTML, com o texto em unidades do container para ficar nítido em qualquer zoom */
.pf-page { position: relative; height: 100%; max-width: 100%; aspect-ratio: 210 / 297; background: #fff; border-radius: 2px; box-shadow: 0 1px 2px #29222c1f, 0 10px 24px -10px #29222c4d; container-type: inline-size; overflow: hidden; color: #1D1C21; font-family: var(--sans); text-align: left; }
@supports not (aspect-ratio: 1) { .pf-page { width: 70%; } }
.pf-page.is-fwd { animation: pf-in .28s var(--ease); } .pf-page.is-back { animation: pf-in-b .28s var(--ease); }
@keyframes pf-in { from { opacity: .3; translate: 6% 0; } } @keyframes pf-in-b { from { opacity: .3; translate: -6% 0; } }
.pf-in { padding: 8cqw 8.5cqw; display: flex; flex-direction: column; gap: 2.2cqw; font-size: 3.15cqw; line-height: 1.5; font-weight: 500; }
.pf-top { display: flex; align-items: center; gap: 1.6cqw; padding-bottom: 2.4cqw; margin-bottom: 2cqw; border-bottom: .3cqw solid #EDEDF0; font-size: 2.6cqw; font-weight: 700; color: #6B6B75; }
.pf-top img { width: 3.6cqw; height: 3.6cqw; }
.pf-top em { margin-left: auto; font-style: normal; font-weight: 600; }
.pf-kick { font-size: 2.6cqw; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6B6B75; }
.pf-in h1 { font-size: 7cqw; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.pf-meta { color: #6B6B75; font-size: 2.9cqw; margin-top: -1cqw; }
.pf-in h2 { margin-top: 2.6cqw; font-size: 3.5cqw; font-weight: 800; color: #D81B60; }
.pf-in h2.pf-first { margin-top: 0; font-size: 5.2cqw; color: #1D1C21; letter-spacing: -.01em; }
.pf-in code { font: 500 .92em var(--mono); background: #F3F3F5; padding: 0 .8cqw; border-radius: .8cqw; }
.pf-in b { font-weight: 800; }
.pf-del { list-style: none; display: flex; flex-direction: column; border: .3cqw solid #EDEDF0; border-radius: 1.6cqw; }
.pf-del li { display: grid; grid-template-columns: 20cqw 1fr; gap: 2cqw; padding: 1.6cqw 2.4cqw; }
.pf-del li + li { border-top: .3cqw solid #EDEDF0; }
.pf-del b { color: #6B6B75; font-size: 2.8cqw; }
.pf-box { margin-top: auto; padding: 2.2cqw 2.6cqw; border-radius: 1.6cqw; background: #F6F6F8; color: #45454D; font-size: 2.9cqw; }
.pf-ac { padding-left: 5cqw; display: flex; flex-direction: column; gap: 1.8cqw; }
.pf-ac li::marker { font-weight: 800; color: #D81B60; }
.pf-tb { width: 100%; border-collapse: collapse; font-size: 2.95cqw; }
.pf-tb th { text-align: left; font-size: 2.5cqw; font-weight: 800; color: #6B6B75; text-transform: uppercase; letter-spacing: .05em; padding: 0 0 1.4cqw; border-bottom: .3cqw solid #E2E2E7; }
.pf-tb td { padding: 1.7cqw 0; border-bottom: .3cqw solid #EDEDF0; }
.pf-tb td:first-child { font-weight: 800; width: 24cqw; } .pf-tb td:last-child { color: #6B6B75; text-align: right; } .pf-tb th:last-child { text-align: right; }
.pf-tl { list-style: none; display: flex; flex-direction: column; gap: 1.4cqw; border-left: .4cqw solid #EDEDF0; padding-left: 3cqw; }
.pf-tl b { display: inline-block; width: 11cqw; font: 600 2.9cqw var(--mono); color: #D81B60; }
.pf-num { position: absolute; right: 8.5cqw; bottom: 5cqw; font-size: 2.6cqw; font-weight: 700; color: #9A9AA3; }

/* o visualizador do Abrir */
.d-viewer { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; background: #29222cb8; backdrop-filter: blur(3px); animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.d-vbar { flex: none; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 10px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.d-vbar > .ic { width: 16px; height: 16px; color: var(--ink2); }
.d-vbar strong { flex: 1; min-width: 0; font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-vstage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 22px; }
.d-vstage .pf-page { box-shadow: 0 20px 50px #0000004d; }
.d-vstage img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 50px #0000004d; }

/* o menu do clipe */
.d-menu-file button { height: auto; min-height: 44px; padding: 6px 10px; }
.d-menu-file button span { display: flex; flex-direction: column; }
.d-menu-file small { font-size: 11px; font-weight: 650; color: var(--ink3); }
.d-menu-file p { padding: 6px 10px 4px; border-top: 1px solid var(--line); margin-top: 3px; font-size: 11px; font-weight: 650; color: var(--ink3); }
