/* ========================
   PRIVACY WALKTHROUGH
   ======================== */

@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(242,178,51,0); }
  50%      { box-shadow: 0 0 0 8px rgba(242,178,51,0.35); }
}

@keyframes retract {
  from { opacity:1; transform: scaleX(1); }
  to   { opacity:0; transform: scaleX(0); transform-origin: left; }
}

@keyframes enterChip {
  from { opacity:0; transform: translateX(-24px); }
  to   { opacity:1; transform: translateX(0); }
}

@keyframes vaultGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(242,178,51,0); }
  40%     { box-shadow: 0 0 0 14px rgba(242,178,51,0.45), 0 0 28px rgba(242,178,51,0.2); }
}

@keyframes raspberryFlash {
  0%   { background: rgba(122,12,34,0.08); box-shadow: 0 0 0 0 rgba(122,12,34,0); }
  40%  { background: rgba(122,12,34,0.18); box-shadow: 0 0 0 10px rgba(122,12,34,0.22); }
  100% { background: rgba(122,12,34,0.06); box-shadow: 0 0 0 0 rgba(122,12,34,0); }
}

@keyframes staggerFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.proto-pw-card {
  padding: 0;
  overflow: visible;
}

.proto-pw-progress-bar {
  display: flex;
  align-items: center;
  padding: 20px 28px 0;
  gap: 0;
}

.proto-pw-step-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--cream-dk);
  background: var(--white);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.proto-pw-step-dot.active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(242,178,51,0.25);
}

.proto-pw-step-dot.done {
  background: var(--olive);
  border-color: var(--olive);
}

.proto-pw-step-line {
  flex: 1;
  height: 2px;
  background: var(--cream-dk);
  transition: background 0.4s;
}

.proto-pw-step-line.done {
  background: var(--olive);
}

.proto-pw-step {
  display: none;
  padding: 20px 28px 8px;
  animation: staggerFadeUp 0.4s ease;
}

.proto-pw-step.active {
  display: block;
}

.proto-pw-step-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-dk);
  margin-bottom: 6px;
}

.proto-pw-step-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.proto-pw-step-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Step 0 — vault enter */
.proto-pw-vault-enter {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.proto-pw-data-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--cream-lt);
  border: 2px solid var(--cream-dk);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  animation: enterChip 0.6s ease 0.2s both;
}

.proto-pw-data-chip-icon { font-size: 1.4rem; }

.proto-pw-data-chip-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.proto-pw-data-chip-sub {
  font-size: 0.75rem;
  color: var(--text-3);
}

.proto-pw-arrow {
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
  animation: enterChip 0.5s ease 0.5s both;
}

.proto-pw-vault-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 80px;
  background: linear-gradient(135deg, var(--plum) 0%, var(--teal) 100%);
  border-radius: var(--r-xl);
  gap: 4px;
  animation: enterChip 0.5s ease 0.7s both, vaultGlow 1.6s ease 0.9s;
  flex-shrink: 0;
}

.proto-pw-vault-icon { font-size: 1.6rem; }

.proto-pw-vault-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.proto-pw-vault-enc {
  font-size: 0.6rem;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.proto-pw-encrypt-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--olive);
  font-weight: 600;
  padding: 8px 12px;
  background: rgba(139,154,74,0.08);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--olive);
}

/* Step 1 — permissions */
.proto-pw-permissions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.proto-pw-perm-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--cream-lt);
  border-radius: var(--r-md);
  border: 1.5px solid var(--cream-dk);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}

.proto-pw-perm-row:hover {
  border-color: var(--gold);
}

.proto-pw-perm-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 140px;
}

.proto-pw-perm-glow {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cream-dk);
  flex-shrink: 0;
  transition: all 0.3s;
}

.proto-pw-perm-glow.active {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242,178,51,0.28);
  animation: glowPulse 2s ease infinite;
}

.proto-pw-perm-level {
  font-size: 0.8rem;
  color: var(--text-2);
  flex: 1;
}

