/* The install guide. Everything that moves or reacts is CSS: the site allows no inline script. */
.install { --ok: #2f9e5b; --okbg: #e7f6ec; --win: #ffffff; --winbar: #ececec; --winline: #dcdcdc; --wintext: #1d1d1f; --blue: #0a7cff; --hint: #f2b84b; }
@media (prefers-color-scheme: dark) {
  .install { --okbg: #16301f; --win: #2a2928; --winbar: #353432; --winline: #45433f; --wintext: #ececec; }
}
.install h1 .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 80%; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-8deg); } }

/* Mac or Windows */
.os-in { position: absolute; opacity: 0; pointer-events: none; }
.os-pick { display: inline-flex; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); margin: 0 0 28px; }
.os-pick label { cursor: pointer; padding: 10px 22px; border-radius: 999px; font-weight: 600; color: var(--muted); transition: background .25s, color .25s, transform .15s; user-select: none; }
.os-pick label:active { transform: scale(.96); }
#os-mac:checked ~ .os-pick label[for="os-mac"], #os-win:checked ~ .os-pick label[for="os-win"] { background: var(--fg); color: var(--bg); }
#os-mac:focus-visible ~ .os-pick label[for="os-mac"], #os-win:focus-visible ~ .os-pick label[for="os-win"] { outline: 2px solid var(--accent); outline-offset: 2px; }
#os-mac:checked ~ .guide-win, #os-win:checked ~ .guide-mac { display: none; }
.guide { animation: rise .45s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* The steps */
.guide { counter-reset: step done; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.step { counter-increment: step; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 18px 74px; transition: border-color .3s, box-shadow .3s, transform .3s; }
.step::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--bg); border: 2px solid var(--line); transition: background .3s, color .3s, border-color .3s; }
.step h2 { margin: 6px 0 6px; font-size: 20px; }
.step p { margin: 6px 0; }
.step .why { color: var(--muted); font-size: 15px; }
.step:has(.tick:checked) { border-color: var(--ok); box-shadow: 0 0 0 3px var(--okbg); }
.step:has(.tick:checked)::before { content: "✓"; background: var(--ok); border-color: var(--ok); color: #fff; animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
.tick { position: absolute; opacity: 0; pointer-events: none; }
.guide .tick:checked { counter-increment: done; }
.done { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; cursor: pointer; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: 15px; color: var(--muted); user-select: none; transition: all .2s; }
.done::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; transition: all .2s; }
.done:hover { border-color: var(--ok); color: var(--ok); }
.tick:checked + .done { background: var(--ok); border-color: var(--ok); color: #fff; }
.tick:checked + .done::before { background: #fff; border-color: #fff; box-shadow: inset 0 0 0 3px var(--ok); }
.tick:focus-visible + .done { outline: 2px solid var(--accent); outline-offset: 2px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; vertical-align: 3px; margin-left: 6px; }
kbd { font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--line); border-bottom-width: 3px; background: var(--card); white-space: nowrap; }

/* Progress bar that follows you down the page */
.meter { position: sticky; bottom: 12px; z-index: 5; margin: 24px 0 0; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0, 0, 0, .12); }
.segs { flex: 1; display: flex; gap: 5px; }
.seg { flex: 1; height: 8px; border-radius: 999px; background: var(--line); transition: background .4s; }
.count { font-weight: 700; font-size: 15px; white-space: nowrap; }
.count::before { content: counter(done); }
.guide:has(.s1:checked) .seg:nth-child(1), .guide:has(.s2:checked) .seg:nth-child(2), .guide:has(.s3:checked) .seg:nth-child(3),
.guide:has(.s4:checked) .seg:nth-child(4), .guide:has(.s5:checked) .seg:nth-child(5), .guide:has(.s6:checked) .seg:nth-child(6),
.guide:has(.s7:checked) .seg:nth-child(7), .guide:has(.s8:checked) .seg:nth-child(8) { background: var(--ok); }
.party { display: none; text-align: center; margin: 22px 0 0; padding: 26px 18px; border-radius: 18px; background: var(--okbg); border: 1px solid var(--ok); }
.party b { display: block; font-size: 24px; margin-bottom: 4px; }
.party .confetti { font-size: 34px; display: inline-flex; gap: 10px; }
.party .confetti span { display: inline-block; animation: jump 1.1s ease-in-out infinite; }
.party .confetti span:nth-child(2) { animation-delay: .15s; } .party .confetti span:nth-child(3) { animation-delay: .3s; }
.party .confetti span:nth-child(4) { animation-delay: .45s; } .party .confetti span:nth-child(5) { animation-delay: .6s; }
@keyframes jump { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(12deg); } }
.guide:not(:has(.tick:not(:checked))) .party { display: block; animation: rise .5s ease-out; }
.guide:not(:has(.tick:not(:checked))) .meter { border-color: var(--ok); }

