/* The hero demo: a fake desktop at a fixed 1280×800 "screen", scaled to fit
   its frame by demo.js. Every position in here is in those stage pixels. */
.demo { position: relative; aspect-ratio: 1280 / 800; overflow: hidden; background: #0e1417; user-select: none; -webkit-user-select: none; }
.stage { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; font-family: var(--sans); color: #e8ebef; }
.demo.live .stage { cursor: crosshair; }
.demo:not(.live) .stage { pointer-events: none; }

/* ---------- desktop ---------- */
.desk { position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(900px 520px at 18% 8%, rgba(64,140,128,.32), transparent 70%),
    radial-gradient(760px 520px at 92% 96%, rgba(168,224,95,.13), transparent 70%),
    linear-gradient(165deg, #0f1a1d 0%, #111518 55%, #121711 100%); }
.topbar { position: absolute; left: 0; right: 0; top: 0; height: 26px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 14px; font-size: 12px; font-weight: 500; color: #dfe3e8; background: rgba(6,8,10,.72); }
.topbar .clock { position: absolute; left: 50%; transform: translateX(-50%); }
.tray-icons { display: flex; gap: 9px; align-items: center; }
.tray-icons i { display: block; width: 13px; height: 9px; border: 1.6px solid #dfe3e8; border-radius: 2px; }
.tray-icons .wifi { border-radius: 9px 9px 2px 2px; border-bottom: 0; }
.tray-icons .vol { width: 8px; border-radius: 1px 5px 5px 1px; }
.tray-icons .batt { width: 18px; background: linear-gradient(90deg,#dfe3e8 70%,transparent 70%); }

.desk-icons { position: absolute; left: 22px; top: 46px; display: grid; gap: 18px; }
.dicon { width: 74px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: #eef1f4; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.folder { position: relative; width: 46px; height: 36px; border-radius: 4px 6px 6px 6px; background: linear-gradient(#5a9e93, #3f7f76); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); margin-top: 6px; }
.folder::before { content: ""; position: absolute; left: 0; top: -6px; width: 20px; height: 8px; border-radius: 3px 3px 0 0; background: #4a8c82; }
.folder.lime { background: linear-gradient(#a9cf72, #7fa84d); }
.folder.lime::before { background: #8fb75b; }
.trash { width: 32px; height: 38px; border-radius: 3px 3px 6px 6px; background: linear-gradient(#6b7480, #4c535d); position: relative; margin-top: 4px; }
.trash::before { content: ""; position: absolute; left: -5px; right: -5px; top: -5px; height: 5px; border-radius: 2px; background: #7b8490; }

.win { position: absolute; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 60px -18px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.07); }
.wc { margin-left: auto; display: flex; gap: 7px; }
.wc b { width: 11px; height: 11px; border-radius: 50%; background: #3a3f48; }
.wc b:last-child { background: #e0605a; }

/* Browser + the shop page inside it */
.browser { left: 118px; top: 46px; width: 680px; height: 560px; background: #f4f5f1; }
.b-tabs { height: 34px; display: flex; align-items: flex-end; gap: 4px; padding: 0 12px 0 10px; background: #1b1e24; }
.b-tabs .wc { align-self: center; }
.b-tab { display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 14px; border-radius: 8px 8px 0 0; background: #2b2f37; font-size: 12px; color: #e4e7eb; }
.b-tab i { width: 12px; height: 12px; border-radius: 3px; background: #1f5a43; }
.b-tab.dim { background: transparent; color: #8d939c; }
.b-url { height: 38px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: #2b2f37; }
.b-nav { color: #8d939c; font-size: 15px; }
.b-field { flex: 1; display: flex; align-items: center; gap: 8px; height: 26px; padding: 0 12px; border-radius: 13px; background: #1b1e24; font-size: 12.5px; color: #c9ced6; }
.lock { width: 9px; height: 8px; border-radius: 2px; background: #8d939c; position: relative; margin-top: 3px; }
.lock::before { content: ""; position: absolute; left: 1.5px; top: -5px; width: 6px; height: 6px; border: 1.5px solid #8d939c; border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }
.page { color: #1c2420; }
.p-head { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid #e3e6df; background: #fff; }
.p-logo { font-family: var(--display); font-weight: 800; font-size: 19px; color: #1f4a39; letter-spacing: -0.01em; }
.p-nav { font-size: 12.5px; color: #55605a; }
.p-cols { display: grid; grid-template-columns: 1fr 268px; gap: 26px; padding: 22px 28px; }
.page h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: #1c2420; }
.page h4 + label { margin-top: 0; }
.p-form h4:not(:first-child) { margin-top: 18px; }
.page label { display: block; margin: 10px 0 5px; font-size: 11.5px; color: #66706a; }
.inp { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 12px; border: 1px solid #d6dbd2; border-radius: 7px; background: #fff; font-size: 13px; color: #1c2420; }
.cardmark { font-size: 10px; font-weight: 800; font-style: italic; color: #1a3d8f; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.p-sum { align-self: start; padding: 16px; border: 1px solid #e0e4dc; border-radius: 10px; background: #fff; }
.item { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; margin-bottom: 12px; font-size: 12.5px; }
.item small { display: block; font-size: 11px; color: #7a847e; margin-top: 2px; }
.item b { font-weight: 600; }
.page .thumb { width: 38px; height: 38px; border-radius: 7px; }
.page .thumb.t1 { background: linear-gradient(135deg, #6f8f5f, #3f5f39); }
.page .thumb.t2 { background: linear-gradient(135deg, #e6dccb, #cdbfa6); }
.line { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid #edf0ea; font-size: 12.5px; color: #4a554f; }
.line.total { font-size: 14px; font-weight: 700; color: #1c2420; }
/* The bug the story is about: the button rides up over the total. */
.pay { position: relative; top: -26px; left: 16px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: #1f4a39; color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: 0 6px 14px -6px rgba(31,74,57,.7); }
.secure { margin: -14px 0 0; font-size: 11px; color: #8a938d; text-align: center; }

/* Issue tracker */
.tracker { left: 822px; top: 46px; width: 438px; height: 332px; background: #16191e; }
.t-bar { height: 32px; display: flex; align-items: center; padding: 0 12px; font-size: 12px; color: #a7adb6; background: #1d2026; border-bottom: 1px solid #262a31; }
.t-body { padding: 14px 18px; }
.t-crumb { margin: 0; font-size: 11px; color: #7f8690; }
.tracker h5 { margin: 8px 0 0; font-size: 16px; line-height: 1.3; font-weight: 600; color: #eef0f3; }
.t-id { font-family: var(--mono); font-size: 12px; font-weight: 500; color: #8f96a0; margin-right: 8px; }
.t-chips { display: flex; gap: 6px; margin: 10px 0 0; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid #333842; color: #c4c9d1; }
.chip.bug { border-color: #6b3a3a; color: #f0a4a0; background: rgba(224,96,90,.1); }
.t-desc { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: #aab0b9; }
.t-comment { position: relative; margin-top: 14px; height: 106px; border: 1px dashed #353a44; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #6f7682; overflow: hidden; }
.t-comment.got { border-style: solid; border-color: #3b4f2a; background: rgba(168,224,95,.04); }
.pasted { position: absolute; left: 12px; top: 10px; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px #2e323b; background: #f4f5f1; }
.pasted-inner { position: absolute; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; }
.pasted-note { position: absolute; left: 0; bottom: 8px; font-size: 11px; color: #a8e05f; font-family: var(--mono); }

/* Terminal */
.term { left: 822px; top: 394px; width: 438px; height: 212px; background: #0b0d10; }
.term pre { margin: 0; padding: 12px 14px; font-family: var(--mono); font-size: 11.5px; line-height: 1.75; color: #d7dbe0; white-space: pre; }
.term .pr { color: #6fcfc0; }
.term .ok { color: #a8e05f; }
.term .warn { color: #e2c46a; }
.caret { display: inline-block; width: 7px; height: 13px; background: #d7dbe0; vertical-align: -2px; }

.dock { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 10px; padding: 8px 10px; border-radius: 16px;
  background: rgba(16,18,22,.72); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 30px -10px rgba(0,0,0,.7); }
.app { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 12px; font-weight: 600; }
.app.files { background: linear-gradient(#5a9e93, #3f7f76); }
.app.web { background: radial-gradient(circle at 50% 50%, #9cc3ff 0 30%, #4f7fd9 31% 100%); }
.app.termi { background: #1c2026; color: #a8e05f; box-shadow: inset 0 0 0 1px #343944; }
.app.issues { background: linear-gradient(#6c7584, #4b5260); }
.app.snip { background: #14161b; box-shadow: inset 0 0 0 1px #343944; }
.app.snip img { width: 24px; height: 24px; }

/* ---------- the Snipux overlay ---------- */
.ov { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.ov.on { opacity: 1; pointer-events: auto; }
.ov-dim { position: absolute; inset: 0; background: rgba(8,9,12,.42); }
.ov.has-sel .ov-dim { display: none; }
.sel { position: absolute; border: 1.5px dashed #fff; box-shadow: 0 0 0 4000px rgba(8,9,12,.55); }
.sel .size { position: absolute; left: -1px; top: -30px; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: #15170e; background: #eef0f3; padding: 2px 8px; border-radius: 5px; }
.sel .h { position: absolute; background: #fff; }
.sel .h.tl, .sel .h.tr, .sel .h.bl, .sel .h.br { width: 16px; height: 16px; background: none; border: 0 solid #fff; }
.sel .h.tl { left: -4px; top: -4px; border-left-width: 3px; border-top-width: 3px; cursor: nwse-resize; }
.sel .h.tr { right: -4px; top: -4px; border-right-width: 3px; border-top-width: 3px; cursor: nesw-resize; }
.sel .h.bl { left: -4px; bottom: -4px; border-left-width: 3px; border-bottom-width: 3px; cursor: nesw-resize; }
.sel .h.br { right: -4px; bottom: -4px; border-right-width: 3px; border-bottom-width: 3px; cursor: nwse-resize; }
.sel .h.t, .sel .h.b { left: calc(50% - 13px); width: 26px; height: 6px; border-radius: 3px; cursor: ns-resize; }
.sel .h.t { top: -4px; } .sel .h.b { bottom: -4px; }
.sel .h.l, .sel .h.r { top: calc(50% - 13px); width: 6px; height: 26px; border-radius: 3px; cursor: ew-resize; }
.sel .h.l { left: -4px; } .sel .h.r { right: -4px; }
.demo.live .sel { cursor: move; }
.demo.live.drawing .sel { cursor: crosshair; }
.sel.flash { animation: sel-flash .5s ease; }
@keyframes sel-flash { 0% { background: rgba(255,255,255,0); } 30% { background: rgba(255,255,255,.35); } 100% { background: rgba(255,255,255,0); } }
.marks { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }

.chooser, .bar { position: absolute; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 12px;
  background: rgba(20,22,27,.97); box-shadow: 0 0 0 1px #2a2e36, 0 14px 30px -12px rgba(0,0,0,.8); }
.chooser { left: 50%; top: 10px; transform: translateX(-50%); }
.chooser .seg { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border-radius: 8px; font-size: 13px; color: #d4d8df; }
.chooser .seg.on { background: rgba(255,255,255,.12); }
.chooser .seg.mode { box-shadow: inset 0 0 0 1px #3a3f48; }
.chooser .seg.lit { background: rgba(168,224,95,.2); color: #a8e05f; }
.chooser svg, .bar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chooser .sep, .bar .b-sep { width: 1px; height: 22px; background: #2e323b; margin: 0 4px; }
.bar button { font: inherit; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bar .b-copy { gap: 7px; height: 32px; padding: 0 13px; border-radius: 8px; background: #a8e05f; color: #15170e; font-size: 13px; font-weight: 600; }
.bar .b-copy:hover { background: #b4e86e; }
.bar .tool { width: 34px; height: 32px; border-radius: 8px; background: transparent; color: #d4d8df; }
.bar .tool:hover { background: rgba(255,255,255,.09); }
.bar .tool.on { background: rgba(255,255,255,.17); color: #fff; }
.bar .tool.lit { background: rgba(168,224,95,.2); color: #a8e05f; }
.bar .tool.pressed, .bar .b-copy.pressed { transform: translateY(1px); filter: brightness(1.15); }
.dhint, .start, .toast, .keycap { position: absolute; white-space: nowrap; border-radius: 9px; font-size: 13px; }
.dhint { padding: 6px 11px; background: rgba(20,22,27,.95); box-shadow: 0 0 0 1px #2a2e36; color: #b4bac4; }
.dhint b { color: #eef0f3; font-weight: 600; margin-right: 8px; }
.start { left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 12px 18px; font-size: 16px; font-weight: 500; color: #15170e; background: #a8e05f; box-shadow: 0 12px 30px -10px rgba(0,0,0,.7); pointer-events: none; }
.toast { left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #eef0f3; color: #15170e; font-weight: 500; box-shadow: 0 14px 30px -10px rgba(0,0,0,.7); z-index: 5; }
.toast a { color: #3f6a12; font-weight: 600; text-decoration: underline; }
.keycap { left: 50%; top: 46%; transform: translate(-50%,-50%); display: flex; gap: 8px; padding: 12px 16px; background: rgba(12,13,16,.86); box-shadow: 0 0 0 1px #343944; z-index: 6; }
.keycap kbd { font-size: 18px; padding: 4px 12px; }
.cursor { position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -3px 0 0 -6px; z-index: 7; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.cursor.cross svg { display: none; }
.cursor.cross::before, .cursor.cross::after { content: ""; position: absolute; background: #a8e05f; }
.cursor.cross::before { left: 18px; top: 6px; width: 2px; height: 22px; }
.cursor.cross::after { left: 8px; top: 16px; width: 22px; height: 2px; }
.demo.live .cursor { display: none; }

.demo-status { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--lime); white-space: nowrap; }
.demo-status + .replay { margin-left: 12px; }
@media (max-width: 760px), (hover: none) { .demo-status { display: none; } .demo-status + .replay { margin-left: auto; } }