.proto-pw-perm-level.full  { color: var(--plum); font-weight: 600; }
.proto-pw-perm-level.partial { color: var(--teal); font-weight: 500; }
.proto-pw-perm-level.none  { color: var(--text-3); }
.proto-pw-perm-level.status { color: var(--olive); font-weight: 500; }

/* Step 2 — role views */
.proto-pw-views {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}

.proto-pw-view-card {
  background: var(--cream-lt);
  border: 2px solid var(--cream-dk);
  border-radius: var(--r-lg);
  padding: 14px;
  border-top: 3px solid var(--role-c, #ccc);
  transition: box-shadow 0.2s;
}

.proto-pw-view-card:hover {
  box-shadow: 0 0 0 3px rgba(242,178,51,0.3), var(--sh-sm);
}

.proto-pw-view-role {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.proto-pw-view-data {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.proto-pw-field {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  gap: 6px;
}

.proto-pw-field-key {
  color: var(--text-3);
  flex-shrink: 0;
}

.proto-pw-field-val {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.proto-pw-field.redacted .proto-pw-field-val { color: var(--text-3); }

.proto-pw-redacted {
  letter-spacing: 1px;
  font-size: 0.65rem;
  user-select: none;
}

.proto-pw-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(139,154,74,0.12);
  color: var(--olive-dk);
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
}

.proto-pw-status-sub {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 8px;
  line-height: 1.5;
}

/* Step 3 — revocation */
.proto-pw-revocation-demo {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

.proto-pw-revoke-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.proto-pw-revoke-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(26,107,122,0.08);
  border: 2px solid rgba(26,107,122,0.25);
  border-radius: var(--r-lg);
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--teal-dk);
  position: relative;
  overflow: hidden;
  transition: all 0.5s;
}

.proto-pw-revoke-badge.revoked {
  background: rgba(122,12,34,0.06);
  border-color: rgba(122,12,34,0.3);
  color: var(--raspberry);
  animation: raspberryFlash 0.8s ease;
}

.proto-pw-revoke-glow {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(26,107,122,0.22);
  flex-shrink: 0;
  transition: all 0.4s;
  animation: glowPulse 2s ease infinite;
}

.proto-pw-revoke-glow.off {
  background: var(--raspberry);
  box-shadow: 0 0 0 4px rgba(122,12,34,0.2);
  animation: none;
}

.proto-pw-revoke-status-pill {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.4s;
}

.proto-pw-revoke-status-pill.access {
  background: rgba(26,107,122,0.15);
  color: var(--teal-dk);
}

.proto-pw-revoke-status-pill.revoked {
  background: rgba(122,12,34,0.12);
  color: var(--raspberry);
}

.proto-pw-revoke-btn {
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: none;
  background: rgba(122,12,34,0.08);
  color: var(--raspberry);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.proto-pw-revoke-btn:hover {
  background: var(--raspberry);
  color: white;
}

.proto-pw-revoke-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.proto-pw-revoke-log {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-3);
  padding-left: 4px;
}

.proto-pw-revoke-log-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  animation: staggerFadeUp 0.3s ease;
}

.proto-pw-revoke-log-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--raspberry);
  flex-shrink: 0;
}

.proto-pw-revoke-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(122,12,34,0.06);
  border: 1.5px solid rgba(122,12,34,0.2);
  border-radius: var(--r-lg);
  animation: staggerFadeUp 0.4s ease;
}

.proto-pw-revoke-result-icon { font-size: 1.4rem; }

.proto-pw-revoke-result-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--raspberry);
  margin-bottom: 3px;
}

.proto-pw-revoke-result-sub {
  font-size: 0.78rem;
  color: var(--text-2);
}

/* ========================
   INTEGRATIONS TEASER SECTION
   3-card roadmap teaser: Calendar (Teal), Delegation (Burnt Orange), Health (Raspberry)
   Pure display — no interactivity wiring needed.
   ======================== */

