/* DRAFT: the pieces the owner picked from the button board (darkproof-button-board.html): 05 Sheen, 07 Chips,
   09 Ribbon, 10 Island, 13 Switch, 14 Decode, 15 Spotlight, 19 Depth, 21 Pair, and the messages' pop. One block per piece: to drop a piece, remove its block here and its
   class in index.html. The shapes, lights and timings are the board's; the colors are DarkProof's black, greys and
   white, with the green only for "safe". Every class starts with "p-". */
.simple {
  --p-ink: #0B0B0C;
  --p-soft: #E8E8E8;
  --p-hi: rgba(255, 255, 255, 0.24);
  --p-ring: rgba(255, 255, 255, 0.09);
  --p-lo: rgba(0, 0, 0, 0.42);
  /* Dark glass: a highlight from the top left, a sheen from top to bottom, a dark base */
  --p-glass: radial-gradient(120% 150% at 18% -45%, rgba(255, 255, 255, 0.15), transparent 56%), linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 62%), rgba(42, 42, 46, 0.92);
  /* Its edge: light on the top rim, a faint ring, shade on the bottom rim, a soft drop shadow */
  --p-glass-edge: inset 0 1px 0 var(--p-hi), inset 0 0 0 1px var(--p-ring), inset 0 -1px 0 var(--p-lo), 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 38px -12px rgba(0, 0, 0, 0.6);
  --p-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---- Every capsule: Geist in sentence case, sinks a little when pressed ---- */
.p-b {
  -webkit-appearance: none; appearance: none; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 52px; margin: 0; padding: 0 24px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 600 15.5px/1 "Geist", system-ui, sans-serif; letter-spacing: -0.01em; -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--p-ease), filter 160ms ease, box-shadow 250ms ease;
}
.p-b:active { transform: scale(0.97); }
.p-b:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 999px; }
.p-b svg { width: 16px; height: 16px; flex: none; }
.p-b > span { position: relative; }
.p-b[disabled] { opacity: 0.5; cursor: default; }
.p-b[disabled]:active { transform: none; }

/* ---- 05 Sheen: the one main action of a page. A white capsule with dark words, so that on a page of dark glass
        the eye goes to it first; a band of light crosses it every few seconds. (It was dark glass like the chips
        until 2026-11-24: with the pages in the menu and the review button, too many things were the same grey.)
        White means "the main thing here"; dark glass is for what comes second; the menu's pages are plain words. ---- */
.p-sheen { overflow: hidden; color: var(--p-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 18px 44px -16px rgba(255, 255, 255, 0.4); }
.p-sheen:hover { filter: brightness(1.03); 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 22px 54px -14px rgba(255, 255, 255, 0.6); }
.p-sheen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%); transform: translateX(-130%); animation: p-sweep 3800ms cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes p-sweep { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
/* The same glass without the band, for a page where several such buttons can show at once: only one has the band */
.p-sheen.p-noband::after { display: none; }

/* ---- 07 Chips: small glass labels. The other devices under the main action, and "Download" in the menu ---- */
.p-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.p-chip { height: 34px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--p-soft); background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02)), rgba(42, 42, 46, 0.92); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 0 0 1px var(--p-ring), 0 2px 6px rgba(0, 0, 0, 0.3); }
.p-chip:hover { filter: brightness(1.2); }
.p-chip[hidden] { display: none; }
/* The chosen one of a set (a tab, a view): brighter glass with a lit rim */
.p-chip[aria-selected="true"], .p-chip[aria-pressed="true"], .p-chip[aria-current="page"] { color: var(--fg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)), rgba(58, 58, 62, 0.94); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3); }
/* A chip is 34px tall: this widens what a finger can hit to 44px without changing how it looks */
.p-chip::before { content: ""; position: absolute; inset: -5px 0; }

