/* Privacy ladder animation (share-screen-recording-privately page).
   Without JS (or with reduced motion) the figure shows its final state: the end-to-end encrypted step. */
.sp { margin: 24px 0 8px; }
.sp-card { position: relative; background: var(--card); border-radius: 30px; padding: 18px 18px 14px; box-shadow: 0 6px 0 rgba(11,36,64,.08), 0 26px 60px rgba(11,36,64,.11); display: grid; gap: 12px; }
.sp-stage { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(14px, 4vw, 44px); align-items: center; padding: 6px 4px 4px; }

/* Left: the share link card */
.sp-doc { min-width: 0; display: grid; gap: 9px; padding: 9px; background: #fff; border: 3px solid var(--navy); border-radius: 18px; box-shadow: 0 4px 0 var(--navy); }
.sp-thumb { position: relative; aspect-ratio: 16 / 10; border: 2.5px solid var(--navy); border-radius: 9px; overflow: hidden; background: #DCEBFA; }
.sp-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.sp-play { position: absolute; inset: 0; display: grid; place-items: center; }
.sp-play span { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(11,36,64,.3); }
.sp-play svg { width: 12px; height: 12px; margin-left: 2px; color: var(--rec); }
.sp-priv { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px 3px 6px; border-radius: 999px; background: var(--sun); border: 2.5px solid var(--navy); box-shadow: 0 2px 0 var(--navy); font: 800 11px/1.2 var(--display); color: var(--navy); transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .25s; }
.sp-priv svg { width: 12px; height: 12px; }

.sp-link { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 10px; background: var(--bg); border: 3px solid var(--navy); border-radius: 999px; box-shadow: 0 3px 0 var(--navy); color: var(--navy); }
.sp-link > svg { flex: none; width: 15px; height: 15px; }
.sp-url { flex: 0 1 auto; min-width: 0; font: 600 clamp(10.5px, 1.4vw, 13px)/1.3 ui-monospace, "SF Mono", Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-key { flex: none; padding: 1px 5px; border-radius: 6px; background: var(--sun); box-shadow: 0 0 0 2px var(--navy); margin-left: 2px; font: 700 clamp(10px, 1.3vw, 12px)/1.3 ui-monospace, "SF Mono", Menlo, monospace; white-space: nowrap; transition: transform .4s cubic-bezier(.3,1.6,.5,1), opacity .3s; }
.sp-pw { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border: 2.5px solid var(--navy); border-radius: 9px; background: #fff; color: var(--navy); transition: opacity .3s, transform .3s; }
.sp-pw svg { flex: none; width: 14px; height: 14px; }
.sp-pw b { width: 7px; height: 7px; border-radius: 50%; background: var(--navy); }

/* Right: servers and the people who got the link */
.sp-side { min-width: 0; display: grid; gap: 16px; }
.sp-srv { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sp-srvbox { position: relative; flex: none; width: clamp(54px, 9vw, 74px); }
.sp-screen { position: relative; aspect-ratio: 16 / 10; border: 3px solid var(--navy); border-radius: 8px; overflow: hidden; background: #DCEBFA; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(5, 1fr); }
.sp-screen i { position: relative; z-index: 1; display: block; background-color: rgba(11,36,64,0); transition: background-color .45s ease; }
.sp-rack { display: grid; gap: 3px; margin-top: 3px; }
.sp-rack span { display: block; height: 6px; border: 2.5px solid var(--navy); border-radius: 5px; background: #DCEBFA; }
.sp-eye { position: absolute; top: -10px; right: -12px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--navy); border: 3px solid var(--navy); box-shadow: 0 3px 0 var(--navy); z-index: 2; transition: transform .35s cubic-bezier(.3,1.6,.5,1), opacity .25s; }
.sp-eye svg { width: 13px; height: 13px; }
.sp-label { font: 700 clamp(12px, 1.5vw, 14px)/1.2 var(--display); color: var(--navy); min-width: 0; }

.sp-people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px clamp(6px, 1.4vw, 12px); padding-bottom: 14px; }
.sp-c { position: relative; min-width: 0; }
.sp-av { display: block; width: 100%; max-width: 62px; margin: 0 auto; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--navy); background-color: var(--c, #7FB5E8);
  background-image: radial-gradient(circle at 50% 37%, rgba(255,255,255,.95) 0 16%, transparent 17%), radial-gradient(ellipse 46% 34% at 50% 98%, rgba(255,255,255,.95) 0 99%, transparent 100%);
  transition: background-color .35s, opacity .35s, transform .35s cubic-bezier(.3,1.6,.5,1); }
.sp-av.is-dim { background-color: #C5CFDA; opacity: .5; transform: scale(.9); }
.sp-me { background: url(/assets/img/cam-face.webp) 0 0 / 600% 100% no-repeat #F4D9C8; box-shadow: 0 0 0 3px var(--sun), 0 0 0 6px var(--navy); }
.sp-me.is-dim { box-shadow: none; }
.sp-me.is-happy { background-position-x: 80%; }
.sp-tag { position: absolute; left: 50%; top: calc(100% + 6px); translate: -50% 0; font: 700 10px/1 var(--display); color: var(--navy); white-space: nowrap; }

/* Caption + controls */
.sp-foot { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.sp-step { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--sun); border: 3px solid var(--navy); box-shadow: 0 3px 0 var(--navy); font: 800 14px/1 var(--display); color: var(--navy); }
.sp-cap { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 1.35; color: var(--body); transition: opacity .25s; }
.sp-cap b { color: var(--navy); }
.sp-btn { flex: none; display: none; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; border: 2.5px solid var(--navy); background: #fff; color: var(--navy); font: 700 13px/1 var(--display); cursor: pointer; box-shadow: 0 3px 0 var(--navy); }
.sp-btn:active { translate: 0 2px; box-shadow: 0 1px 0 var(--navy); }
.sp-btn svg { width: 12px; height: 12px; }
.sp-steps { margin: 0; padding: 0 4px; list-style: none; display: grid; gap: 6px; font-size: 14.5px; color: var(--body); counter-reset: sp; }
.sp-steps li { display: flex; gap: 8px; }
.sp-steps li::before { counter-increment: sp; content: counter(sp); flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--sun); border: 2px solid var(--navy); font: 800 12px/1 var(--display); color: var(--navy); }

/* JS-driven states. Default (no JS): final state, steps list shown. */
.sp.is-js .sp-steps { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp.is-js .sp-btn { display: inline-flex; }
.sp:not(.is-js) .sp-foot { display: none; }
.sp:not(.is-js) .sp-pw, .sp:not(.is-js) .sp-priv { visibility: hidden; }
.sp:not(.is-js) .sp-screen { background: repeating-linear-gradient(90deg, #0B2440 0 9%, #45627F 9% 17%, #1B3A5C 17% 26%, #5B7896 26% 31%); }
.sp:not(.is-js) .sp-pic-srv { display: none; }
.sp.is-js .is-off { opacity: 0; transform: scale(.4); }
.sp.is-js .sp-key.is-off { transform: translateX(-8px) scale(.6); }

@media (max-width: 560px) {
  .sp-card { padding: 14px 12px 12px; border-radius: 24px; }
  .sp-doc { padding: 7px; border-radius: 15px; }
  .sp-link { padding: 5px 7px; }
  .sp-link > svg { display: none; }
  .sp-cap { font-size: 14px; }
  .sp-av { border-width: 2.5px; }
  .sp-me { box-shadow: 0 0 0 2px var(--sun), 0 0 0 4px var(--navy); }
  .sp-people { gap: 6px 5px; }
  .sp-label { display: none; }
}
/* Break out of the narrow text column on wide screens so the diagram has room. */
@media (min-width: 900px) {
  .sp { margin-left: calc(50% - min(440px, 50vw - 24px)); margin-right: calc(50% - min(440px, 50vw - 24px)); }
}