@keyframes integ-chip-in {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0); }
}

.proto-integrations-section {
  /* inherits .proto-section flex column + 14px gap */
}

.proto-integrations-header-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.proto-integrations-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--text);
  font-weight: 400;
  line-height: 1.3;
}

.proto-integrations-subtitle {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 560px;
}

/* 3-column grid on desktop, 1-col on mobile */
.proto-integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ---- Individual card ---- */

.proto-integ-card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  border-top: 3px solid var(--integ-color, var(--teal));
  transition: box-shadow 0.22s, transform 0.18s;
  cursor: default;
}

.proto-integ-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md),
              0 0 0 2px rgba(var(--integ-color-rgb, 26,107,122), 0.15),
              0 0 16px rgba(242,178,51,0.18);
}

.proto-integ-card-inner {
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Roadmap eyebrow */
.proto-integ-eyebrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.proto-integ-roadmap-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(139,154,74,0.12);
  color: var(--olive-dk);
  border: 1px solid rgba(139,154,74,0.3);
}

/* Icon wrap */
.proto-integ-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: rgba(var(--integ-color-rgb, 26,107,122), 0.1);
  color: var(--integ-color, var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proto-integ-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.2;
}

.proto-integ-desc {
  font-size: 0.83rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* ---- Mockup area ---- */

.proto-integ-mockup {
  background: var(--cream-lt);
  border: 1px solid var(--cream-dk);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Calendar mockup */
.proto-integ-mockup--calendar {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.proto-integ-source-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: var(--white);
  border: 1px solid var(--cream-dk);
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-2);
  flex-shrink: 0;
}

.proto-integ-source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.proto-integ-source-label { white-space: nowrap; }

.proto-integ-flow-arrow {
  font-size: 1.1rem;
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}

.proto-integ-events-mini {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 120px;
}

.proto-integ-event-strip {
  padding: 5px 10px;
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: integ-chip-in 0.5s ease both;
}

.proto-integ-event-strip--teal {
  background: var(--teal);
}

.proto-integ-event-strip--teal:last-child {
  animation-delay: 0.12s;
}

/* Delegation mockup */
.proto-integ-mockup--delegation {
  gap: 12px;
}

.proto-integ-handoff-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.proto-integ-handoff-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proto-integ-handoff-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--orange);
  flex: 1;
}

.proto-integ-lock-icon {
  font-size: 0.9rem;
}

.proto-integ-consent-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.proto-integ-consent-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}

/* Reuse vault toggle pattern */
.proto-integ-toggle-switch {
  width: 36px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--cream-dk);
  position: relative;
  flex-shrink: 0;
}

.proto-integ-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--sh-sm);
  transition: left 0.2s;
}

.proto-integ-toggle-switch--on {
  background: var(--olive);
}

.proto-integ-toggle-switch--on::after {
  left: 18px;
}

/* Health mockup */
.proto-integ-health-chips {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.proto-integ-health-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--white);
  border: 1.5px solid var(--cream-dk);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}

.proto-integ-health-chip--entering {
  animation: integ-chip-in 0.55s ease 0.1s both;
  border-color: rgba(122,12,34,0.25);
}

.proto-integ-health-chip-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.proto-integ-health-chip-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.proto-integ-health-chip-source {
  font-size: 0.68rem;
  color: var(--text-3);
}

/* Permission badge — shared across all three cards */
.proto-integ-permission-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(var(--integ-color-rgb, 26,107,122), 0.07);
  color: var(--integ-color, var(--teal));
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(var(--integ-color-rgb, 26,107,122), 0.2);
  align-self: flex-start;
  margin-top: 2px;
}

/* ---- Responsive ---- */

@media (max-width: 900px) {
  .proto-integrations-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Simplify calendar mockup on small screens */
  .proto-integ-mockup--calendar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .proto-integrations-title {
    font-size: 1.15rem;
  }
}