/* DarkProof's motion system (2026-12-01). Plain CSS, no build step, no outside files. Loaded after the page's
   own styles (after site.css). Every class starts with "mo-"; behaviours that need a script are switched on with
   data-mo="..." and run by motion.js. LAB.md has the table of what to put on an element to get each effect; lab.html
   shows every one of them live.

   Rules this file keeps:
   - Calm by default, motion added. Every state works and reads without movement; the movement itself is only added
     inside "@media (prefers-reduced-motion: no-preference)" and only while the page is not forced calm (the lab's
     switch puts "mo-calm" on <html>).
   - Transform and opacity wherever possible. Where a shape has to change (a pill that stretches, a fill that grows),
     clip-path is used on a small layer: it repaints that layer, it never moves the layout.
   - Springs are CSS linear() curves made from a real spring (stiffness and damping in the comments), with a
     cubic-bezier fallback for browsers without linear(). Durations scale with --mo-k (the lab's quarter-speed switch
     sets it to 4).
   - No colour of its own: white, greys, glass; green only for "connected". */

/* ================================ Tokens ================================ */
:root {
  --mo-k: 1;
  --mo-tap: calc(70ms * var(--mo-k));     /* the press itself: about four frames */
  --mo-fast: calc(140ms * var(--mo-k));   /* colour and light changes */
  --mo-base: calc(240ms * var(--mo-k));
  --mo-slow: calc(420ms * var(--mo-k));
  --mo-out: cubic-bezier(0.23, 1, 0.32, 1);
  --mo-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  /* Springs. Fallbacks first (an overshooting cubic-bezier), the real curves below for browsers that have linear(). */
  --mo-spring: cubic-bezier(0.2, 0.9, 0.3, 1.08);  --mo-spring-t: calc(490ms * var(--mo-k));
  --mo-snap: cubic-bezier(0.2, 0.9, 0.3, 1.2);     --mo-snap-t: calc(420ms * var(--mo-k));
  --mo-bounce: cubic-bezier(0.25, 1.4, 0.4, 1);    --mo-bounce-t: calc(660ms * var(--mo-k));
  --mo-soft: cubic-bezier(0.22, 1, 0.36, 1);       --mo-soft-t: calc(585ms * var(--mo-k));
  --mo-ink: #0B0B0C;
  --mo-glass: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)), rgba(38, 38, 42, 0.92);
  --mo-glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.09), 0 2px 6px rgba(0, 0, 0, 0.3);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* spring: stiffness 300, damping ratio 0.72, overshoot 3.8%, settles in 491 ms. Most moves. */
    --mo-spring: linear(0, 0.024 2.5%, 0.078 5%, 0.155 7.5%, 0.242 10%, 0.527 17.5%, 0.691 22.5%, 0.821 27.5%, 0.872 30%, 0.915 32.5%, 0.978 37.5%, 1.014 42.5%, 1.036 50%, 1.012 70%, 1);
    /* snap: stiffness 700, damping ratio 0.6, overshoot 9%, settles in 420 ms. Releases, small things landing. */
    --mo-snap: linear(0, 0.039 2.5%, 0.131 5%, 0.253 7.5%, 0.527 12.5%, 0.656 15%, 0.771 17.5%, 0.868 20%, 0.946 22.5%, 1.006 25%, 1.048 27.5%, 1.075 30%, 1.089 32.5%, 1.09 37.5%, 1.04 47.5%, 1.006 57.5%, 0.998 70%, 1);
    /* bounce: stiffness 420, damping ratio 0.48, overshoot 18%, settles in 662 ms. Knobs and ticks only. */
    --mo-bounce: linear(0, 0.056 2.5%, 0.187 5%, 0.361 7.5%, 0.549 10%, 0.728 12.5%, 0.888 15%, 1.011 17.5%, 1.098 20%, 1.152 22.5%, 1.176 25%, 1.176 27.5%, 1.159 30%, 1.034 40%, 0.99 45%, 0.97 50%, 0.985 62%, 1.003 78%, 1);
    /* soft: stiffness 170, damping ratio 0.88, no visible overshoot, 585 ms. Sheets, things that rise. */
    --mo-soft: linear(0, 0.018 2.5%, 0.062 5%, 0.122 7.5%, 0.265 12.5%, 0.488 20%, 0.617 25%, 0.722 30%, 0.805 35%, 0.868 40%, 0.914 45%, 0.968 55%, 0.993 70%, 1);
  }
}
@property --mo-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Forced calm (the lab's switch): the site's own movers stand still too, as they do under reduced motion */
:root.mo-calm .p-b, :root.mo-calm .p-b:hover, :root.mo-calm .p-b:active, :root.mo-calm .p-chip:active { transform: none !important; }
:root.mo-calm .p-sheen::after, :root.mo-calm .p-sheen:hover::after { animation: none !important; }

/* ================================ 1. Primary buttons ================================ */

/* ---- Press spring: goes in at once (70 ms), comes back on a spring with a hair of overshoot. motion.js adds
        .is-down on pointer and on Space/Enter, so a tap on a phone and a key press feel the same as a click.
        Calm: no movement, the face darkens a step while pressed. ---- */
.mo-press { -webkit-tap-highlight-color: transparent; transition: transform var(--mo-snap-t) var(--mo-snap), box-shadow var(--mo-base) var(--mo-out), filter var(--mo-fast) ease, background-color var(--mo-fast) ease, color var(--mo-fast) ease; }
.mo-press:active, .mo-press.is-down { filter: brightness(0.93); }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-press:hover { transform: translateY(-1px); }
  :root:not(.mo-calm) .mo-press:active, :root:not(.mo-calm) .mo-press.is-down {
    transform: translateY(1px) scale(0.965); filter: brightness(0.96);
    transition-duration: var(--mo-tap); transition-timing-function: cubic-bezier(0.3, 0, 0.5, 1);
  }
}

/* ---- Light sweep: one band crosses the face once per hover, from the side the pointer came in (motion.js sets
        --mo-dir to 1 or -1). On the white capsule the band has a faint dark edge so it reads on white. ---- */