/* ---- The small white capsule. Used only inside the island ---- */
.p-press { color: var(--p-ink); background: linear-gradient(180deg, #FFFFFF, #E6E6EA); box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px -12px rgba(255, 255, 255, 0.38); }
.p-press:hover { filter: brightness(1.03); box-shadow: inset 0 1px 0 #FFFFFF, inset 0 -1px 0 rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.5), 0 16px 44px -12px rgba(255, 255, 255, 0.58); }
.p-mini { height: 36px; padding: 0 14px; font-size: 13px; }
/* 36px to look at, 44px to hit */
.p-mini::before { content: ""; position: absolute; inset: -4px 0; }

/* ---- The messages' pop: each grows out of its lower left corner as the page opens, a blink apart. They do not
        wait for anything: all three are there within a third of a second. (The typing dots that stood in their
        place first are gone: nobody should wait for the page to say what it is.) ---- */
.s-say { transform-origin: 0 100%; animation: p-pop 300ms var(--p-ease) both; }
@keyframes p-pop { from { opacity: 0; transform: scale(0.94) translateY(6px); } to { opacity: 1; transform: none; } }
.s-turn:nth-child(2) .s-say { animation-delay: 60ms; }
.s-turn:nth-child(3) .s-say { animation-delay: 120ms; }

/* ---- 09 Ribbon: two rows of small tilted cards drifting past each other, fading at both ends.
        simple.js doubles each row and adds "p-run"; without it the rows simply stand still. ---- */
.p-ribbon { position: relative; width: 100%; height: 150px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 24%, #000 76%, transparent 98%); mask-image: linear-gradient(90deg, transparent 2%, #000 24%, #000 76%, transparent 98%); }
.p-track { position: absolute; left: 0; display: flex; gap: 10px; width: max-content; padding-right: 10px; }
.p-r1 { top: 20px; z-index: 2; }
.p-r2 { top: 80px; opacity: 0.7; }
.p-run .p-track { animation: p-drift 52s linear infinite; }
.p-run .p-r2 { animation-duration: 68s; animation-direction: reverse; }
/* simple.js holds the rows while the ribbon is out of view, and on a phone until it is fully in view */
.p-hold .p-track { animation-play-state: paused; }
@keyframes p-drift { to { transform: translateX(-50%); } }
.p-pill { display: flex; align-items: center; gap: 10px; padding: 5px 17px 5px 5px; border-radius: 999px; white-space: nowrap; background: linear-gradient(180deg, #4B4B4E, #333336); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.17), inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 22px -10px rgba(0, 0, 0, 0.85); }
.p-pill:nth-child(odd) { rotate: -2.5deg; }
.p-pill:nth-child(even) { rotate: 2deg; }
.p-pill:nth-child(3n) { rotate: -1deg; translate: 0 6px; }
.p-r2 .p-pill { background: linear-gradient(180deg, #343437, #232325); }
.p-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #101011; color: var(--p-soft); font: 500 12px/1 var(--mono); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.p-av .ic { width: 16px; height: 16px; }
.p-tx { display: grid; gap: 3px; }
.p-tx b { font: 500 14px/1.1 "Geist", system-ui, sans-serif; color: var(--p-soft); }
.p-tx i { display: flex; align-items: center; gap: 6px; font: 400 12px/1.1 "Geist", system-ui, sans-serif; color: var(--dim); }
.p-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.p-dot.p-safe { background: var(--safe); }
/* On a phone the faded ends are shorter, so more than one card shows at a time */
@media (max-width: 720px) {
  .p-ribbon { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%); }
}

/* ---- 10 Island: a small floating bar with the download. simple.js adds "p-on" once the main action has scrolled
        away and takes it off while the bar would lie over the demo's controls or the footer's links. Above a phone's home bar. ---- */
.p-island {
  position: fixed; z-index: 40; left: var(--sp-200); right: var(--sp-200); bottom: calc(var(--sp-200) + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px;
  width: max-content; max-width: calc(100% - 2 * var(--sp-200)); min-height: 52px; margin: 0 auto; padding: 8px 8px 8px 16px; border-radius: 26px; color: var(--p-soft);
  background: var(--p-glass); box-shadow: var(--p-glass-edge); font: 500 13.5px/1.25 "Geist", system-ui, sans-serif;
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 300ms var(--p-ease), transform 500ms var(--p-ease), visibility 0s 300ms;
}
.p-island.p-on { opacity: 1; visibility: visible; transform: none; transition: opacity 300ms var(--p-ease), transform 500ms var(--p-ease), visibility 0s; }
.p-island img { flex: none; }
.p-st { min-width: 0; text-wrap: balance; }
/* On a wide screen the bar sits in the lower right corner, clear of the column in the middle */
@media (min-width: 1180px) {
  .p-island { left: auto; right: var(--sp-300); bottom: var(--sp-300); margin: 0; }
}

/* ---- 13 Switch: the demo's network switch as a glass toggle. Four signal bars above it drop one after another
        when the network is cut, and a row of dots under its sentence lights in turn while phones carry the message.
        simple.js copies the switch's state to data-on. ---- */
.p-cut { display: grid; justify-items: center; gap: 14px; }
.p-bars { display: flex; align-items: flex-end; gap: 4px; height: 22px; }
.p-bars i { width: 5px; border-radius: 2px; background: var(--fg); transition: background-color 300ms ease, opacity 300ms ease; }
.p-bars i:nth-child(1) { height: 7px; transition-delay: 240ms; }
.p-bars i:nth-child(2) { height: 11px; transition-delay: 160ms; }
.p-bars i:nth-child(3) { height: 16px; transition-delay: 80ms; }
.p-bars i:nth-child(4) { height: 22px; }
.p-cut[data-on="false"] .p-bars i { background: var(--faint); opacity: 0.32; }
.p-toggle { position: relative; width: 76px; height: 42px; padding: 0; border: 0; border-radius: 999px; cursor: pointer; background: var(--p-glass); box-shadow: var(--p-glass-edge); -webkit-tap-highlight-color: transparent; }
.p-toggle:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 999px; }
/* 42px to look at, 44px to hit */
.p-toggle::before { content: ""; position: absolute; inset: -1px 0; }
.p-toggle span { position: absolute; top: 4px; left: 4px; width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(180deg, #FFFFFF, #DCDCE0); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 0 #FFFFFF; transform: translateX(34px); transition: transform 350ms var(--p-ease), background 300ms ease; }
.p-cut[data-on="false"] .p-toggle span { transform: translateX(0); background: linear-gradient(180deg, #8F8F94, #6A6A6E); }
/* Room for two lines, so the phone below does not move when the sentence changes */
.p-cutline { max-width: 40ch; min-height: 2.9em; margin: 0; text-align: center; font: 500 13.5px/1.45 "Geist", system-ui, sans-serif; color: var(--p-soft); text-wrap: balance; }
.p-hops { display: flex; align-items: center; opacity: 0.22; transition: opacity 400ms ease; }
.p-hops i { position: relative; width: 8px; height: 8px; margin-right: 34px; border-radius: 50%; background: var(--faint); }
.p-hops i:last-child { margin-right: 0; }
.p-hops i::after { content: ""; position: absolute; left: 8px; top: 3.5px; width: 34px; height: 1px; background: rgba(255, 255, 255, 0.2); }
.p-hops i:last-child::after { display: none; }
.p-cut[data-on="false"] .p-hops { opacity: 1; }
.p-cut[data-on="false"] .p-hops i { animation: p-hop 2400ms linear infinite; }
.p-cut[data-on="false"] .p-hops i:nth-child(2) { animation-delay: 400ms; }
.p-cut[data-on="false"] .p-hops i:nth-child(3) { animation-delay: 800ms; }
.p-cut[data-on="false"] .p-hops i:nth-child(4) { animation-delay: 1200ms; }
.p-cut[data-on="false"] .p-hops i:nth-child(5) { animation-delay: 1600ms; }
@keyframes p-hop { 0%, 12% { background: var(--fg); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.16); } 30%, 100% { background: var(--faint); box-shadow: none; } }

/* ---- 14 Decode: one mono line that settles from scrambled letters into its sentence (simple.js), once when it
        comes into view and again on a tap. Mono letters are all one width, so the line never jumps. ---- */
.p-decode { max-width: 100%; padding: 8px 4px; border: 0; background: none; cursor: pointer; font: 500 15px/1.5 var(--mono); letter-spacing: 0.02em; color: var(--p-soft); text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.p-decode:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---- 15 Spotlight: a card whose edge and corner light up toward the pointer (simple.js sets --sx and --sy).
        With no pointer the light rests at the top left. ---- */
.p-spot { position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: start; justify-items: start; gap: 6px; padding: 20px; border-radius: 20px; background: var(--s1); }
.p-spot::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(230px circle at var(--sx, 28%) var(--sy, 0%), rgba(255, 255, 255, 0.15), transparent 66%); }
.p-spot::after { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: radial-gradient(190px circle at var(--sx, 28%) var(--sy, 0%), rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.08) 72%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.p-spot-t { margin: 6px 0 0; font: 600 17px/1.2 "Geist", system-ui, sans-serif; letter-spacing: -0.02em; }
.p-spot-s { margin: 0 0 10px; font: 400 11.5px/1.4 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); }
.p-soon { display: inline-flex; align-items: center; height: 34px; color: var(--faint); }

/* ---- 19 Depth: the demo phone in a body with real thickness. The phone itself, its screen and everything in it
        are still demo.css and demo.js. simple.js stacks the edge layers behind it and turns it toward the pointer,
        lets it drift when left alone, and brings it flat while you point at it or type in it. On touch screens and
        with reduced motion it stays flat. ---- */
.p-dz { position: relative; display: grid; place-items: center; perspective: 1400px; }
.p-dz .phone-slot { transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.p-dz.p-turns .phone-slot { will-change: transform; }
/* The metal band: light, dark, light, dark from the top left */
.p-dz .phone { background: linear-gradient(145deg, #6D6D72, #242426 38%, #4A4A4E 62%, #171718); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 0 1px #000; }
.p-edge { position: absolute; inset: 0; border-radius: calc(56px * var(--k, 1)); background: #1B1B1D; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); pointer-events: none; }
/* The light that moves as it turns. Faint while the phone is flat, so it never gets between you and the screen. */
.p-glare { position: absolute; inset: 0; border-radius: calc(56px * var(--k, 1)); pointer-events: none; transform: translateZ(1px); opacity: var(--go, 0.3); background: linear-gradient(112deg, transparent calc(var(--gp, 24%) - 24%), rgba(255, 255, 255, 0.15) var(--gp, 24%), transparent calc(var(--gp, 24%) + 24%)); }
.p-floor { position: absolute; left: 50%; bottom: -8px; width: 60%; height: 26px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, 0.14), transparent); filter: blur(5px); pointer-events: none; }

/* ---- 21 Pair: two small phones facing each other, and a message flying from one to the other. Decoration.
        The loop is 4.6 seconds: the dot flies, the message arrives, "Delivered" lights up. ---- */
.p-pair { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 300px; perspective: 1000px; -webkit-user-select: none; user-select: none; }
.p-pairwrap { position: relative; display: flex; align-items: center; justify-content: center; gap: 150px; transform-style: preserve-3d; transform: rotateX(var(--rx, 4deg)) rotateY(var(--ry, 0deg)); }
.p-dev { position: relative; width: 122px; height: 250px; transform-style: preserve-3d; }
.p-left { transform: rotateY(30deg); }
.p-right { transform: rotateY(-30deg); }
.p-dev-e, .p-dev-b, .p-dev-s, .p-dev-l, .p-dev-g { position: absolute; inset: 0; border-radius: 28px; }
.p-dev-e { background: #1B1B1D; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.p-dev-b { background: linear-gradient(145deg, #6D6D72, #242426 38%, #4A4A4E 62%, #171718); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.p-dev-s { inset: 5px; border-radius: 23px; overflow: hidden; background: var(--bg); box-shadow: 0 0 0 2px #050505; }
.p-dev-s::before { content: ""; position: absolute; left: 50%; top: 7px; width: 40px; height: 12px; margin-left: -20px; border-radius: 999px; background: #0E0E0F; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.p-dev-l { inset: 32px 11px 11px; border-radius: 0; transform-style: preserve-3d; display: grid; align-content: start; gap: 8px; }
.p-dev-l > * { margin: 0; }
.p-z1 { transform: translateZ(12px); }
.p-z2 { transform: translateZ(26px); }
.p-dev-g { pointer-events: none; transform: translateZ(1px); background: linear-gradient(112deg, transparent calc(var(--gp, 34%) - 24%), rgba(255, 255, 255, 0.15) var(--gp, 34%), transparent calc(var(--gp, 34%) + 24%)); }
.p-dstat { padding-bottom: 6px; text-align: center; font: 500 9.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.p-db { justify-self: start; max-width: 88%; padding: 7px 10px; border-radius: 14px; background: var(--s2); color: var(--p-soft); font: 400 12px/1.3 "Geist", system-ui, sans-serif; box-shadow: 0 10px 18px -8px rgba(0, 0, 0, 0.9); }
.p-db.p-me { justify-self: end; background: var(--fg); color: var(--p-ink); }
.p-dmeta { justify-self: end; font: 500 9px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--safe); }
.p-who { position: absolute; left: 0; right: 0; bottom: -28px; text-align: center; font: 500 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.p-fly { position: absolute; left: 50%; top: 50%; width: 176px; height: 64px; margin: -56px 0 0 -88px; transform: translateZ(30px); }
.p-fly svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.p-fx { position: absolute; left: 0; bottom: 8px; animation: p-fx 4600ms linear infinite; }
.p-fy { display: block; width: 9px; height: 9px; margin: 0 0 -4px -4px; border-radius: 50%; background: var(--fg); box-shadow: 0 0 14px 4px rgba(255, 255, 255, 0.55); animation: p-fy 4600ms linear infinite; }
@keyframes p-fx { 0%, 18% { transform: translateX(4px); } 55%, 100% { transform: translateX(172px); } }
@keyframes p-fy { 0%, 17% { transform: translateY(0); opacity: 0; } 18% { transform: translateY(0); opacity: 1; animation-timing-function: cubic-bezier(0, 0, 0.5, 1); } 36.5% { transform: translateY(-36px); opacity: 1; animation-timing-function: cubic-bezier(0.5, 0, 1, 1); } 55% { transform: translateY(0); opacity: 1; } 58%, 100% { transform: translateY(0); opacity: 0; } }
.p-rxb { transform-origin: 0 100%; animation: p-rxb 4600ms linear infinite; }
@keyframes p-rxb { 0%, 55% { opacity: 0; scale: 0.6; } 61%, 93% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1; } }
.p-okm { animation: p-okm 4600ms linear infinite; }
@keyframes p-okm { 0%, 58% { opacity: 0; } 64%, 93% { opacity: 1; } 100% { opacity: 0; } }
/* simple.js holds the loop while the picture is out of view */
.p-hold .p-fx, .p-hold .p-fy, .p-hold .p-rxb, .p-hold .p-okm { animation-play-state: paused; }
/* On a phone the picture is drawn smaller. The side margins take back the room the smaller drawing no longer needs,
   so nothing reaches past the screen's edge. */
@media (max-width: 520px) { .p-pair { height: 244px; } .p-pairwrap { scale: 0.78; margin: 0 -44px; } }

@media (prefers-reduced-motion: reduce) {
  .p-sheen::after, .p-run .p-track, .s-say, .p-cut[data-on="false"] .p-hops i { animation: none; }
  /* The Pair shows the message already arrived; the demo phone is flat and still (simple.js never turns it) */
  .p-fx, .p-fy, .p-rxb, .p-okm { animation: none; }
  .p-fy { opacity: 0; }
  .p-b, .p-toggle span, .p-bars i, .p-hops { transition: none; }
  .p-b:active { transform: none; }
  .p-island, .p-island.p-on { transition: none; }
}