/* Pictures: little windows drawn in CSS */
.pic { margin: 14px 0 4px; display: grid; justify-items: center; }
.pic figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; text-align: center; }
.win { position: relative; width: 100%; max-width: 440px; background: var(--win); color: var(--wintext); border: 1px solid var(--winline); border-radius: 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06); overflow: hidden; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.bar { display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: var(--winbar); border-bottom: 1px solid var(--winline); font-size: 13px; font-weight: 600; }
.bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.bar i:nth-child(2) { background: #febc2e; } .bar i:nth-child(3) { background: #28c840; margin-right: 8px; }
.bar.w10 { justify-content: space-between; background: var(--win); }
.body { padding: 14px 16px; position: relative; }
.crumbs { color: #8a8a8e; font-size: 12px; margin-bottom: 10px; }
.crumbs b { color: var(--wintext); }
.row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; background: rgba(127, 127, 127, .08); margin-bottom: 6px; }
.row img { width: 22px; height: 22px; }
.row .name { flex: 1; font-weight: 600; }
.row.dim { opacity: .5; }
.row.dim .name { font-weight: 400; }
.dot-app { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #c9c9ce, #9a9aa0); }
.btnm { display: inline-block; padding: 5px 14px; border-radius: 7px; background: rgba(127, 127, 127, .16); font-weight: 600; font-size: 13px; }
.btnm.blue { background: var(--blue); color: #fff; }
.dialog { text-align: center; padding: 20px 18px 16px; }
.dialog img { width: 54px; height: 54px; }
.dialog p { margin: 8px 0 14px; font-weight: 600; }
.dialog .btns { display: flex; gap: 8px; justify-content: center; }

/* Real screenshot */
.shot { width: 100%; max-width: 380px; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, .14); }

/* Switches you can flip */
.sw-in { position: absolute; opacity: 0; pointer-events: none; }
.sw { position: relative; width: 42px; height: 25px; border-radius: 999px; background: #c7c7cc; cursor: pointer; transition: background .25s; flex: none; }
.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.sw-in:checked + .sw { background: #34c759; }
.sw-in:checked + .sw::after { transform: translateX(17px); }
.sw-in:focus-visible + .sw { outline: 2px solid var(--blue); outline-offset: 2px; }
.sw.win11 { width: 40px; height: 20px; background: transparent; border: 1.5px solid #888; }
.sw.win11::after { top: 3px; left: 4px; width: 11px; height: 11px; box-shadow: none; background: #666; }
.sw-in:checked + .sw.win11 { background: #0067c0; border-color: #0067c0; }
.sw-in:checked + .sw.win11::after { background: #fff; transform: translateX(19px); }
.tap { position: absolute; right: 18px; bottom: -6px; font-size: 13px; font-weight: 700; color: #7a4b00; background: var(--hint); padding: 4px 10px; border-radius: 999px; animation: nudge 1.2s ease-in-out infinite; pointer-events: none; }
.tap::before { content: "👆 "; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.trybox { position: relative; }
.trybox:has(.sw-in:checked) .tap { display: none; }
.yay { display: none; margin: 10px 2px 0; font-weight: 700; color: var(--ok); }
.trybox:has(.sw-in:checked) .yay { display: block; animation: pop .4s cubic-bezier(.3, 1.6, .5, 1); }

/* A pointer that clicks for you, on a loop */
.stage { position: relative; }
.cursor { position: absolute; width: 22px; height: 22px; left: 85%; top: 110%; z-index: 3; pointer-events: none; animation: point 5s ease-in-out infinite; }
.cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; animation: ripple 5s ease-out infinite; }
.cursor svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.c-open { --x: 74%; --y: 66%; }
.c-allow { --x: 60%; --y: 80%; }
.c-more { --x: 14%; --y: 52%; }
@keyframes point { 0% { left: 90%; top: 105%; } 35%, 70% { left: var(--x); top: var(--y); } 45% { transform: scale(.85); } 50% { transform: scale(1); } 100% { left: 90%; top: 105%; } }
@keyframes ripple { 0%, 42% { opacity: 0; transform: scale(.4); } 46% { opacity: 1; transform: scale(.6); } 60% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; } }
.press { animation: press 5s ease-in-out infinite; }
@keyframes press { 0%, 43% { filter: none; transform: none; } 46% { filter: brightness(.8); transform: scale(.95); } 52%, 100% { filter: none; transform: none; } }

/* Two-phase dialog: "More info", then "Run anyway" */
.phase { animation: phase-a 10s infinite; }
.phase.b { position: absolute; inset: 0; animation-name: phase-b; }
@keyframes phase-a { 0%, 48% { opacity: 1; } 50%, 98% { opacity: 0; } 100% { opacity: 1; } }
@keyframes phase-b { 0%, 48% { opacity: 0; } 50%, 98% { opacity: 1; } 100% { opacity: 0; } }
.smart { background: #0f5ca8; color: #fff; padding: 16px 18px; min-height: 178px; }
.smart b { font-size: 18px; font-weight: 400; display: block; margin-bottom: 8px; }
.smart u { color: #fff; }
.smart .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.smart .wbtn { border: 1px solid #fff; padding: 4px 14px; font-size: 13px; }
.smart .wbtn.go { background: #fff; color: #0f5ca8; font-weight: 600; }
.c-run { --x: 70%; --y: 82%; animation: point2 10s ease-in-out infinite; }
.c-run::after { animation: ripple2 10s ease-out infinite; }
@keyframes point2 { 0% { left: 90%; top: 105%; } 15%, 30% { left: 22%; top: 46%; } 22% { transform: scale(.85); } 26% { transform: scale(1); } 62%, 80% { left: var(--x); top: var(--y); } 70% { transform: scale(.85); } 74% { transform: scale(1); } 100% { left: 90%; top: 105%; } }
@keyframes ripple2 { 0%, 20% { opacity: 0; transform: scale(.4); } 22% { opacity: 1; transform: scale(.6); } 30% { opacity: 0; transform: scale(1.6); } 68% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(.6); } 78%, 100% { opacity: 0; transform: scale(1.6); } }

/* Drag into Applications */
.drag { display: flex; align-items: center; justify-content: space-around; padding: 26px 10px; position: relative; }
.drag .slot { display: grid; justify-items: center; gap: 6px; font-size: 12px; }
.drag .slot img, .drag .folder { width: 56px; height: 56px; }
.folder { border-radius: 10px; background: linear-gradient(#7cc4ff, #3a9bef); position: relative; }
.folder::before { content: ""; position: absolute; left: 4px; top: -6px; width: 22px; height: 10px; border-radius: 4px 4px 0 0; background: #7cc4ff; }
.drag .flyer { position: absolute; left: 22%; top: 26px; width: 56px; height: 56px; animation: fly 4s ease-in-out infinite; }
@keyframes fly { 0%, 15% { left: 22%; opacity: 0; } 20% { opacity: 1; } 70% { left: 62%; opacity: 1; transform: scale(1); } 80%, 100% { left: 62%; opacity: 0; transform: scale(.4); } }
.drag .arrow { font-size: 26px; color: var(--muted); animation: nudge-x 1.2s ease-in-out infinite; }
@keyframes nudge-x { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

/* Try it: the key goes down, the pill listens, the words appear */
.demo { display: grid; gap: 14px; justify-items: center; padding: 18px 10px; }
.keys { display: flex; gap: 6px; flex-wrap: nowrap; }
.key { min-width: 44px; height: 42px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--win); color: var(--wintext); border: 1px solid var(--winline); border-bottom-width: 4px; }
.key.space { min-width: 140px; }
.key.hot { border-color: var(--accent); color: var(--accent); animation: hold 6s ease-in-out infinite; }
@keyframes hold { 0%, 8% { transform: none; border-bottom-width: 4px; background: var(--win); } 12%, 70% { transform: translateY(3px); border-bottom-width: 1px; background: var(--okbg); } 74%, 100% { transform: none; border-bottom-width: 4px; background: var(--win); } }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 999px; background: #1d1d1f; animation: pill 6s ease-in-out infinite; }
.pill i { width: 4px; border-radius: 2px; background: #34c759; animation: lvl .5s ease-in-out infinite alternate; }
.pill i:nth-child(1) { height: 8px; } .pill i:nth-child(2) { height: 16px; animation-delay: .1s; } .pill i:nth-child(3) { height: 12px; animation-delay: .2s; }
.pill i:nth-child(4) { height: 18px; animation-delay: .3s; } .pill i:nth-child(5) { height: 9px; animation-delay: .4s; }
@keyframes lvl { from { transform: scaleY(.4); } to { transform: scaleY(1); } }
@keyframes pill { 0%, 10% { opacity: 0; transform: scale(.6); } 14%, 70% { opacity: 1; transform: scale(1); } 76%, 100% { opacity: 0; transform: scale(.6); } }
.say { font-size: 14px; color: var(--muted); animation: say 6s infinite; }
@keyframes say { 0%, 12% { opacity: 0; } 16%, 68% { opacity: 1; } 72%, 100% { opacity: 0; } }
.doc { width: 100%; max-width: 440px; }
.doc .body { min-height: 54px; }
.typed { display: inline-block; font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; white-space: nowrap; overflow: hidden; width: 0; vertical-align: bottom; border-right: 2px solid var(--blue); animation: typed 6s steps(30, end) infinite; max-width: 100%; }
@keyframes typed { 0%, 74% { width: 0; } 92%, 100% { width: 30ch; } }

.help { margin-top: 36px; }
.help details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 10px; }
.help summary { cursor: pointer; font-weight: 600; }
.help details[open] summary { margin-bottom: 6px; }

@media (max-width: 560px) {
  .step { padding: 18px 16px 16px 16px; }
  .step::before { position: static; margin-bottom: 6px; }
  .key { min-width: 34px; font-size: 11px; } .key.space { min-width: 70px; }
  .os-pick label { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .install *, .install *::before, .install *::after { animation: none !important; transition: none !important; }
  .cursor, .drag .flyer, .phase.b { display: none; }
  .pill, .say { opacity: 1; }
  .typed { width: 30ch; }
}

/* The two switches up top: flip both and the demo cheers */
.hero2 { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px 8px; margin: 0 0 30px; display: grid; gap: 12px; }
.sw-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--bg); border: 1.5px solid var(--line); transition: border-color .3s, background .3s; }
.sw-card:has(.sw-in:checked) { border-color: var(--ok); background: var(--okbg); }
.sw-card .emoji { font-size: 30px; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.sw-card:has(.sw-in:checked) .emoji { transform: scale(1.2) rotate(-8deg); }
.txt2 { flex: 1; display: flex; flex-direction: column; }
.txt2 b { font-size: 18px; }
.txt2 small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.sw.big { width: 58px; height: 34px; }
.sw.big::after { width: 30px; height: 30px; }
.sw-in:checked + .sw.big::after { transform: translateX(24px); }
.hero-hint, .hero-yay { margin: 4px 0 0; text-align: center; font-weight: 700; }
.hero-hint { color: var(--muted); animation: nudge 1.2s ease-in-out infinite; }
.hero-yay { display: none; color: var(--ok); font-size: 18px; }
.hero2:has(#h-hot:checked):has(#h-paste:checked) .hero-hint { display: none; }
.hero2:has(#h-hot:checked):has(#h-paste:checked) .hero-yay { display: block; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
.hero2 .demo { opacity: .45; filter: grayscale(1); transition: opacity .5s, filter .5s; }
.hero2:has(#h-hot:checked):has(#h-paste:checked) .demo { opacity: 1; filter: none; }
.hero2:not(:has(#h-hot:checked)) .key.hot, .hero2:not(:has(#h-paste:checked)) .typed { animation-play-state: paused; }
.hero2, .step, .pic { grid-template-columns: minmax(0, 1fr); min-width: 0; }
@media (max-width: 560px) {
  .hero2 { padding: 16px 12px 6px; }
  .sw-card { padding: 12px; gap: 10px; }
  .sw-card .emoji { font-size: 24px; }
  .keys .key:nth-child(-n+2) { display: none; }
}