.mo-sweep { position: relative; overflow: hidden; isolation: isolate; }
.mo-sweep::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; animation: none;
  background: linear-gradient(110deg, transparent 34%, rgba(0, 0, 0, 0.07) 43%, rgba(255, 255, 255, 1) 50%, transparent 60%);
  transform: translateX(calc(-170% * var(--mo-dir, 1)));
}
.mo-sweep > span, .mo-sweep > svg { position: relative; z-index: 2; }
/* the site's own hover sweep (site.css) stands aside where this one is used, so a long hover never sweeps twice */
.mo-sweep.p-sheen:hover::after { animation: none; }
.mo-sweep.p-chip::after, .mo-sweep.mo-on-dark::after { background: linear-gradient(110deg, transparent 36%, rgba(255, 255, 255, 0.22) 50%, transparent 64%); }
@keyframes mo-sweep { from { transform: translateX(calc(-170% * var(--mo-dir, 1))); } to { transform: translateX(calc(170% * var(--mo-dir, 1))); } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-sweep.is-sweep::after { animation: mo-sweep calc(720ms * var(--mo-k)) cubic-bezier(0.4, 0, 0.2, 1) 1; }
}

/* ---- Magnetic pull: motion.js moves the button (the translate property) a few pixels toward a pointer that is
        near it, and its words a little further, then lets go on a spring. Only with a mouse or trackpad. ---- */
.mo-magnet > span, .mo-magnet > svg { transition: none; }

/* ---- Edge light: the 1 px rim brightens toward the pointer (glass buttons and tiles). motion.js injects the rim
        (.mo-rim) and sets --mx/--my. Calm: the rim lights evenly on hover. ---- */
:where([data-mo~="edge"]) { position: relative; }
span.mo-rim, span.mo-beam-rim {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.mo-rim { opacity: 0; background: radial-gradient(var(--mo-rim-r, 120px) circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.06) 70%); transition: opacity var(--mo-base) var(--mo-out); }
.is-lit > .mo-rim { opacity: 1; }

/* ---- Border beam: a short light runs once around the rim (on first view, or when asked: dpMotion.beam(el)), and
        keeps running only while something is working (.is-busy). It animates one angle (@property), so it repaints
        the 1 px rim while it runs and costs nothing after. Calm: no beam. ---- */
