/* Clickable prototype embed. Uses only semantic tokens, so it follows light/dark and the Color control. */
.proto { margin: 0; display: flex; flex-direction: column; gap: var(--space-12); min-width: 0; }
.proto-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); flex-wrap: wrap; }
.proto-left { display: flex; align-items: center; gap: var(--space-12); flex-wrap: wrap; min-width: 0; }
.proto-paths { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.proto-paths-l { font-size: 12px; font-weight: 500; line-height: 1.5; color: var(--color-text-muted); }
.proto-steps { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-2); background: var(--color-bg-surface); border: 1px solid var(--color-border-control); border-radius: var(--radius-xl); }
.proto-steps button { min-height: 28px; padding: var(--space-4) var(--space-12); border-radius: var(--radius-lg); font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--color-text-medium); }
.proto-steps button:hover { background: var(--color-accent-wash); color: var(--color-text-primary); }
.proto-steps button[aria-current="step"] { background: var(--color-accent); color: var(--color-text-on-accent); }
.proto-tools { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; margin-left: auto; }
.proto-tool { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-6); min-height: 32px; padding: var(--space-4) var(--space-12); font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--color-text-primary); background: transparent; border: 1px solid var(--color-border-control); border-radius: var(--radius-pill); }
.proto-tool:hover:not(:disabled) { background: var(--color-accent-wash); }
.proto-tool[aria-pressed="true"] { background: var(--color-accent-wash); border-color: var(--color-accent); color: var(--color-text-primary); }
.proto-tool:disabled { opacity: .5; cursor: default; }
.proto-advance { border-color: var(--color-accent); }
.proto-advance[hidden] { display: none; }
.proto-big { display: none; }
.proto-enlargeable .proto-big { display: inline-flex; }

.proto-frame { position: relative; border: 1px solid var(--color-border-hairline); border-radius: var(--radius-lg); background: var(--color-bg-surface); overflow: hidden; }
.proto-stage { position: relative; overflow: auto; overscroll-behavior: contain; background: #fff; aspect-ratio: var(--proto-ar, 1272 / 820); max-height: min(78vh, 760px); min-height: 220px; }
.proto-stage:focus-visible { outline-offset: -3px; }
.proto.is-big .proto-stage { aspect-ratio: auto; height: min(76vh, 720px); }
.proto-screen { position: relative; display: block; width: 100%; min-width: var(--proto-minw, 0); }
.proto-screen > img { display: block; width: 100%; height: auto; max-width: none; user-select: none; -webkit-user-drag: none; }

/* hotspots are invisible until needed. The hint is a soft wash, like a design tool's hotspot hint */
.proto-hot { position: absolute; transform: translate(-50%, -50%); min-width: 24px; min-height: 24px; border-radius: 10px; background: transparent; cursor: pointer; z-index: 2; }
.proto-hot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: color-mix(in srgb, var(--color-accent) 0%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 0%, transparent); pointer-events: none; transition: background-color .3s ease, box-shadow .3s ease; }
.proto-hot:hover::after { background: color-mix(in srgb, var(--color-accent) 9%, transparent); }
.proto-hot:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
.proto.is-hinting .proto-hot::after { background: color-mix(in srgb, var(--color-accent) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 32%, transparent); }

/* the step to take next stays softly highlighted */
.proto-hot.is-primary::after { background: color-mix(in srgb, var(--color-accent) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 30%, transparent); }
.proto-hot.is-primary::after { animation: proto-pulse 2s ease-in-out infinite; }
@keyframes proto-pulse {
  0%, 100% { background: color-mix(in srgb, var(--color-accent) 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 30%, transparent), 0 0 0 0 color-mix(in srgb, var(--color-accent) 40%, transparent); }
  50% { background: color-mix(in srgb, var(--color-accent) 24%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 55%, transparent), 0 0 0 5px color-mix(in srgb, var(--color-accent) 22%, transparent); }
}
.proto-hot.is-primary:hover::after { background: color-mix(in srgb, var(--color-accent) 20%, transparent); }
/* a ticked checkbox drawn over the baked, unticked image */
.proto-check { position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center; transform: none; color: #fff; background: #31892a; border-radius: 4px; pointer-events: none; }
.proto-check[hidden] { display: none; }
.proto-check svg { width: 80%; height: 80%; }
.proto-overlay { position: absolute; inset: 0; z-index: 5; }
.proto-scrim { position: absolute; inset: 0; background: var(--color-overlay-scrim); }
.proto-scrim-hit { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; cursor: default; }
.proto-modal { position: absolute; border-radius: 12px; box-shadow: var(--shadow-lg); background: #fff; overflow: visible; }
.proto-modal > img { display: block; width: 100%; height: auto; border-radius: 12px; }

.proto-cap { display: flex; align-items: baseline; gap: var(--space-8); flex-wrap: wrap; font-size: 13px; line-height: 1.5; color: var(--color-text-muted); }
.proto-cap b { font-weight: 500; color: var(--color-text-primary); }
.proto-static { display: block; width: 100%; height: auto; border: 1px solid var(--color-border-hairline); border-radius: var(--radius-lg); }

/* a hotspot with a tooltip is wrapped; the wrapper adds no box */
.proto-hotwrap { display: contents; }
/* tooltip popover shown above a hotspot, pointing down at it */
.proto-tip { position: absolute; z-index: 4; transform: translate(-50%, -100%); height: auto; max-width: none; pointer-events: none; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .12)); }
.proto-tip[hidden] { display: none; }

/* showing a static image in the window: only Expand remains */
.proto.is-image .proto-left, .proto.is-image .proto-advance, .proto.is-image .proto-back, .proto.is-image .proto-restart, .proto.is-image .proto-big, .proto.is-image .proto-cap { display: none; }

@media (max-width: 859px) {
  .proto-bar { gap: var(--space-8); }
  .proto-steps { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .proto-steps button { white-space: nowrap; flex: none; }
  .proto-tools { width: 100%; gap: var(--space-6); margin-left: 0; }
  .proto-tool { min-height: 36px; }
  .proto-big { display: inline-flex; }
  .proto-stage { max-height: min(72vh, 620px); }
}
@media (prefers-reduced-motion: reduce) {
  .proto-hot::after { transition: none; }
  .proto-hot.is-primary::after { animation: none; }
}
