/* OnlyHub — photo figures.
   Replaces the two drawn SVG diagrams (unchanged.svg, swap.svg) with lifelike
   AI-generated photographs of a fictional person. CSS only: no script, no
   external assets, so it still renders behind a strict CSP.
   Annotation positions are percentages of the photo, so they hold at any size. */

.uc, .proc { margin: 44px 0 0; }
.proc { margin: 0 0 40px; }

.uc-card, .proc-card {
  background: var(--ink-800);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 22px 24px 20px;
}

/* ---------- Figure 1: "One thing changes" ---------- */
.uc-head { margin: 0 0 18px; font-size: 15px; line-height: 1.45; color: var(--mute); }
.uc-head strong { display: block; color: var(--paper); font-size: 15.5px; }

/* Stage geometry: photo is 46% of the width at 3:4, so the stage is
   100 : 61.33. Labels sit in the 27% margins either side. */
.uc-stage { position: relative; width: 100%; aspect-ratio: 100 / 61.33; }
.uc-photo {
  position: absolute; left: 27%; top: 0; width: 46%; height: 100%;
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: var(--ink-700);
}
.uc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.uc-ring {
  position: absolute; left: 39.5%; top: 16%; width: 24.4%; height: 28%;
  border-radius: 50%; border: 2px solid var(--brand-400);
  box-shadow: 0 0 0 2px rgba(47, 212, 167, .55), 0 0 26px rgba(251, 166, 60, .28);
}
.uc-tag, .her {
  position: absolute; transform: translate(-50%, -50%);
  background: linear-gradient(90deg, var(--brand-400), var(--ok-500));
  color: #0c0e16; font: 700 10.5px/1 var(--sans); letter-spacing: .08em;
  text-transform: uppercase; padding: 5px 11px; border-radius: 99px;
  white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.uc-tag { left: 51.7%; top: 44%; }

.pin {
  position: absolute; z-index: 3; left: var(--x); top: var(--y);
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--brand-400); border: 2px solid #fff;
  box-shadow: 0 0 0 4px rgba(251, 166, 60, .25), 0 1px 6px rgba(0, 0, 0, .55);
  box-sizing: border-box; font: 700 11px/1 var(--sans); color: #0c0e16;
}
.pin::after { content: attr(data-n); display: none; }
.pin:nth-of-type(1) { --x: 31.7%; --y: 43.3%; }
.pin:nth-of-type(2) { --x: 16.7%; --y: 65.8%; }
.pin:nth-of-type(3) { --x: 32.8%; --y: 88.5%; }
.pin:nth-of-type(4) { --x: 87.8%; --y: 27.5%; }
.pin:nth-of-type(5) { --x: 88.9%; --y: 60%; }
.pin:nth-of-type(6) { --x: 92.2%; --y: 90%; }

.uc-lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.uc-lines line { stroke: rgba(247, 248, 252, .42); stroke-width: 1; vector-effect: non-scaling-stroke; }

.uc-labels { list-style: none; margin: 0; padding: 0; display: contents; }
.uc-labels li {
  position: absolute; top: var(--y); width: 27%; box-sizing: border-box;
  transform: translateY(-50%); font-size: 14.5px; line-height: 1.35; color: var(--paper-dim);
}
.uc-labels li::before { content: attr(data-n); display: none; }
.uc-labels .l { right: 73%; padding-right: 14px; text-align: right; }
.uc-labels .r { left: 73%;  padding-left: 14px; }
.uc-labels li:nth-child(1) { --y: 43.3%; }
.uc-labels li:nth-child(2) { --y: 65.8%; }
.uc-labels li:nth-child(3) { --y: 88.5%; }
.uc-labels li:nth-child(4) { --y: 27.5%; }
.uc-labels li:nth-child(5) { --y: 60%; }
.uc-labels li:nth-child(6) { --y: 90%; }

.uc-note { margin: 14px 0 0; font-size: 12px; color: var(--mute-2); text-align: right; }

/* ---------- Figure 2: footage -> face located -> what you post ---------- */
.proc-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 12px; }
.pk { margin: 0 0 9px; font-size: 11px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); }
.pc { margin: 9px 0 0; font-size: 13px; line-height: 1.4; color: var(--mute); }
.ph { position: relative; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--ink-700); }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pa { align-self: center; margin-top: 8px; width: 22px; height: 22px; color: var(--mute-2); flex: none; }

/* Panel 2: dim everything except the face, mark the face and its landmarks */
.ph-scan::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 23% 29% at 50% 40%, rgba(12, 14, 22, 0) 62%, rgba(12, 14, 22, .68) 100%);
}
.scan-ring {
  position: absolute; z-index: 2; left: 34.3%; top: 16.5%; width: 31.4%; height: 47%;
  border: 2px dashed var(--brand-400); border-radius: 50%;
}
.lm {
  position: absolute; z-index: 3; width: 5.5px; height: 5.5px; margin: -2.75px 0 0 -2.75px; border-radius: 50%;
  background: var(--ok-500); box-shadow: 0 0 0 2px rgba(12, 14, 22, .55), 0 0 8px rgba(47, 212, 167, .8);
}
.lm:nth-of-type(1) { left: 42.4%; top: 35.7%; }
.lm:nth-of-type(2) { left: 58.9%; top: 35.7%; }
.lm:nth-of-type(3) { left: 51.9%; top: 45.7%; }
.lm:nth-of-type(4) { left: 45%;   top: 51.9%; }
.lm:nth-of-type(5) { left: 58.1%; top: 51.9%; }

/* Panel 3 */
.her { left: 50%; top: 72%; }

/* ---------- Narrow screens: pins get numbers, labels become a legend ---------- */
@media (max-width: 699px) {
  .uc-card, .proc-card { padding: 18px 16px 16px; }
  .uc-stage { aspect-ratio: auto; }
  .uc-photo { position: relative; left: auto; top: auto; width: min(100%, 400px); height: auto; aspect-ratio: 3 / 4; margin: 0 auto; }
  .uc-lines { display: none; }
  .pin { width: 22px; height: 22px; margin: -11px 0 0 -11px; display: grid; place-items: center; }
  .pin::after { display: block; }
  .uc-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 16px; }
  .uc-labels li { position: static; width: auto; transform: none; padding: 0 !important; text-align: left !important;
                  display: flex; gap: 9px; align-items: flex-start; font-size: 14px; }
  .uc-labels li::before {
    display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
    background: var(--brand-400); color: #0c0e16; font: 700 11px/1 var(--sans);
  }
  .uc-note { text-align: left; }

  .proc-row { grid-template-columns: 1fr; gap: 6px; }
  .pn { max-width: 320px; width: 100%; margin: 0 auto; }
  .pa { justify-self: center; margin: 2px 0; transform: rotate(90deg); }
}
@media (max-width: 420px) {
  .uc-labels { grid-template-columns: 1fr; }
}