:where([data-mo~="beam"]) { position: relative; }
.mo-beam-rim { opacity: 0; background: conic-gradient(from var(--mo-a), transparent 0 62%, rgba(255, 255, 255, 0.08) 70%, rgba(255, 255, 255, 0.95) 84%, rgba(255, 255, 255, 0.08) 90%, transparent 96%); }
@keyframes mo-beam { 0% { --mo-a: 0deg; opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { --mo-a: 360deg; opacity: 0; } }
@keyframes mo-beam-loop { to { --mo-a: 360deg; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .is-beam > .mo-beam-rim { animation: mo-beam calc(1700ms * var(--mo-k)) cubic-bezier(0.45, 0.05, 0.3, 1) 1; }
  :root:not(.mo-calm) .is-busy > .mo-beam-rim { opacity: 1; animation: mo-beam-loop calc(2400ms * var(--mo-k)) linear infinite; }
}

/* ---- Hold to confirm: for what can't be undone (Launch, Lock). Pressing and holding fills the white capsule
        with ink from the left, its words turn white under the ink; letting go early pulls the ink back fast. When
        full, the button gives a short thump, says it is done, and fires "mo:confirm". Keyboard: hold Space or
        Enter. A screen reader's single activation asks for a second one instead (motion.js).
        The fill is clip-path on one small layer. Calm: the fill still grows (it is the progress), nothing moves. ---- */
.mo-hold { position: relative; overflow: hidden; isolation: isolate; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
span.mo-hold-ink {
  position: absolute; inset: 0; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: inherit; padding: inherit; border-radius: inherit;
  background: linear-gradient(180deg, #2A2A2E, #121214); color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  clip-path: inset(0 100% 0 0 round 999px); pointer-events: none;
  transition: clip-path calc(220ms * var(--mo-k)) var(--mo-out);
}
.mo-hold.is-holding .mo-hold-ink { clip-path: inset(0 0 0 0 round 999px); transition: clip-path var(--mo-hold-t, 1200ms) linear; }
.mo-hold.is-done .mo-hold-ink { clip-path: inset(0 0 0 0 round 999px); transition: none; }
.mo-hold .mo-tick { display: none; }
.mo-hold.is-done .mo-tick { display: block; }
@keyframes mo-thump { 0% { transform: scale(0.965); } 35% { transform: scale(1.025); } 100% { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-hold.is-holding { transform: scale(0.975); transition: transform calc(var(--mo-hold-t, 1200ms) * 0.9) var(--mo-out); }
  :root:not(.mo-calm) .mo-hold.is-done { animation: mo-thump var(--mo-bounce-t) var(--mo-snap) 1; }
}

/* ---- Hold ring: the round version (an icon button, e.g. a lock). A ring around it draws itself while held. ---- */
.mo-ringbtn { position: relative; display: inline-grid; place-items: center; width: 64px; height: 64px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: var(--mo-ink); background: linear-gradient(180deg, #FFFFFF, #E4E4E9); box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 0 rgba(0, 0, 0, 0.22), 0 1px 2px rgba(0, 0, 0, 0.5), 0 14px 36px -14px rgba(255, 255, 255, 0.4); -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.mo-ringbtn:focus-visible { outline: 2px solid var(--fg, #fff); outline-offset: 10px; border-radius: 50%; }
.mo-ringbtn > svg.mo-ico { width: 24px; height: 24px; }
.mo-ringbtn .mo-ring-svg { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.mo-ring-svg circle { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.mo-ring-svg .mo-ring-bg { stroke: rgba(255, 255, 255, 0.1); }
.mo-ring-svg .mo-ring-fg { stroke: #FFFFFF; stroke-dasharray: 100 100; stroke-dashoffset: 100; transition: stroke-dashoffset calc(220ms * var(--mo-k)) var(--mo-out); }
.mo-ringbtn.is-holding .mo-ring-fg { stroke-dashoffset: 0; transition: stroke-dashoffset var(--mo-hold-t, 1200ms) linear; }
.mo-ringbtn.is-done .mo-ring-fg { stroke-dashoffset: 0; transition: none; }
.mo-ringbtn .mo-tick { display: none; width: 24px; height: 24px; }
.mo-ringbtn.is-done .mo-ico { display: none; }
.mo-ringbtn.is-done .mo-tick { display: block; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-ringbtn { transition: transform var(--mo-snap-t) var(--mo-snap); }
  :root:not(.mo-calm) .mo-ringbtn.is-holding { transform: scale(0.94); transition: transform calc(var(--mo-hold-t, 1200ms) * 0.9) var(--mo-out); }
  :root:not(.mo-calm) .mo-ringbtn.is-done { animation: mo-thump var(--mo-bounce-t) var(--mo-snap) 1; }
}

/* The tick that draws itself (used by hold, success, copy, slide) */
.mo-tick { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mo-tick path { stroke-dasharray: 24; stroke-dashoffset: 0; }
@keyframes mo-draw { from { stroke-dashoffset: 24; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .is-done .mo-tick path { animation: mo-draw calc(360ms * var(--mo-k)) var(--mo-out) calc(90ms * var(--mo-k)) both; }
}

/* ---- Success morph: the capsule closes into a circle around a tick (clip-path, the layout never moves), holds a
        beat, then opens back to its words. dpMotion.done(button). Calm: the words change to the tick and "Done". ---- */
.mo-morph { position: relative; }
.mo-morph > .mo-label, .mo-morph > svg:not(.mo-tick) { transition: opacity var(--mo-fast) ease, transform var(--mo-base) var(--mo-out); }
.mo-morph > .mo-tick { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; opacity: 0; }
.mo-morph.is-done > .mo-label, .mo-morph.is-done > svg:not(.mo-tick) { opacity: 0; }
.mo-morph.is-done > .mo-tick { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-morph { transition: clip-path var(--mo-spring-t) var(--mo-spring), transform var(--mo-snap-t) var(--mo-snap), filter var(--mo-fast) ease; clip-path: inset(0 0 0 0 round 999px); }
  :root:not(.mo-calm) .mo-morph.is-done { clip-path: inset(0 calc(50% - var(--mo-h, 52px) / 2) 0 calc(50% - var(--mo-h, 52px) / 2) round 999px); }
  :root:not(.mo-calm) .mo-morph.is-done > .mo-label { transform: scale(0.8); }
  :root:not(.mo-calm) .mo-morph.is-done:focus-visible { outline-offset: -5px; outline-color: var(--mo-ink); }
}

/* ---- Alive loading: the words lift away, three dots breathe in turn. After six seconds the dots rest and the
        button says how long it has been working, in whole seconds (no spinner that never ends). dpMotion.busy(). ---- */
.mo-busy { position: relative; }
.mo-busy > .mo-label { transition: opacity var(--mo-fast) ease, transform var(--mo-base) var(--mo-out); }
span.mo-dots { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; opacity: 0; pointer-events: none; font: 500 13px/1 var(--mono, monospace); letter-spacing: 0.02em; transition: opacity var(--mo-fast) ease; }
.mo-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.45; }
.mo-dots b { display: none; font-weight: 500; }
.mo-busy.is-busy > .mo-label { opacity: 0; }
.mo-busy.is-busy > .mo-dots { opacity: 1; }
.mo-busy.is-slow .mo-dots i { display: none; }
.mo-busy.is-slow .mo-dots b { display: inline; }
.mo-busy.is-busy { cursor: progress; }
@keyframes mo-dot { 0%, 100% { transform: translateY(0) scale(0.8); opacity: 0.35; } 40% { transform: translateY(-4px) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-busy.is-busy > .mo-label { transform: translateY(-10px); }
  :root:not(.mo-calm) .mo-busy.is-busy:not(.is-slow) .mo-dots i { animation: mo-dot calc(1100ms * var(--mo-k)) var(--mo-in-out) infinite; }
  :root:not(.mo-calm) .mo-busy.is-busy .mo-dots i:nth-child(2) { animation-delay: calc(140ms * var(--mo-k)); }
  :root:not(.mo-calm) .mo-busy.is-busy .mo-dots i:nth-child(3) { animation-delay: calc(280ms * var(--mo-k)); }
}

/* ---- Slide to confirm (touch): drag the white knob to the end. Early release springs it back; at the end it
        becomes a tick and the track fills. Keyboard: arrow keys move it, End completes it (role="slider"). ---- */
.mo-slide {
  position: relative; display: flex; align-items: center; height: 60px; padding: 4px; border-radius: 999px; overflow: hidden; isolation: isolate; touch-action: pan-y;
  background: #0E0E0F; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 2px 8px rgba(0, 0, 0, 0.6); -webkit-user-select: none; user-select: none; cursor: default;
}
.mo-slide:focus-visible { outline: 2px solid var(--fg, #fff); outline-offset: 3px; }
.mo-slide-fill { position: absolute; inset: 0; z-index: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.16)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.mo-slide-text {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding-left: 52px; font: 500 15px/1 "Geist", system-ui, sans-serif; letter-spacing: -0.01em; pointer-events: none;
  color: rgba(255, 255, 255, 0.5); opacity: calc(1 - var(--p, 0) * 1.6);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.42) 40%, #FFFFFF 50%, rgba(255, 255, 255, 0.42) 60%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  background-position: 100% 0;
}
.mo-slide-knob {
  position: relative; z-index: 2; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; cursor: grab; touch-action: none;
  color: var(--mo-ink); background: linear-gradient(180deg, #FFFFFF, #E1E1E6); box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.55);
  translate: var(--x, 0px) 0;
}
.mo-slide-knob:active { cursor: grabbing; }
.mo-slide-knob svg { width: 20px; height: 20px; }
.mo-slide-knob .mo-tick { display: none; }
.mo-slide.is-done .mo-slide-knob .mo-arrow { display: none; }
.mo-slide.is-done .mo-slide-knob .mo-tick { display: block; }
.mo-slide.is-done .mo-slide-text { opacity: 0; }
.mo-slide-done { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding-right: 52px; font: 500 15px/1 "Geist", system-ui, sans-serif; color: #FFFFFF; opacity: 0; pointer-events: none; }
.mo-slide.is-done .mo-slide-done { opacity: 1; }
@keyframes mo-shimmer { from { background-position: 100% 0; } to { background-position: 0% 0; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-slide:not(.is-dragging):not(.is-done):not(.mo-off) .mo-slide-text { animation: mo-shimmer calc(2400ms * var(--mo-k)) linear 3; }
  :root:not(.mo-calm) .mo-slide-knob { transition: scale var(--mo-snap-t) var(--mo-snap); }
  :root:not(.mo-calm) .mo-slide.is-dragging .mo-slide-knob { scale: 1.06; }
  :root:not(.mo-calm) .mo-slide-done { transition: opacity var(--mo-base) ease calc(120ms * var(--mo-k)); }
}

/* ================================ 2. Secondary controls ================================ */

/* ---- Glass chip: lifts its light on hover, goes in on press, comes back on the snap spring ---- */
.mo-chip { transition: transform var(--mo-snap-t) var(--mo-snap), background-color var(--mo-fast) ease, box-shadow var(--mo-fast) ease, color var(--mo-fast) ease; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-chip:active, :root:not(.mo-calm) .mo-chip.is-down { transform: scale(0.955); transition-duration: var(--mo-tap); transition-timing-function: ease-out; }
}

/* ---- Hover glide: in a row of links or chips, one soft glass pill slides to the one under the pointer (or the
        keyboard focus) and fades when you leave the row. One layer, clip-path. data-mo="glide" on the row. ---- */
:where([data-mo~="glide"]) { position: relative; isolation: isolate; }
.mo-glide-pill { position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: 0; background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); clip-path: inset(var(--t, 0px) var(--r, 100%) var(--b, 0px) var(--l, 0px) round var(--rad, 999px)); transition: opacity var(--mo-base) var(--mo-out); }
.is-gliding > .mo-glide-pill { opacity: 1; }
[data-mo~="glide"] > a:hover, [data-mo~="glide"] > button:hover { background: none; }
:root.mo-calm [data-mo~="glide"] > a:hover, :root.mo-calm [data-mo~="glide"] > button:hover { background: rgba(255, 255, 255, 0.1); }
@media (prefers-reduced-motion: reduce) { [data-mo~="glide"] > a:hover, [data-mo~="glide"] > button:hover { background: rgba(255, 255, 255, 0.1); } .mo-glide-pill { display: none; } }
:root.mo-calm .mo-glide-pill { display: none; }

/* ---- Segment: a segmented control whose raised-glass thumb glides to the choice and stretches on the way (the
        leading edge runs ahead of the trailing one, two springs). Never white: white is only the main action. ---- */
.mo-seg { position: relative; isolation: isolate; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.mo-seg > button { position: relative; z-index: 1; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--dim, #A3A3A3); font: 500 13.5px/1 "Geist", system-ui, sans-serif; white-space: nowrap; cursor: pointer; transition: color var(--mo-fast) ease; -webkit-tap-highlight-color: transparent; }
.mo-seg > button:hover { color: var(--fg, #fff); }
.mo-seg > button[aria-checked="true"] { color: var(--fg, #fff); }
.mo-seg > button:focus-visible { outline: 2px solid var(--fg, #fff); outline-offset: -2px; }
.mo-seg-thumb { position: absolute; inset: 3px; z-index: 0; pointer-events: none; border-radius: 999px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07)), rgba(58, 58, 62, 0.94); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 2px 8px rgba(0, 0, 0, 0.45); clip-path: inset(0 var(--r, 100%) 0 var(--l, 0px) round 999px); }
.mo-seg-mono > button { font: 500 12.5px/1 var(--mono, monospace); }
@media (max-width: 767px) { .mo-seg > button { height: 40px; } }

/* ---- Squash switch: the knob stretches while it travels and squashes when it lands; pressed, it widens toward
        the side it will go. Works on the site's .p-toggle too (add mo-squash): only the scale property is used, so
        it adds to whatever moves the knob. ---- */
.mo-switch { position: relative; width: 64px; height: 36px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: var(--mo-glass); box-shadow: var(--mo-glass-edge); transition: background-color var(--mo-base) ease, box-shadow var(--mo-base) ease; -webkit-tap-highlight-color: transparent; }
.mo-switch::before { content: ""; position: absolute; inset: -4px 0; }
.mo-switch > span { position: absolute; top: 3px; left: 3px; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #8F8F94, #6A6A6E); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4); translate: 0 0; }
.mo-switch[aria-checked="true"] > span { translate: 28px 0; background: linear-gradient(180deg, #FFFFFF, #DCDCE0); }
.mo-switch[aria-checked="true"] { box-shadow: var(--mo-glass-edge), inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.mo-switch:focus-visible { outline: 2px solid var(--fg, #fff); outline-offset: 3px; border-radius: 999px; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-switch > span { transition: translate var(--mo-bounce-t) var(--mo-bounce), scale var(--mo-snap-t) var(--mo-snap), background var(--mo-base) ease; }
  :root:not(.mo-calm) .mo-squash > span { transition-property: transform, scale, background, width; }
  :root:not(.mo-calm) .mo-switch:active > span, :root:not(.mo-calm) .mo-squash:active > span { scale: 1.16 0.92; }
  :root:not(.mo-calm) .mo-switch.is-moving > span, :root:not(.mo-calm) .mo-squash.is-moving > span { scale: 1.3 0.86; transition-duration: var(--mo-bounce-t), calc(120ms * var(--mo-k)), var(--mo-base); }
}
.mo-switch-row { display: inline-flex; align-items: center; gap: 12px; }

/* ---- Detent slider: a value bubble rises from the thumb while you hold it; six stops click into place (the
        thumb snaps within 2.5% of one, the tick lights, the thumb gives a small pop); the readout rolls.
        role="slider" on the track; all of it moves with transform. ---- */
.mo-range { display: grid; gap: 14px; width: 100%; }
.mo-range-track { position: relative; height: 44px; touch-action: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.mo-range-track:focus-visible { outline: none; }
.mo-range-rail { position: absolute; left: 11px; right: 11px; top: 19px; height: 6px; border-radius: 999px; overflow: hidden; background: #0E0E0F; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.mo-range-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.75)); transform: translateX(calc((var(--p, 0) - 1) * 100%)); }
.mo-range-ticks { position: absolute; left: 9px; right: 9px; top: 20px; display: flex; justify-content: space-between; pointer-events: none; }
.mo-range-ticks i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); transition: background-color var(--mo-fast) ease, transform var(--mo-snap-t) var(--mo-snap); }
.mo-range-ticks i.is-on { background: #FFFFFF; }
.mo-range-thumb { position: absolute; top: 11px; left: 0; width: 22px; height: 22px; border-radius: 50%; translate: calc(var(--px, 0px) - 0px) 0; background: linear-gradient(180deg, #FFFFFF, #DCDCE0); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(0, 0, 0, 0.6); }
.mo-range-track:focus-visible .mo-range-thumb { outline: 2px solid var(--fg, #fff); outline-offset: 4px; }
.mo-range-bubble { position: absolute; left: 50%; bottom: calc(100% + 10px); padding: 6px 10px; border-radius: 10px; white-space: nowrap; font: 500 12.5px/1 var(--mono, monospace); color: var(--mo-ink); background: #FFFFFF; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.8); translate: -50% 0; opacity: 0; transform-origin: 50% 100%; pointer-events: none; }
.mo-range-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: inherit; transform: rotate(45deg); border-radius: 1px; }
.mo-range.is-held .mo-range-bubble, .mo-range-track:focus-visible .mo-range-bubble { opacity: 1; }
.mo-range-read { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font: 400 13px/18px var(--mono, monospace); color: var(--soft, #D1D1D1); }
.mo-range-read b { font: 500 22px/1 var(--mono, monospace); color: var(--fg, #fff); letter-spacing: -0.02em; }
@keyframes mo-pop { 50% { scale: 1.28; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-range-thumb { transition: scale var(--mo-snap-t) var(--mo-snap); }
  :root:not(.mo-calm) .mo-range.is-held .mo-range-thumb { scale: 1.14; }
  :root:not(.mo-calm) .mo-range.is-settling .mo-range-thumb, :root:not(.mo-calm) .mo-range.is-settling .mo-range-fill { transition: translate var(--mo-snap-t) var(--mo-snap), transform var(--mo-snap-t) var(--mo-snap), scale var(--mo-snap-t) var(--mo-snap); }
  :root:not(.mo-calm) .mo-range-bubble { transform: scale(0.6) translateY(6px); transition: opacity var(--mo-fast) ease, transform var(--mo-snap-t) var(--mo-snap); }
  :root:not(.mo-calm) .mo-range.is-held .mo-range-bubble, :root:not(.mo-calm) .mo-range-track:focus-visible .mo-range-bubble { transform: none; }
  :root:not(.mo-calm) .mo-range-ticks i.is-on { transform: scale(1.5); }
  :root:not(.mo-calm) .mo-range-thumb.is-click > i { animation: mo-pop calc(220ms * var(--mo-k)) var(--mo-out); }
}
.mo-range-thumb > i { position: absolute; inset: 0; border-radius: inherit; }

/* ---- Stepper: minus, a rolling number, plus. Hold a button to repeat (it speeds up). At a limit the number
        refuses with a small shake. ---- */
.mo-step { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.mo-step > button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: var(--fg, #fff); background: var(--mo-glass); box-shadow: var(--mo-glass-edge); cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.mo-step > button svg { width: 16px; height: 16px; }
.mo-step > button:focus-visible { outline: 2px solid var(--fg, #fff); outline-offset: 2px; border-radius: 50%; }
.mo-step > button[aria-disabled="true"] { opacity: 0.4; }
.mo-step-n { min-width: 4ch; text-align: center; font: 500 20px/1 var(--mono, monospace); font-variant-numeric: tabular-nums; }

/* ---- Copy: the copy icon gives way to a tick that draws itself, "Copy" rolls to "Copied", and back. ---- */
.mo-copy { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border: 0; border-radius: 999px; color: var(--p-soft, #E8E8E8); background: var(--mo-glass); box-shadow: var(--mo-glass-edge); font: 500 13px/1 "Geist", system-ui, sans-serif; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mo-copy::before { content: ""; position: absolute; inset: -4px 0; }
.mo-copy:hover { color: var(--fg, #fff); background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)), rgba(46, 46, 50, 0.94); }
.mo-copy:focus-visible { outline: 2px solid var(--fg, #fff); outline-offset: 2px; border-radius: 999px; }
.mo-copy-ic { position: relative; width: 16px; height: 16px; }
.mo-copy-ic svg { position: absolute; inset: 0; width: 16px; height: 16px; }
.mo-copy-ic .mo-tick { opacity: 0; stroke-width: 2.2; }
.mo-copy.is-done .mo-copy-ic .mo-ic-copy { opacity: 0; }
.mo-copy.is-done .mo-copy-ic .mo-tick { opacity: 1; }
.mo-copy-w { position: relative; display: grid; overflow: hidden; height: 16px; line-height: 16px; }
.mo-copy-w > span { grid-area: 1 / 1; }
.mo-copy-w > span + span { opacity: 0; }
.mo-copy.is-done .mo-copy-w > span:first-child { opacity: 0; }
.mo-copy.is-done .mo-copy-w > span + span { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-copy-ic svg { transition: opacity var(--mo-fast) ease, transform var(--mo-snap-t) var(--mo-snap); }
  :root:not(.mo-calm) .mo-copy.is-done .mo-ic-copy { transform: scale(0.5); }
  :root:not(.mo-calm) .mo-copy-ic .mo-tick { transform: scale(0.6); }
  :root:not(.mo-calm) .mo-copy.is-done .mo-copy-ic .mo-tick { transform: none; }
  :root:not(.mo-calm) .mo-copy-w > span { transition: transform var(--mo-spring-t) var(--mo-spring), opacity var(--mo-fast) ease; }
  :root:not(.mo-calm) .mo-copy-w > span + span { transform: translateY(100%); }
  :root:not(.mo-calm) .mo-copy.is-done .mo-copy-w > span:first-child { transform: translateY(-100%); }
  :root:not(.mo-calm) .mo-copy.is-done .mo-copy-w > span + span { transform: none; }
}

/* ================================ 3. Tiles and cards ================================ */
/* A tile in the home's dark glass (the same recipe as hub.css's .t), for pages and the lab */
.mo-tile { position: relative; isolation: isolate; border-radius: 24px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012) 60%), #0B0B0C; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 0 rgba(0, 0, 0, 0.6); }

/* ---- Pointer light: a soft spot on the glass where the pointer is, and the rim brightening toward it.
        data-mo="lit" on the grid; tiles are its .mo-tile (or .t) children. ---- */
.mo-tile > .mo-glow { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.065), transparent 70%); transition: opacity var(--mo-base) var(--mo-out); }
.mo-tile.is-lit > .mo-glow { opacity: 1; }

/* ---- Tilt: the card turns a few degrees toward the pointer on a spring, and a highlight slides across it the
        other way, as light on glass would. Mouse and trackpad only. ---- */
.mo-tilt { transform-style: preserve-3d; will-change: auto; }
.mo-spec { position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity var(--mo-base) var(--mo-out); }
.mo-spec::before { content: ""; position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.12), transparent 70%); translate: var(--sx, 0px) var(--sy, 0px); }
.mo-tilt.is-tilting > .mo-spec { opacity: 1; }

/* ---- Rise: the parts of a block come up into place one after another the first time it scrolls into view.
        motion.js only arms blocks that start below the window, so nothing on the first screen ever waits, and
        nothing is hidden if the script does not run. ---- */
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-armed > * { opacity: 0; transform: translateY(16px); }
  :root:not(.mo-calm) .mo-armed.is-in > * { opacity: 1; transform: none; transition: opacity calc(380ms * var(--mo-k)) ease, transform var(--mo-soft-t) var(--mo-soft); transition-delay: calc(var(--mo-i, 0) * 55ms * var(--mo-k)); }
}

/* ---- Open: a tile that opens into its page. Same page: the View Transitions API morphs the tile into the
        panel (the picture and the title travel); without it, the panel simply fades in. Between pages, give
        the same view-transition-name to the tile's picture on the home and to the page's head picture. ---- */
.mo-panel { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 72px 16px 16px; background: rgba(0, 0, 0, 0.62); }
.mo-panel[hidden] { display: none; }
.mo-panel-card { position: relative; width: min(720px, 100%); max-height: calc(100dvh - 96px); overflow: auto; padding: 32px; border-radius: 28px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 60%), #0D0D0E; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -30px rgba(0, 0, 0, 0.95); }
.mo-panel-x { position: absolute; top: 16px; right: 16px; }
::view-transition-group(*) { animation-duration: var(--mo-spring-t); animation-timing-function: var(--mo-spring); }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: calc(220ms * var(--mo-k)); }
@keyframes mo-fade-in { from { opacity: 0; } }
/* Page swap with a direction (dpMotion.swap(update, 1 or -1)): the old page leaves 24 px the other way with a 2 px
   blur, the new one comes in on the spring. --mo-vt-dir is set on <html>, which the transition's layers inherit. */
::view-transition-old(mo-pg) { animation: mo-pg-out calc(180ms * var(--mo-k)) ease-in both; }
::view-transition-new(mo-pg) { animation: mo-pg-in var(--mo-spring-t) var(--mo-spring) both; }
@keyframes mo-pg-out { to { opacity: 0; transform: translateX(calc(-24px * var(--mo-vt-dir, 1))); filter: blur(2px); } }
@keyframes mo-pg-in { from { opacity: 0; transform: translateX(calc(28px * var(--mo-vt-dir, 1))); filter: blur(2px); } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-panel.is-fading { animation: mo-fade-in var(--mo-base) ease both; }
}

/* ================================ 4. Numbers and text ================================ */

/* ---- Roll: each digit is a column of 0 to 9 that rolls to its new place; only the digits that change move,
        right to left a beat apart. The real number is there for screen readers. ---- */
.mo-roll { display: inline-flex; align-items: baseline; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mo-roll-v { display: inline-flex; overflow: hidden; height: 1.15em; line-height: 1.15em; -webkit-mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.mo-dg { position: relative; display: inline-block; width: 1ch; height: 1.15em; }
.mo-dg > span { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; translate: 0 calc(var(--d, 0) * -1.15em); }
.mo-dg > span > i { display: block; height: 1.15em; font-style: normal; text-align: center; }
.mo-sep { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-dg > span { transition: translate var(--mo-spring-t) var(--mo-spring); transition-delay: calc(var(--mo-j, 0) * 38ms * var(--mo-k)); }
  :root:not(.mo-calm) .mo-dg.is-new { animation: mo-dg-in var(--mo-base) var(--mo-out) both; }
}
@keyframes mo-dg-in { from { opacity: 0; transform: translateY(40%); } }

/* ---- Resolve: mono text comes out of the brand's dot and ASCII ramp, left to right. Lock-in: an address whose
        last characters flip through letters and lock into DPRF one by one, the row lighting once.
        Type: a line typed with a soft cursor that breathes instead of blinking, and rests when done. ---- */
.mo-resolve, .mo-lock, .mo-type { font-family: var(--mono, monospace); font-variant-numeric: tabular-nums; }
.mo-lock { display: inline-flex; align-items: center; gap: 10px; padding: 0 14px; height: 40px; border-radius: 999px; background: #0E0E0F; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); font-size: 14px; color: var(--dim, #A3A3A3); transition: box-shadow var(--mo-slow) ease; }
.mo-lock .mo-lock-end { display: inline-flex; color: var(--fg, #fff); font-weight: 500; }
.mo-lock .mo-lock-end > span { display: inline-block; width: 1ch; text-align: center; }
.mo-lock.is-locked { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.06); }
.mo-lock.is-settled { transition-duration: calc(900ms * var(--mo-k)); }
.mo-lock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint, #8A8A8A); transition: background-color var(--mo-base) ease; }
.mo-lock.is-locked .mo-lock-dot, .mo-lock.is-settled .mo-lock-dot { background: #FFFFFF; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-lock-dot { transition: background-color var(--mo-base) ease, scale var(--mo-snap-t) var(--mo-snap); }
  :root:not(.mo-calm) .mo-lock:not(.is-locked):not(.is-settled) .mo-lock-dot { scale: 0.6; }
}
.mo-type { white-space: pre-wrap; }
.mo-cur { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -0.18em; border-radius: 1px; background: currentColor; }
.mo-type.is-rest .mo-cur { opacity: 0.35; }
@keyframes mo-breathe-cur { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-type.is-waiting .mo-cur { animation: mo-breathe-cur calc(1100ms * var(--mo-k)) var(--mo-in-out) 4; }
}

/* ================================ 5. Page level ================================ */

/* ---- Condense: the top bar tightens and grows more solid once the page scrolls (one sentinel watched by an
        IntersectionObserver; no scroll listener). transform and opacity only. ---- */
.mo-condense { transform-origin: 50% 0; }
.mo-condense .mo-condense-bg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: rgba(20, 20, 22, 0.96); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px -18px rgba(0, 0, 0, 0.95); opacity: 0; }
.mo-condense.is-condensed .mo-condense-bg { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-condense { transition: transform var(--mo-spring-t) var(--mo-spring); }
  :root:not(.mo-calm) .mo-condense.is-condensed { transform: scale(0.965) translateY(-2px); }
  :root:not(.mo-calm) .mo-condense .mo-condense-bg { transition: opacity var(--mo-base) ease; }
}

/* ---- Menu: a popover that grows out of its button (origin on the button's side) and settles on a spring; its
        rows follow a beat apart. Uses the popover attribute, @starting-style and allow-discrete: the browser
        opens and closes it, also with Esc and a tap outside. ---- */
.mo-menu { margin: 0; padding: 6px; min-width: 200px; border: 0; border-radius: 16px; color: var(--fg, #fff); background: rgba(20, 20, 22, 0.96); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 24px 50px -20px rgba(0, 0, 0, 0.95); transform-origin: var(--ox, 50%) var(--oy, 0%); inset: auto; position: fixed; }
.mo-menu a, .mo-menu button { display: flex; align-items: center; width: 100%; height: 40px; padding: 0 12px; border: 0; border-radius: 10px; color: #EDEDED; background: none; font: 500 14.5px/1 "Geist", system-ui, sans-serif; text-decoration: none; text-align: left; cursor: pointer; }
.mo-menu a:hover, .mo-menu button:hover, .mo-menu a:focus-visible, .mo-menu button:focus-visible { background: rgba(255, 255, 255, 0.08); color: #fff; outline: none; }
.mo-menu a:focus-visible, .mo-menu button:focus-visible { box-shadow: inset 0 0 0 2px #fff; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-menu { opacity: 0; transform: scale(0.94); transition: opacity calc(160ms * var(--mo-k)) ease, transform var(--mo-snap-t) var(--mo-snap), overlay var(--mo-snap-t) allow-discrete, display var(--mo-snap-t) allow-discrete; }
  :root:not(.mo-calm) .mo-menu:popover-open { opacity: 1; transform: none; }
  :root:not(.mo-calm) .mo-menu > * { opacity: 0; transform: translateY(-4px); transition: opacity calc(200ms * var(--mo-k)) ease, transform var(--mo-spring-t) var(--mo-spring); transition-delay: calc(var(--mo-i, 0) * 24ms * var(--mo-k)); }
  :root:not(.mo-calm) .mo-menu:popover-open > * { opacity: 1; transform: none; }
  @starting-style {
    :root:not(.mo-calm) .mo-menu:popover-open { opacity: 0; transform: scale(0.94); }
    :root:not(.mo-calm) .mo-menu:popover-open > * { opacity: 0; transform: translateY(-4px); }
  }
}

/* ---- Sheet: a confirm sheet. On a phone it rises from the bottom and can be dragged down to close; on a
        computer it grows out of the button that opened it (motion.js sets the origin). A <dialog> opened with
        showModal(): focus is held inside, Esc closes. ---- */
.mo-sheet { width: min(440px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 28px; color: var(--fg, #fff); background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 60%), #111113; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px -30px rgba(0, 0, 0, 1); transform-origin: var(--ox, 50%) var(--oy, 100%); overflow: visible; }
.mo-sheet::backdrop { background: rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mo-sheet-in { display: grid; gap: 16px; padding: 12px 24px 24px; }
.mo-grip { display: block; width: 100%; height: 22px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; }
.mo-grip::after { content: ""; display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: rgba(255, 255, 255, 0.22); }
.mo-grip:focus-visible { outline: none; }
.mo-grip:focus-visible::after { background: #fff; }
.mo-sheet [data-mo-drag] { translate: 0 var(--dy, 0px); }
@media (max-width: 600px) {
  .mo-sheet { width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 90dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-sheet { opacity: 0; transform: scale(0.92) translateY(12px); transition: opacity calc(180ms * var(--mo-k)) ease, transform var(--mo-spring-t) var(--mo-spring), overlay var(--mo-spring-t) allow-discrete, display var(--mo-spring-t) allow-discrete; }
  :root:not(.mo-calm) .mo-sheet[open]:not(.is-closing) { opacity: 1; transform: none; }
  :root:not(.mo-calm) .mo-sheet::backdrop { opacity: 0; transition: opacity var(--mo-base) ease, overlay var(--mo-base) allow-discrete, display var(--mo-base) allow-discrete; }
  :root:not(.mo-calm) .mo-sheet[open]:not(.is-closing)::backdrop { opacity: 1; }
  @starting-style {
    :root:not(.mo-calm) .mo-sheet[open]:not(.is-closing) { opacity: 0; transform: scale(0.92) translateY(12px); }
    :root:not(.mo-calm) .mo-sheet[open]:not(.is-closing)::backdrop { opacity: 0; }
  }
  :root:not(.mo-calm) .mo-sheet.is-settling [data-mo-drag] { transition: translate var(--mo-snap-t) var(--mo-snap); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 600px) {
  :root:not(.mo-calm) .mo-sheet { transform: translateY(100%); }
  @starting-style { :root:not(.mo-calm) .mo-sheet[open]:not(.is-closing) { transform: translateY(100%); opacity: 1; } }
}

/* ---- Toasts: a short stack in the corner, the newest in front and the older ones tucked behind; it fans out
        under the pointer or the keyboard focus; a toast can be swiped away; it leaves on its own after four
        seconds unless you are looking at the stack. dpMotion.toast("Locked."). ---- */
.mo-toasts { position: fixed; z-index: 70; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(360px, calc(100% - 32px)); height: 0; }
.mo-toast {
  position: absolute; right: 0; bottom: 0; width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border-radius: 18px;
  color: var(--fg, #fff); background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)), rgba(28, 28, 31, 0.97); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 40px -16px rgba(0, 0, 0, 0.95);
  font: 500 14px/20px "Geist", system-ui, sans-serif; touch-action: pan-y; transform-origin: 50% 100%;
  translate: var(--tx, 0px) var(--ty, 0px); scale: var(--ts, 1); opacity: var(--to, 1); z-index: var(--tz, 1);
}
.mo-toast .mo-tick { flex: none; width: 18px; height: 18px; color: var(--fg, #fff); }
.mo-toast-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--safe, #33D64A); }
@media (max-width: 600px) { .mo-toasts { left: 16px; right: 16px; width: auto; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-toast { transition: translate var(--mo-spring-t) var(--mo-spring), scale var(--mo-spring-t) var(--mo-spring), opacity var(--mo-base) ease; }
  :root:not(.mo-calm) .mo-toast.is-dragging { transition: none; }
  @starting-style { :root:not(.mo-calm) .mo-toast { translate: 0 calc(100% + 24px); opacity: 0; } }
}
:root.mo-calm .mo-toast { transition: opacity var(--mo-base) ease; }
@media (prefers-reduced-motion: reduce) { .mo-toast { transition: opacity 200ms ease; } }

/* ---- Skeleton: placeholders in the tiles' grey that shimmer exactly once, then wait still until the content
        comes, which fades in over them. ---- */
.mo-skel { position: relative; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, 0.06); }
.mo-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent); }
@keyframes mo-skel { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-skel::after { animation: mo-skel calc(1100ms * var(--mo-k)) var(--mo-in-out) calc(var(--mo-i, 0) * 70ms * var(--mo-k)) 1 both; }
}
.mo-loaded { animation: mo-fade-in var(--mo-slow) ease both; }

/* ---- Focus glide: inside data-mo="focus" one ring travels from control to control as the keyboard moves the
        focus (a fixed element, four springs). Only for the keyboard (:focus-visible); the browser's own ring
        comes back under reduced motion. ---- */
.mo-focus-ring { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; border-radius: 12px; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 5px rgba(255, 255, 255, 0.16); opacity: 0; transition: opacity var(--mo-fast) ease; }
.mo-focus-ring.is-on { opacity: 1; }
.mo-focus-on :focus-visible { outline-color: transparent !important; }

/* ================================ 6. Small delights ================================ */

/* ---- Ring of light: one ring leaves the thing you finished and fades (dpMotion.ring). A pulse: one soft light
        passes through a tile from where you acted (dpMotion.pulse). Both compositor-only, both remove themselves. ---- */
.mo-burst { position: absolute; inset: -1px; z-index: 5; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.85), 0 0 18px 2px rgba(255, 255, 255, 0.25); }
.mo-pulse { position: absolute; z-index: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06) 60%, transparent); }
.mo-clip { overflow: hidden; }

/* ---- Breathing dot: the connection dot breathes slowly while it is on screen, and stops when it is not (motion.js
        adds .mo-off). Green only means connected. Calm: a still dot with its halo. ---- */
.mo-breathe { position: relative; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--safe, #33D64A); box-shadow: 0 0 0 4px rgba(51, 214, 74, 0.14); }
.mo-breathe.is-off { background: var(--faint, #8A8A8A); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06); }
.mo-breathe::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; opacity: 0; }
@keyframes mo-breathe { 0% { transform: scale(1); opacity: 0.5; } 70%, 100% { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.mo-calm) .mo-breathe:not(.is-off):not(.mo-off)::after { animation: mo-breathe calc(2800ms * var(--mo-k)) var(--mo-out) infinite; }
}

/* ---- Refusal: a short, decaying shake (dpMotion.refuse), like a phone saying no. Calm: the rim lights once. ---- */
.is-refused { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.6) !important; }

/* ---- Dot field: a fine dot grid inside a tile (the brand's dot lettering, as a surface) that brightens softly
        around the pointer. It stays inside the tile, so it never competes with the page's ASCII field. ---- */
:where([data-mo~="field"]) { position: relative; }
.mo-field { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; overflow: hidden; }
.mo-field::before, .mo-field::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0.9px, transparent 1.3px) 0 0 / 9px 9px; }
.mo-field::before { -webkit-mask: linear-gradient(180deg, #000, transparent 85%); mask: linear-gradient(180deg, #000, transparent 85%); opacity: 0.5; }
.mo-field::after { background-image: radial-gradient(circle, rgba(255, 255, 255, 0.85) 1px, transparent 1.5px); opacity: 0; -webkit-mask: radial-gradient(150px circle at var(--mx, 50%) var(--my, 50%), #000, transparent 75%); mask: radial-gradient(150px circle at var(--mx, 50%) var(--my, 50%), #000, transparent 75%); transition: opacity var(--mo-slow) ease; }
.is-lit > .mo-field::after { opacity: 0.55; }
:root.mo-calm .mo-field::after { display: none; }
@media (prefers-reduced-motion: reduce) { .mo-field::after { display: none; } }

/* ================================ Paused while off screen ================================ */
.mo-off, .mo-off * { animation-play-state: paused !important; }

/* copy and paste: the rolling columns and the second copies kept for screen readers are not selectable */
.mo-roll-v, .m-twin .sr-only, .mo-resolve > .sr-only, .mo-lock > .sr-only { -webkit-user-select: none; user-select: none; }
